Class MailingListDAO
- java.lang.Object
-
- fr.paris.lutece.portal.business.mailinglist.MailingListDAO
-
- All Implemented Interfaces:
IMailingListDAO
public final class MailingListDAO extends java.lang.Object implements IMailingListDAO
This class provides Data Access methods for MailingList objects
-
-
Constructor Summary
Constructors Constructor Description MailingListDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckFilter(MailingListUsersFilter filter, int nId)Check if the filter already exists or not in the mailing listvoiddelete(int nMailingListId)Delete a record from the tablevoiddeleteFilter(MailingListUsersFilter filter, int nMailingListId)Remove an users filter from the mailing listvoiddeleteFilters(int nMailingListUsersFilterId)Delete a record from the tablevoidinsert(MailingList mailingList)Insert a new record in the table.voidinsertFilter(MailingListUsersFilter mailingListUsersFilter, int nMailingListId)Insert a new record in the table.MailingListload(int nId)Load the data of the mailingList from the tablejava.util.Collection<MailingList>selectAll()Load the data of all the mailingLists and returns them in form of a collectionjava.util.List<MailingList>selectByFilter(MailingListFilter filter)Select by filter.java.util.Collection<MailingList>selectByWorkgroup(java.lang.String strWorkgroup)Returns all mailing lists having a scope restricted to a given workgroupvoidselectMailingListUsersFilters(MailingList mailinglist)Load the data of all the mailingListUsersFilters and returns them in form of a collectionvoidstore(MailingList mailingList)Update the record in the table
-
-
-
Method Detail
-
insert
public void insert(MailingList mailingList)
Insert a new record in the table.- Specified by:
insertin interfaceIMailingListDAO- Parameters:
mailingList- instance of the MailingList object to insert
-
load
public MailingList load(int nId)
Load the data of the mailingList from the table- Specified by:
loadin interfaceIMailingListDAO- Parameters:
nId- The identifier of the mailingList- Returns:
- the instance of the MailingList
-
delete
public void delete(int nMailingListId)
Delete a record from the table- Specified by:
deletein interfaceIMailingListDAO- Parameters:
nMailingListId- The identifier of the mailingList
-
store
public void store(MailingList mailingList)
Update the record in the table- Specified by:
storein interfaceIMailingListDAO- Parameters:
mailingList- The reference of the mailingList
-
selectAll
public java.util.Collection<MailingList> selectAll()
Load the data of all the mailingLists and returns them in form of a collection- Specified by:
selectAllin interfaceIMailingListDAO- Returns:
- The Collection which contains the data of all the mailingLists
-
selectByWorkgroup
public java.util.Collection<MailingList> selectByWorkgroup(java.lang.String strWorkgroup)
Returns all mailing lists having a scope restricted to a given workgroup- Specified by:
selectByWorkgroupin interfaceIMailingListDAO- Parameters:
strWorkgroup- The workgroup- Returns:
- the collection which contains the data of all the mailingLists
-
insertFilter
public void insertFilter(MailingListUsersFilter mailingListUsersFilter, int nMailingListId)
Insert a new record in the table.- Specified by:
insertFilterin interfaceIMailingListDAO- Parameters:
nMailingListId- The mailing list IdmailingListUsersFilter- instance of the MailingListUsersFilter object to insert
-
deleteFilter
public void deleteFilter(MailingListUsersFilter filter, int nMailingListId)
Remove an users filter from the mailing list- Specified by:
deleteFilterin interfaceIMailingListDAO- Parameters:
nMailingListId- The Id of the mailing listfilter- the filter to remove
-
deleteFilters
public void deleteFilters(int nMailingListUsersFilterId)
Delete a record from the table- Parameters:
nMailingListUsersFilterId- The identifier of the mailingListUsersFilter
-
selectMailingListUsersFilters
public void selectMailingListUsersFilters(MailingList mailinglist)
Load the data of all the mailingListUsersFilters and returns them in form of a collection- Parameters:
mailinglist- The mailing list
-
checkFilter
public boolean checkFilter(MailingListUsersFilter filter, int nId)
Check if the filter already exists or not in the mailing list- Specified by:
checkFilterin interfaceIMailingListDAO- Parameters:
filter- the filternId- the id mailing list- Returns:
- true if it already exists, false otherwise
-
selectByFilter
public java.util.List<MailingList> selectByFilter(MailingListFilter filter)
Select by filter.- Specified by:
selectByFilterin interfaceIMailingListDAO- Parameters:
filter- the filter- Returns:
- the list
-
-