Class MailingListHome
- java.lang.Object
-
- fr.paris.lutece.portal.business.mailinglist.MailingListHome
-
public final class MailingListHome extends java.lang.ObjectThis class provides instances management methods (create, find, ...) for MailingList objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddFilterToMailingList(MailingListUsersFilter filter, int nId)Add an new user filter to a mailing liststatic booleancheckFilter(MailingListUsersFilter filter, int nId)Check if the filter already exists or not in a mailing liststatic MailingListcreate(MailingList mailingList)Creation of an instance of mailingListstatic voiddeleteFilterToMailingList(MailingListUsersFilter filter, int nId)Remove an user filter from a mailing liststatic java.util.Collection<MailingList>findAll()Loads the data of all the mailingLists and returns them in form of a collectionstatic MailingListfindByPrimaryKey(int nKey)Returns an instance of a mailingList whose identifier is specified in parameterstatic java.util.Collection<MailingList>findByWorkgroup(java.lang.String strWorkgroup)Find all mailing lists visible by a workgroupstatic java.util.List<MailingList>findsByFilter(MailingListFilter filter)Find by filter.static voidremove(int nMailingListId)Remove the mailingList whose identifier is specified in parameterstatic MailingListupdate(MailingList mailingList)Update of the mailingList which is specified in parameter
-
-
-
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 addnId- 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 removenId- 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 filternId- 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
-
-