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

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

public final class GreetingsCardDAO
extends java.lang.Object
implements IGreetingsCardDAO

This class provides Data Access methods for GreetingsCard objects


Method Summary
 void delete(java.lang.String strIdGC, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void deleteList(java.lang.String strIdGC, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove a list of greetings card
 java.util.Collection<GreetingsCard> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Finds all objects of this type
 java.util.Collection<GreetingsCard> findByGreetingsCardTemplateId(int nIdGreetingsCardTemplate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the list of greetings cards of a greetings card template
 java.util.Collection<GreetingsCard> findByTemplateAndDate(int nIdGreetingsCardTemplate, java.util.Date dateMin, java.util.Date dateMax, int nResultsLimit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get greetings card with a given template and sent between two given dates
 java.util.Collection<GreetingsCard> findCardsToSendNotification(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the collection of greetings cards that has been red and that has the notify sender flag set.
 java.util.List<java.lang.String> findDomainNameOfMailSent(GreetingsCardFilter greetingsCardFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the list of domain name of mail sent
 java.util.Map<java.lang.String,java.lang.Integer> findNumberOfMailReadByDomain(GreetingsCardFilter greetingsCardFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Return the number of mail red for each domains
 java.util.Map<java.lang.String,java.lang.Integer> findNumberOfMailSentByDomain(GreetingsCardFilter greetingsCardFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Return the number of mail sent for each domains
 int findNumberTotalOfMailSentWithoutCopy(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the total number of cards sent without archives.
 void insert(GreetingsCard greetingsCard, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 GreetingsCard load(java.lang.String strIdGC, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          load the data of GreetingsCard from the table
 void store(GreetingsCard greetingsCard, 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
 

Method Detail

insert

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

Specified by:
insert in interface IGreetingsCardDAO
Parameters:
greetingsCard - The Instance of the GreetingsCard object
plugin - The plugin

delete

public void delete(java.lang.String strIdGC,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Specified by:
delete in interface IGreetingsCardDAO
Parameters:
strIdGC - The indentifier of the object GreetingsCard
plugin - The plugin

deleteList

public void deleteList(java.lang.String strIdGC,
                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a list of greetings card

Specified by:
deleteList in interface IGreetingsCardDAO
Parameters:
strIdGC - The comma separated list of greetings cards ids
plugin - The plugin

load

public GreetingsCard load(java.lang.String strIdGC,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
load the data of GreetingsCard from the table

Specified by:
load in interface IGreetingsCardDAO
Parameters:
strIdGC - The identifier of the object GreetingsCard
plugin - The plugin
Returns:
The Instance of the object GreetingsCard

store

public void store(GreetingsCard greetingsCard,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Specified by:
store in interface IGreetingsCardDAO
Parameters:
greetingsCard - The instance of the GreetingsCard to update
plugin - The plugin

findAll

public java.util.Collection<GreetingsCard> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Finds all objects of this type

Specified by:
findAll in interface IGreetingsCardDAO
Parameters:
plugin - The plugin
Returns:
A collection of objects

findByGreetingsCardTemplateId

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

Specified by:
findByGreetingsCardTemplateId in interface IGreetingsCardDAO
Parameters:
nIdGreetingsCardTemplate - The greetings card template identifier
plugin - The plugin
Returns:
A Collection of greetings cards. Messages and messages 2 of greetings cards are not loaded.

findDomainNameOfMailSent

public java.util.List<java.lang.String> findDomainNameOfMailSent(GreetingsCardFilter greetingsCardFilter,
                                                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the list of domain name of mail sent

Specified by:
findDomainNameOfMailSent in interface IGreetingsCardDAO
Parameters:
greetingsCardFilter - The greetings card filter
plugin - The plugin
Returns:
A list of domain

findNumberOfMailSentByDomain

public java.util.Map<java.lang.String,java.lang.Integer> findNumberOfMailSentByDomain(GreetingsCardFilter greetingsCardFilter,
                                                                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return the number of mail sent for each domains

Specified by:
findNumberOfMailSentByDomain in interface IGreetingsCardDAO
Parameters:
greetingsCardFilter - The greetings card filter
plugin - The plugin
Returns:
A map containing associations of domain names and numbers of email sent. Only cards matching the filter are considered.

findNumberTotalOfMailSentWithoutCopy

public int findNumberTotalOfMailSentWithoutCopy(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the total number of cards sent without archives. Copies are ignored

Specified by:
findNumberTotalOfMailSentWithoutCopy in interface IGreetingsCardDAO
Parameters:
plugin - The plugin
Returns:
The number of cards sent without copies and archives.

findNumberOfMailReadByDomain

public java.util.Map<java.lang.String,java.lang.Integer> findNumberOfMailReadByDomain(GreetingsCardFilter greetingsCardFilter,
                                                                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return the number of mail red for each domains

Specified by:
findNumberOfMailReadByDomain in interface IGreetingsCardDAO
Parameters:
greetingsCardFilter - The greetings card filter
plugin - The plugin
Returns:
A map containing associations of domain names and numbers of email red. Only cards matching the filter are considered.

findCardsToSendNotification

public java.util.Collection<GreetingsCard> findCardsToSendNotification(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the collection of greetings cards that has been red and that has the notify sender flag set.

Specified by:
findCardsToSendNotification in interface IGreetingsCardDAO
Parameters:
plugin - The plugin
Returns:
The collection of greetings cards that has been red and that has the notify sender flag set. The collection may be empty.

findByTemplateAndDate

public java.util.Collection<GreetingsCard> findByTemplateAndDate(int nIdGreetingsCardTemplate,
                                                                 java.util.Date dateMin,
                                                                 java.util.Date dateMax,
                                                                 int nResultsLimit,
                                                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get greetings card with a given template and sent between two given dates

Specified by:
findByTemplateAndDate in interface IGreetingsCardDAO
Parameters:
nIdGreetingsCardTemplate - Id of the template of greetings cards
dateMin - Minimum sent date
dateMax - Maximum sent date
nResultsLimit - Maximum number of results returned. If the number is 0, then every object is considered
plugin - The plugin
Returns:
The collection of greetings cards. Messages and messages 2 of greetings cards are not loaded.


Copyright © 2012 Mairie de Paris. All Rights Reserved.