Class SendingNewsLetterDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.newsletter.business.SendingNewsLetterDAO
-
- All Implemented Interfaces:
ISendingNewsLetterDAO
public final class SendingNewsLetterDAO extends java.lang.Object implements ISendingNewsLetterDAO
This class provides Data Access methods for SendingNewsLetter objects
-
-
Constructor Summary
Constructors Constructor Description SendingNewsLetterDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(int nSendingId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete the record in the databasejava.util.List<SendingNewsLetter>findAllSendings(fr.paris.lutece.portal.service.plugin.Plugin plugin)Returns all the sendings in the database.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.voidinsert(SendingNewsLetter sending, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.SendingNewsLetterload(int nSendingId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Loads the data from the databasejava.util.List<SendingNewsLetter>selectAllLastSendingForNewsletterId(int newsletterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Returns all the last sending performed for the newsletter of given idSendingNewsLetterselectLastSendingForNewsletterId(int newsletterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Returns the last sending performed for the newsletter of given idvoidstore(SendingNewsLetter sending, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the record in the table
-
-
-
Method Detail
-
insert
public void insert(SendingNewsLetter sending, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.- Specified by:
insertin interfaceISendingNewsLetterDAO- Parameters:
sending- the object to be insertedplugin- the Plugin
-
delete
public void delete(int nSendingId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete the record in the database- Specified by:
deletein interfaceISendingNewsLetterDAO- Parameters:
nSendingId- the sending Identifierplugin- the Plugin
-
load
public SendingNewsLetter load(int nSendingId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Loads the data from the database- Specified by:
loadin interfaceISendingNewsLetterDAO- Parameters:
nSendingId- the sending identifierplugin- the Plugin- Returns:
- an object SendingNewsLetter
-
store
public void store(SendingNewsLetter sending, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table- Specified by:
storein interfaceISendingNewsLetterDAO- Parameters:
sending- an instance of the class SendingNewsLetterplugin- the Plugin
-
selectLastSendingForNewsletterId
public SendingNewsLetter selectLastSendingForNewsletterId(int newsletterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the last sending performed for the newsletter of given id- Specified by:
selectLastSendingForNewsletterIdin interfaceISendingNewsLetterDAO- 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
-
selectAllLastSendingForNewsletterId
public java.util.List<SendingNewsLetter> selectAllLastSendingForNewsletterId(int newsletterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns all the last sending performed for the newsletter of given id- Specified by:
selectAllLastSendingForNewsletterIdin interfaceISendingNewsLetterDAO- 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 java.util.List<SendingNewsLetter> findAllSendings(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns all the sendings in the database.- Specified by:
findAllSendingsin interfaceISendingNewsLetterDAO- Parameters:
plugin- the plugin- Returns:
- a list of SendingNewsLetter objects.
-
findSendingsByIds
public 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.- Specified by:
findSendingsByIdsin interfaceISendingNewsLetterDAO- Parameters:
listId- A list of newsletter idplugin- the plugin- Returns:
- a list of SendingNewsLetter objects.
-
-