fr.paris.lutece.plugins.calendar.business
Class CalendarSubscriberHome

java.lang.Object
  extended by fr.paris.lutece.plugins.calendar.business.CalendarSubscriberHome

public final class CalendarSubscriberHome
extends java.lang.Object

This class provides instances management methods (create, find, ...) for Subscriber objects


Method Summary
static void addSubscriber(int nCalendarId, int nSubscriberId, java.sql.Timestamp tToday, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          insert a new subscriber for e calendar
static CalendarSubscriber create(CalendarSubscriber subscriber, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Create an instance of the Subscriber class
static java.util.List findAllSubsriber(fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
static CalendarSubscriber findByEmail(java.lang.String strEmail, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns a subscriber object from the email
static CalendarSubscriber findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an object Subscriber from its identifier
static int findSubscriberNumber(int nAgendaId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns, for a subscriber, the number of his subscriptions
static java.util.List<CalendarSubscriber> findSubscribers(int nCalendarId, int nBegin, int nEnd, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          loads the list of subscribers for a calendar
static java.util.List<CalendarSubscriber> findSubscribers(int nCalendarId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          loads the list of subscribers for a calendar
static java.util.List<CalendarSubscriber> findSubscribers(int nCalendarId, java.lang.String strSearchString, int nBegin, int nEnd, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          loads the list of subscribers for a calendar
static java.util.List getSubscribersList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          loads the list of subscribers
static void remove(int nSubscriberId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove the subscriber whose identifier is specified in parameter
static void removeSubscriber(int nSubscriberId, int nAgendaId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          removes an subscriber's inscription for a calendar
static CalendarSubscriber update(CalendarSubscriber subscriber, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update of the subscriber's data specified in paramater
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static CalendarSubscriber create(CalendarSubscriber subscriber,
                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Create an instance of the Subscriber class

Parameters:
subscriber - the object to insert into the database
plugin - the plugin
Returns:
the instance created

update

public static CalendarSubscriber update(CalendarSubscriber subscriber,
                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update of the subscriber's data specified in paramater

Parameters:
subscriber - the instance of class which contains the data to store
plugin - the plugin
Returns:
the instance of the subscriber updated

remove

public static void remove(int nSubscriberId,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove the subscriber whose identifier is specified in parameter

Parameters:
nSubscriberId - the subscriber's identifier
plugin - the plugin

findByPrimaryKey

public static CalendarSubscriber findByPrimaryKey(int nKey,
                                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns an object Subscriber from its identifier

Parameters:
nKey - the primary key of the subscriber
plugin - the plugin
Returns:
an instance of the class

findAllSubsriber

public static java.util.List findAllSubsriber(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Parameters:
plugin - the plugin
Returns:
a collection of objects Subscriber

findByEmail

public static CalendarSubscriber findByEmail(java.lang.String strEmail,
                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns a subscriber object from the email

Parameters:
strEmail - the subscriber's email
plugin - the plugin
Returns:
a subscriber object if it exists, null if not

findSubscribers

public static java.util.List<CalendarSubscriber> findSubscribers(int nCalendarId,
                                                                 int nBegin,
                                                                 int nEnd,
                                                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
loads the list of subscribers for a calendar

Parameters:
nCalendarId - the calendar identifier
nBegin - the rank of the first subscriber to return
nEnd - the maximum number of suscribers to return
plugin - the plugin
Returns:
a collection of subscribers

findSubscribers

public static java.util.List<CalendarSubscriber> findSubscribers(int nCalendarId,
                                                                 java.lang.String strSearchString,
                                                                 int nBegin,
                                                                 int nEnd,
                                                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
loads the list of subscribers for a calendar

Parameters:
nCalendarId - the calendar identifier
strSearchString - gets all the subscribers if null or empty and gets the subscribers with email containing this string otherwise
nBegin - the rank of the first subscriber to return
nEnd - the maximum number of suscribers to return
plugin - the plugin
Returns:
a collection of subscribers

findSubscribers

public static java.util.List<CalendarSubscriber> findSubscribers(int nCalendarId,
                                                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
loads the list of subscribers for a calendar

Parameters:
nCalendarId - the calendar identifier
plugin - the plugin
Returns:
a collection of subscribers

findSubscriberNumber

public static int findSubscriberNumber(int nAgendaId,
                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns, for a subscriber, the number of his subscriptions

Parameters:
nSubscriberId - the subscriber's identifier
plugin - the plugin
Returns:
the number of subscriptions

getSubscribersList

public static java.util.List getSubscribersList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
loads the list of subscribers

Parameters:
plugin - the plugin
Returns:
a collection of subscribers

removeSubscriber

public static void removeSubscriber(int nSubscriberId,
                                    int nAgendaId,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
removes an subscriber's inscription for a calendar

Parameters:
nAgendaId - the calendar identifier
nSubscriberId - the subscriber identifier
plugin - the Plugin

addSubscriber

public static void addSubscriber(int nCalendarId,
                                 int nSubscriberId,
                                 java.sql.Timestamp tToday,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
insert a new subscriber for e calendar

Parameters:
nCalendarId - the calendar identifier
nSubscriberId - the subscriber indentifier
plugin - the Plugin
tToday - the day


Copyright © 2009 Mairie de Paris. All Rights Reserved.