Class MailingListDAO

java.lang.Object
fr.paris.lutece.portal.business.mailinglist.MailingListDAO
All Implemented Interfaces:
IMailingListDAO

@ApplicationScoped public final class MailingListDAO extends Object implements IMailingListDAO
This class provides Data Access methods for MailingList objects
  • Constructor Details

    • MailingListDAO

      public MailingListDAO()
  • Method Details

    • insert

      public void insert(MailingList mailingList)
      Insert a new record in the table.
      Specified by:
      insert in interface IMailingListDAO
      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:
      load in interface IMailingListDAO
      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:
      delete in interface IMailingListDAO
      Parameters:
      nMailingListId - The identifier of the mailingList
    • store

      public void store(MailingList mailingList)
      Update the record in the table
      Specified by:
      store in interface IMailingListDAO
      Parameters:
      mailingList - The reference of the mailingList
    • selectAll

      public Collection<MailingList> selectAll()
      Load the data of all the mailingLists and returns them in form of a collection
      Specified by:
      selectAll in interface IMailingListDAO
      Returns:
      The Collection which contains the data of all the mailingLists
    • selectByWorkgroup

      public Collection<MailingList> selectByWorkgroup(String strWorkgroup)
      Returns all mailing lists having a scope restricted to a given workgroup
      Specified by:
      selectByWorkgroup in interface IMailingListDAO
      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:
      insertFilter in interface IMailingListDAO
      Parameters:
      nMailingListId - The mailing list Id
      mailingListUsersFilter - 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:
      deleteFilter in interface IMailingListDAO
      Parameters:
      nMailingListId - The Id of the mailing list
      filter - 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:
      checkFilter in interface IMailingListDAO
      Parameters:
      filter - the filter
      nId - the id mailing list
      Returns:
      true if it already exists, false otherwise
    • selectByFilter

      public List<MailingList> selectByFilter(MailingListFilter filter)
      Select by filter.
      Specified by:
      selectByFilter in interface IMailingListDAO
      Parameters:
      filter - the filter
      Returns:
      the list