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

java.lang.Object
  extended by fr.paris.lutece.plugins.newsletter.business.NewsLetterTemplateDAO
All Implemented Interfaces:
INewsLetterTemplateDAO

public final class NewsLetterTemplateDAO
extends java.lang.Object
implements INewsLetterTemplateDAO

This class provides Data Access methods for NewsLetter's templates objects


Constructor Summary
NewsLetterTemplateDAO()
           
 
Method Summary
 void delete(int nNewsLetterTemplateId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove a record from the table
 void insert(NewsLetterTemplate newsletter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 NewsLetterTemplate load(int nTemplateId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          loads the data of the newsletter's template from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Calculate a new primary key to add a new NewsletterTemplate
 fr.paris.lutece.util.ReferenceList selectTemplatesByRef(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Loads the list of newsletter templates as a ReferenceList
 java.util.List<NewsLetterTemplate> selectTemplatesCollectionByType(int nType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns a list of templates depending on the given type
 java.util.Collection<NewsLetterTemplate> selectTemplatesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the list of all templates
 fr.paris.lutece.util.ReferenceList selectTemplatesListByType(int nType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the list of all templates
 void store(NewsLetterTemplate newsLetterTemplate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update a given record in the table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewsLetterTemplateDAO

public NewsLetterTemplateDAO()
Method Detail

selectTemplatesList

public java.util.Collection<NewsLetterTemplate> selectTemplatesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the list of all templates

Specified by:
selectTemplatesList in interface INewsLetterTemplateDAO
Parameters:
plugin - The plugin
Returns:
the collection of all templates

selectTemplatesListByType

public fr.paris.lutece.util.ReferenceList selectTemplatesListByType(int nType,
                                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the list of all templates

Specified by:
selectTemplatesListByType in interface INewsLetterTemplateDAO
Parameters:
nType - the type of the templates to list
plugin - The plugin
Returns:
the reference list of the templates corresponding to the given type

selectTemplatesCollectionByType

public java.util.List<NewsLetterTemplate> selectTemplatesCollectionByType(int nType,
                                                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns a list of templates depending on the given type

Specified by:
selectTemplatesCollectionByType in interface INewsLetterTemplateDAO
Parameters:
nType - the type of the templates to list
plugin - The plugin
Returns:
the collection of the templates corresponding to the given type

insert

public void insert(NewsLetterTemplate newsletter,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Specified by:
insert in interface INewsLetterTemplateDAO
Parameters:
newsletter - The Instance of the object NewsLetterTemplate
plugin - the plugin

load

public NewsLetterTemplate load(int nTemplateId,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
loads the data of the newsletter's template from the table

Specified by:
load in interface INewsLetterTemplateDAO
Parameters:
nTemplateId - the template identifier
plugin - the plugin
Returns:
the object inserted

newPrimaryKey

public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Calculate a new primary key to add a new NewsletterTemplate

Parameters:
plugin - the plugin
Returns:
The new key.

store

public void store(NewsLetterTemplate newsLetterTemplate,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update a given record in the table.

Specified by:
store in interface INewsLetterTemplateDAO
Parameters:
newsLetterTemplate - The Instance of the object NewsLetterTemplate
plugin - the plugin

delete

public void delete(int nNewsLetterTemplateId,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a record from the table

Specified by:
delete in interface INewsLetterTemplateDAO
Parameters:
nNewsLetterTemplateId - the template identifier
plugin - the Plugin

selectTemplatesByRef

public fr.paris.lutece.util.ReferenceList selectTemplatesByRef(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Loads the list of newsletter templates as a ReferenceList

Specified by:
selectTemplatesByRef in interface INewsLetterTemplateDAO
Parameters:
plugin - The Plugin using this data access service
Returns:
A list of templates


Copyright © 2010 Mairie de Paris. All Rights Reserved.