fr.paris.lutece.plugins.greetingscard.business
Class GreetingsCardArchiveDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.greetingscard.business.GreetingsCardArchiveDAO
All Implemented Interfaces:
IGreetingsCardArchiveDAO

public class GreetingsCardArchiveDAO
extends java.lang.Object
implements IGreetingsCardArchiveDAO


Constructor Summary
GreetingsCardArchiveDAO()
           
 
Method Summary
 GreetingsCardArchive findById(int nIdArchive, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load a greetings card archive from the database
 java.util.Collection<GreetingsCardArchive> findByTemplateIdAndYear(int nIdGreetingsCardTemplate, int nYear, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the list of greetings cards archives of a greetings card template
 java.util.Collection<GreetingsCardArchive> findByYear(int year, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the list of greetings cards archives of a given year
 java.util.Collection<java.lang.Integer> getYearList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of every year archived
 void insert(GreetingsCardArchive greetingsCardArchive, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Creates a greetings card in the database
 void remove(int nIdArchive, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove a greetings card archive
 void removeAllArchives(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove every archive from the database
 void removeByIdTemplate(int nGreetingsCardTemplate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove every archive associated to a greetings card template
 void update(GreetingsCardArchive greetingsCardArchive, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update a greetings card archive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GreetingsCardArchiveDAO

public GreetingsCardArchiveDAO()
Method Detail

insert

public void insert(GreetingsCardArchive greetingsCardArchive,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Creates a greetings card in the database

Specified by:
insert in interface IGreetingsCardArchiveDAO
Parameters:
greetingsCardArchive - GreetingsCardarchive to inser
plugin - The plugin

findByTemplateIdAndYear

public java.util.Collection<GreetingsCardArchive> findByTemplateIdAndYear(int nIdGreetingsCardTemplate,
                                                                          int nYear,
                                                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the list of greetings cards archives of a greetings card template

Specified by:
findByTemplateIdAndYear in interface IGreetingsCardArchiveDAO
Parameters:
nIdGreetingsCardTemplate - The greetings card template identifier
nYear - Year of the archives. If the year is 0, then it is ignored
plugin - The plugin
Returns:
A Collection of greetings cards archives

findByYear

public java.util.Collection<GreetingsCardArchive> findByYear(int year,
                                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the list of greetings cards archives of a given year

Specified by:
findByYear in interface IGreetingsCardArchiveDAO
plugin - The plugin
Returns:
A Collection of greetings cards archives

findById

public GreetingsCardArchive findById(int nIdArchive,
                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load a greetings card archive from the database

Specified by:
findById in interface IGreetingsCardArchiveDAO
Parameters:
nIdArchive - Id of the archive to load
plugin - The plugin
Returns:
The Greetings card archive

remove

public void remove(int nIdArchive,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a greetings card archive

Specified by:
remove in interface IGreetingsCardArchiveDAO
Parameters:
nIdArchive - Id of the archive to remove
plugin - The plugin

removeAllArchives

public void removeAllArchives(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove every archive from the database

Specified by:
removeAllArchives in interface IGreetingsCardArchiveDAO
Parameters:
plugin - The plugin

update

public void update(GreetingsCardArchive greetingsCardArchive,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update a greetings card archive

Specified by:
update in interface IGreetingsCardArchiveDAO
Parameters:
greetingsCardArchive - Greetings card archive to update
plugin - The plugin

removeByIdTemplate

public void removeByIdTemplate(int nGreetingsCardTemplate,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove every archive associated to a greetings card template

Specified by:
removeByIdTemplate in interface IGreetingsCardArchiveDAO
Parameters:
nGreetingsCardTemplate - Id of the template
plugin - The plugin

getYearList

public java.util.Collection<java.lang.Integer> getYearList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of every year archived

Specified by:
getYearList in interface IGreetingsCardArchiveDAO
Parameters:
plugin - The plugin
Returns:
A collection containing every year archived.


Copyright © 2012 Mairie de Paris. All Rights Reserved.