Class SendingNewsLetterHome


  • public final class SendingNewsLetterHome
    extends java.lang.Object
    This class provides instances management methods (create, find, ...) for SendingNewsLetter objects
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SendingNewsLetter create​(SendingNewsLetter sending, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Create an instance of a newsletter sending
      static java.util.List<SendingNewsLetter> findAllLastSendingForNewsletterId​(int newsletterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns all the last sending performed for the newsletter of given id
      static java.util.List<SendingNewsLetter> findAllSendings​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns all the sendings in the database.
      static SendingNewsLetter findByPrimaryKey​(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns an object SendingNewsLetter from its identifier
      static SendingNewsLetter findLastSendingForNewsletterId​(int newsletterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns the last sending performed for the newsletter of given id
      static java.util.ArrayList<SendingNewsLetter> findSendingsByIds​(java.util.ArrayList<java.lang.Integer> listId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns all the sendings in the database.
      static void remove​(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      remove an entry of a newsletter sending
      static SendingNewsLetter update​(SendingNewsLetter sending, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update of the sendingNewsLetter which is specified in parameter
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static SendingNewsLetter create​(SendingNewsLetter sending,
                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Create an instance of a newsletter sending
        Parameters:
        sending - The object to insert in the database
        plugin - the plugin
        Returns:
        the instance created
      • remove

        public static void remove​(int nId,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
        remove an entry of a newsletter sending
        Parameters:
        nId - the primary key of the sending newsletter
        plugin - the plugin
      • update

        public static SendingNewsLetter update​(SendingNewsLetter sending,
                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Update of the sendingNewsLetter which is specified in parameter
        Parameters:
        sending - the object which contains the data to store
        plugin - the plugin
        Returns:
        the new instance updated
      • findByPrimaryKey

        public static SendingNewsLetter findByPrimaryKey​(int nKey,
                                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns an object SendingNewsLetter from its identifier
        Parameters:
        nKey - the primary key of the sending newsletter
        plugin - the plugin
        Returns:
        an instance of the class
      • findLastSendingForNewsletterId

        public static SendingNewsLetter findLastSendingForNewsletterId​(int newsletterId,
                                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns the last sending performed for the newsletter of given id
        Parameters:
        newsletterId - the newsletter id for wich we need the last sending
        plugin - the plugin
        Returns:
        the last sending for the given newsletter id - null if no sending found
      • findAllLastSendingForNewsletterId

        public static java.util.List<SendingNewsLetter> findAllLastSendingForNewsletterId​(int newsletterId,
                                                                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns all the last sending performed for the newsletter of given id
        Parameters:
        newsletterId - the newsletter id for wich we need the last sending
        plugin - the plugin
        Returns:
        the last sending for the given newsletter id - null if no sending found
      • findAllSendings

        public static java.util.List<SendingNewsLetter> findAllSendings​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns all the sendings in the database.
        Parameters:
        plugin - the plugin
        Returns:
        a list of SendingNewsLetter objects.
      • findSendingsByIds

        public static java.util.ArrayList<SendingNewsLetter> findSendingsByIds​(java.util.ArrayList<java.lang.Integer> listId,
                                                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns all the sendings in the database.
        Parameters:
        listId - A list of sent newsletters
        plugin - the plugin
        Returns:
        a list of SendingNewsLetter objects.