fr.paris.lutece.plugins.newsletter.business
Class SendingNewsLetterHome

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

public final class SendingNewsLetterHome
extends java.lang.Object

This class provides instances management methods (create, find, ...) for SendingNewsLetter objects


Method Summary
static SendingNewsLetter create(SendingNewsLetter sending, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Create an instance of a newsletter sending
static java.util.List 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 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
clone, equals, finalize, 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

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

findAllSendings

public static java.util.List 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.


Copyright © 2008 Mairie de Paris. All Rights Reserved.