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

java.lang.Object
  extended by fr.paris.lutece.plugins.newsletter.business.SubscriberHome

public final class SubscriberHome
extends Object

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


Method Summary
static Subscriber create(Subscriber subscriber, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Create an instance of the Subscriber class
static Collection<Subscriber> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
static Subscriber findByEmail(String strEmail, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns a subscriber object from the email
static Subscriber findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an object Subscriber from its identifier
static int findNewsLetters(int nSubscriberId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns, for a subscriber, the number of his subscriptions
static Collection<Subscriber> findSubscribers(int nNewsLetterId, int nBegin, int nEnd, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          loads the list of subscribers for a newsletter
static Collection<Subscriber> findSubscribers(int nNewsLetterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          loads the list of subscribers for a newsletter
static Collection<Subscriber> findSubscribers(int nNewsLetterId, String strSearchString, int nBegin, int nEnd, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          loads the list of subscribers for a newsletter
static Collection<Subscriber> findSubscribersForSending(int nNewsLetterId, int nBegin, int nEnd, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find the collection of subscribers to send a newsletter
static Collection<Subscriber> 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static Subscriber create(Subscriber 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

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 Subscriber 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

findAll

public static Collection<Subscriber> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Parameters:
plugin - the plugin
Returns:
a collection of objects Subscriber

findByEmail

public static Subscriber findByEmail(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 Collection<Subscriber> findSubscribers(int nNewsLetterId,
                                                     int nBegin,
                                                     int nEnd,
                                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
loads the list of subscribers for a newsletter

Parameters:
nNewsLetterId - the newsletter 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

findSubscribersForSending

public static Collection<Subscriber> findSubscribersForSending(int nNewsLetterId,
                                                               int nBegin,
                                                               int nEnd,
                                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find the collection of subscribers to send a newsletter

Parameters:
nNewsLetterId - The id of the newsletter
nBegin - The begin index of subscribers to get
nEnd - The end index of subscribers to get
plugin - The plugin
Returns:
The collection of subscribers found

findSubscribers

public static Collection<Subscriber> findSubscribers(int nNewsLetterId,
                                                     String strSearchString,
                                                     int nBegin,
                                                     int nEnd,
                                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
loads the list of subscribers for a newsletter

Parameters:
nNewsLetterId - the newsletter identifier
strSearchString - gets all the subscribers if null or empty and gets the subscribers whith an 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 Collection<Subscriber> findSubscribers(int nNewsLetterId,
                                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
loads the list of subscribers for a newsletter

Parameters:
nNewsLetterId - the newsletter identifier
plugin - the plugin
Returns:
a collection of subscribers

findNewsLetters

public static int findNewsLetters(int nSubscriberId,
                                  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 Collection<Subscriber> getSubscribersList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
loads the list of subscribers

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


Copyright © 2013 Mairie de Paris. All Rights Reserved.