lumis.service.newsletter
Class SubscriptionDaoHib

Package class diagram package SubscriptionDaoHib
java.lang.Object
  extended by lumis.portal.dao.hibernate.GenericHibernateManualUpdateDao<Subscription,String>
      extended by lumis.service.newsletter.SubscriptionDaoHib
All Implemented Interfaces:
ISubscriptionDao

public class SubscriptionDaoHib
extends GenericHibernateManualUpdateDao<Subscription,String>
implements ISubscriptionDao

Since:
4.0.8

Constructor Summary
SubscriptionDaoHib()
           
 
Method Summary
 void addOrUpdate(Subscription bean, ITransaction transaction)
           
 boolean delete(String id, ITransaction transaction)
          Deletes the bean with the given id from persistence.
 Subscription get(String id, ITransaction transaction)
          Returns the bean with the given id.
 Collection<String> getByEmailFormat(String serviceInstanceId, int emailFormat, ITransaction transaction)
           
 Collection<String> getCategoriesBySubscriptionId(String subscriptionId, ITransaction transaction)
           
protected  String getIdentifier(Subscription bean)
           
 Collection<String> getIdsByServiceInstanceAndEmail(String serviceInstanceId, String email, ITransaction transaction)
          Returns the ids of the subscriptions for the given email in the specified service instance id.
 
Methods inherited from class lumis.portal.dao.hibernate.GenericHibernateManualUpdateDao
add, evict, findByCriteria, findByCriteria, getPersistentClass, setReadOnly, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriptionDaoHib

public SubscriptionDaoHib()
Parameters:
persistentClass -
Since:
4.0.8
Method Detail

getIdentifier

protected String getIdentifier(Subscription bean)
Specified by:
getIdentifier in class GenericHibernateManualUpdateDao<Subscription,String>

addOrUpdate

public void addOrUpdate(Subscription bean,
                        ITransaction transaction)
                 throws PortalException
Specified by:
addOrUpdate in interface ISubscriptionDao
Overrides:
addOrUpdate in class GenericHibernateManualUpdateDao<Subscription,String>
Throws:
PortalException

delete

public boolean delete(String id,
                      ITransaction transaction)
               throws PortalException
Description copied from class: GenericHibernateManualUpdateDao
Deletes the bean with the given id from persistence.

Specified by:
delete in interface ISubscriptionDao
Overrides:
delete in class GenericHibernateManualUpdateDao<Subscription,String>
Parameters:
id - the bean's id.
transaction - the transaction for persistence access. Must be a ITransactionHibernate.
Returns:
true if the bean was deleted, or false if it did not exist
Throws:
PortalException

get

public Subscription get(String id,
                        ITransaction transaction)
                 throws PortalObjectNotFoundException,
                        PortalException
Description copied from class: GenericHibernateManualUpdateDao
Returns the bean with the given id. The bean is set as read-only, so changes on it won't persist automatically.

Specified by:
get in interface ISubscriptionDao
Overrides:
get in class GenericHibernateManualUpdateDao<Subscription,String>
Parameters:
id - the bean's id.
transaction - the transaction for persistence access. Must be a ITransactionHibernate.
Returns:
the bean.
Throws:
PortalObjectNotFoundException - if the corresponding bean does not exist in the persistence.
PortalException

getByEmailFormat

public Collection<String> getByEmailFormat(String serviceInstanceId,
                                           int emailFormat,
                                           ITransaction transaction)
                                    throws PortalException
Specified by:
getByEmailFormat in interface ISubscriptionDao
Returns:
Throws:
PortalException

getIdsByServiceInstanceAndEmail

public Collection<String> getIdsByServiceInstanceAndEmail(String serviceInstanceId,
                                                          String email,
                                                          ITransaction transaction)
                                                   throws PortalException
Description copied from interface: ISubscriptionDao
Returns the ids of the subscriptions for the given email in the specified service instance id.

Specified by:
getIdsByServiceInstanceAndEmail in interface ISubscriptionDao
Parameters:
serviceInstanceId - the service instance id.
email - the email.
transaction - the transaction for persistence access.
Returns:
a collection of subscription ids, or an empty collection if none was found.
Throws:
PortalException

getCategoriesBySubscriptionId

public Collection<String> getCategoriesBySubscriptionId(String subscriptionId,
                                                        ITransaction transaction)
                                                 throws PortalException
Specified by:
getCategoriesBySubscriptionId in interface ISubscriptionDao
Returns:
Throws:
PortalException


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.