Class MailingListHome


  • public final class MailingListHome
    extends java.lang.Object
    This class provides instances management methods (create, find, ...) for MailingList objects
    • Method Detail

      • create

        public static MailingList create​(MailingList mailingList)
        Creation of an instance of mailingList
        Parameters:
        mailingList - The instance of the MailingList which contains the informations to store
        Returns:
        The instance of mailingList which has been created with its primary key.
      • update

        public static MailingList update​(MailingList mailingList)
        Update of the mailingList which is specified in parameter
        Parameters:
        mailingList - The instance of the MailingList which contains the data to store
        Returns:
        The instance of the mailingList which has been updated
      • remove

        public static void remove​(int nMailingListId)
        Remove the mailingList whose identifier is specified in parameter
        Parameters:
        nMailingListId - The mailingList Id
      • findByPrimaryKey

        public static MailingList findByPrimaryKey​(int nKey)
        Returns an instance of a mailingList whose identifier is specified in parameter
        Parameters:
        nKey - The mailingList primary key
        Returns:
        an instance of MailingList
      • findAll

        public static java.util.Collection<MailingList> findAll()
        Loads the data of all the mailingLists and returns them in form of a collection
        Returns:
        the collection which contains the data of all the mailingLists
      • findByWorkgroup

        public static java.util.Collection<MailingList> findByWorkgroup​(java.lang.String strWorkgroup)
        Find all mailing lists visible by a workgroup
        Parameters:
        strWorkgroup - The workgroup
        Returns:
        A mailing list collection
      • addFilterToMailingList

        public static void addFilterToMailingList​(MailingListUsersFilter filter,
                                                  int nId)
        Add an new user filter to a mailing list
        Parameters:
        filter - The filter to add
        nId - The Id of the mailing list
      • deleteFilterToMailingList

        public static void deleteFilterToMailingList​(MailingListUsersFilter filter,
                                                     int nId)
        Remove an user filter from a mailing list
        Parameters:
        filter - The filter to remove
        nId - The Id of the mailing list
      • checkFilter

        public static boolean checkFilter​(MailingListUsersFilter filter,
                                          int nId)
        Check if the filter already exists or not in a mailing list
        Parameters:
        filter - the filter
        nId - the id mailing list
        Returns:
        true if it already exists, false otherwise
      • findsByFilter

        public static java.util.List<MailingList> findsByFilter​(MailingListFilter filter)
        Find by filter.
        Parameters:
        filter - the filter
        Returns:
        the list