Class SendingNewsLetterHome

java.lang.Object
fr.paris.lutece.plugins.newsletter.business.SendingNewsLetterHome

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

    • 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 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 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 ArrayList<SendingNewsLetter> findSendingsByIds(ArrayList<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.