Class SubscriberHome
- java.lang.Object
-
- fr.paris.lutece.plugins.newsletter.business.SubscriberHome
-
public final class SubscriberHome extends java.lang.ObjectThis class provides instacnes management methods (create, find, ...) for Subscriber objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Subscribercreate(Subscriber subscriber, fr.paris.lutece.portal.service.plugin.Plugin plugin)Create an instance of the Subscriber classstatic java.util.Collection<Subscriber>findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)static SubscriberfindByEmail(java.lang.String strEmail, fr.paris.lutece.portal.service.plugin.Plugin plugin)Returns a subscriber object from the emailstatic SubscriberfindByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Returns an object Subscriber from its identifierstatic intfindNewsLetters(int nSubscriberId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Returns, for a subscriber, the number of his subscriptionsstatic java.util.Collection<Subscriber>findSubscribers(int nNewsLetterId, int nBegin, int nEnd, fr.paris.lutece.portal.service.plugin.Plugin plugin)loads the list of subscribers for a newsletterstatic java.util.Collection<Subscriber>findSubscribers(int nNewsLetterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)loads the list of subscribers for a newsletterstatic java.util.Collection<Subscriber>findSubscribers(int nNewsLetterId, java.lang.String strSearchString, int nBegin, int nEnd, fr.paris.lutece.portal.service.plugin.Plugin plugin)loads the list of subscribers for a newsletterstatic java.util.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 newsletterstatic java.util.Collection<Subscriber>getSubscribersList(fr.paris.lutece.portal.service.plugin.Plugin plugin)loads the list of subscribersstatic voidremove(int nSubscriberId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove the subscriber whose identifier is specified in parameter
-
-
-
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 databaseplugin- 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 identifierplugin- 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 subscriberplugin- the plugin- Returns:
- an instance of the class
-
findAll
public static java.util.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(java.lang.String strEmail, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns a subscriber object from the email- Parameters:
strEmail- the subscriber's emailplugin- the plugin- Returns:
- a subscriber object if it exists, null if not
-
findSubscribers
public static java.util.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 identifiernBegin- the rank of the first subscriber to returnnEnd- the maximum number of suscribers to returnplugin- the plugin- Returns:
- a collection of subscribers
-
findSubscribersForSending
public static java.util.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 newsletternBegin- The begin index of subscribers to getnEnd- The end index of subscribers to getplugin- The plugin- Returns:
- The collection of subscribers found
-
findSubscribers
public static java.util.Collection<Subscriber> findSubscribers(int nNewsLetterId, java.lang.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 identifierstrSearchString- gets all the subscribers if null or empty and gets the subscribers whith an email containing this string otherwisenBegin- the rank of the first subscriber to returnnEnd- the maximum number of suscribers to returnplugin- the plugin- Returns:
- a collection of subscribers
-
findSubscribers
public static java.util.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 identifierplugin- 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 identifierplugin- the plugin- Returns:
- the number of subscriptions
-
getSubscribersList
public static java.util.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
-
-