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

java.lang.Object
  extended by 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
SendingNewsLetterDAO()
           
 
Method Summary
 void delete(int nSendingId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete the record in the database
 java.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.
 void insert(SendingNewsLetter sending, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 SendingNewsLetter load(int nSendingId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Loads the data from the database
 SendingNewsLetter selectLastSendingForNewsletterId(int newsletterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the last sending performed for the newsletter of given id
 void store(SendingNewsLetter sending, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SendingNewsLetterDAO

public SendingNewsLetterDAO()
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:
insert in interface ISendingNewsLetterDAO
Parameters:
sending - the object to be inserted
plugin - the Plugin

delete

public void delete(int nSendingId,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete the record in the database

Specified by:
delete in interface ISendingNewsLetterDAO
Parameters:
nSendingId - the sending Identifier
plugin - the Plugin

load

public SendingNewsLetter load(int nSendingId,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Loads the data from the database

Specified by:
load in interface ISendingNewsLetterDAO
Parameters:
nSendingId - the sending identifier
plugin - 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:
store in interface ISendingNewsLetterDAO
Parameters:
sending - an instance of the class SendingNewsLetter
plugin - 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:
selectLastSendingForNewsletterId in interface ISendingNewsLetterDAO
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 java.util.List<SendingNewsLetter> findAllSendings(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns all the sendings in the database.

Specified by:
findAllSendings in interface ISendingNewsLetterDAO
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:
findSendingsByIds in interface ISendingNewsLetterDAO
Parameters:
listId - A list of newsletter id
plugin - the plugin
Returns:
a list of SendingNewsLetter objects.


Copyright © 2009 Mairie de Paris. All Rights Reserved.