Class NewsLetterSubscriptionPortletDAO

java.lang.Object
fr.paris.lutece.plugins.newsletter.business.portlet.NewsLetterSubscriptionPortletDAO
All Implemented Interfaces:
INewsLetterSubscriptionPortletDAO, fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO

@ApplicationScoped @Named("newsletter.newsLetterSubscriptionPortletDAO") public class NewsLetterSubscriptionPortletDAO extends Object implements INewsLetterSubscriptionPortletDAO
This class provides Data Access methods for NewsLetterSubscriptionPortlet objects
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(int nPortletId)
    Deletes a record from the table.
    findSelectedNewsletters(int nPortletId)
    Returns all the newsletters associated to a given portlet.
    void
    insert(fr.paris.lutece.portal.business.portlet.Portlet portlet)
    Inserts a new record in the table.
    void
    insertSubscription(int nPortletId, int nNewsletterId)
    Associates a new subscription to a given portlet.
    fr.paris.lutece.portal.business.portlet.Portlet
    load(int nPortletId)
    Loads the data of the portlet from the table.
    void
    removeSubscription(int nPortletId, int nNewsletterId)
    De-associate a subscription from a given portlet.
    void
    store(fr.paris.lutece.portal.business.portlet.Portlet portlet)
    Updates the record in the table.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NewsLetterSubscriptionPortletDAO

      public NewsLetterSubscriptionPortletDAO()
  • Method Details

    • insert

      public void insert(fr.paris.lutece.portal.business.portlet.Portlet portlet)
      Inserts a new record in the table. Not implemented.
      Specified by:
      insert in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
      Parameters:
      portlet - the object to be inserted
    • delete

      public void delete(int nPortletId)
      Deletes a record from the table.
      Specified by:
      delete in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
      Parameters:
      nPortletId - the portlet id
    • load

      public fr.paris.lutece.portal.business.portlet.Portlet load(int nPortletId)
      Loads the data of the portlet from the table.
      Specified by:
      load in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
      Parameters:
      nPortletId - the portlet id
      Returns:
      the Portlet object
    • store

      public void store(fr.paris.lutece.portal.business.portlet.Portlet portlet)
      Updates the record in the table. Not implemented.
      Specified by:
      store in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
      Parameters:
      portlet - the instance of Portlet class to be updated
    • insertSubscription

      public void insertSubscription(int nPortletId, int nNewsletterId)
      Associates a new subscription to a given portlet.
      Specified by:
      insertSubscription in interface INewsLetterSubscriptionPortletDAO
      Parameters:
      nPortletId - the identifier of the portlet.
      nNewsletterId - the identifier of the subscription.
    • removeSubscription

      public void removeSubscription(int nPortletId, int nNewsletterId)
      De-associate a subscription from a given portlet.
      Specified by:
      removeSubscription in interface INewsLetterSubscriptionPortletDAO
      Parameters:
      nPortletId - the identifier of the portlet.
      nNewsletterId - the identifier of the subscription.
    • findSelectedNewsletters

      public Set<Integer> findSelectedNewsletters(int nPortletId)
      Returns all the newsletters associated to a given portlet.
      Specified by:
      findSelectedNewsletters in interface INewsLetterSubscriptionPortletDAO
      Parameters:
      nPortletId - the identifier of the portlet.
      Returns:
      a Set of Integer objects containing the identifiers of the subscriptions.