Class SendingNewsLetterHome
java.lang.Object
fr.paris.lutece.plugins.newsletter.business.SendingNewsLetterHome
This class provides instances management methods (create, find, ...) for SendingNewsLetter objects
-
Method Summary
Modifier and TypeMethodDescriptionstatic SendingNewsLettercreate(SendingNewsLetter sending, fr.paris.lutece.portal.service.plugin.Plugin plugin) Create an instance of a newsletter sendingstatic List<SendingNewsLetter>findAllLastSendingForNewsletterId(int newsletterId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns all the last sending performed for the newsletter of given idstatic List<SendingNewsLetter>findAllSendings(fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns all the sendings in the database.static SendingNewsLetterfindByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns an object SendingNewsLetter from its identifierstatic SendingNewsLetterfindLastSendingForNewsletterId(int newsletterId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns the last sending performed for the newsletter of given idstatic ArrayList<SendingNewsLetter>findSendingsByIds(ArrayList<Integer> listId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns all the sendings in the database.static voidremove(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) remove an entry of a newsletter sendingstatic SendingNewsLetterupdate(SendingNewsLetter sending, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update of the sendingNewsLetter which is specified in parameter
-
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 databaseplugin- 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 newsletterplugin- 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 storeplugin- 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 newsletterplugin- 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 sendingplugin- 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 sendingplugin- 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 newslettersplugin- the plugin- Returns:
- a list of SendingNewsLetter objects.
-