Package lumis.service.newsletter
Class SubscriptionDaoHib
- java.lang.Object
-
- lumis.portal.dao.hibernate.GenericHibernateManualUpdateDao<Subscription,String>
-
- lumis.service.newsletter.SubscriptionDaoHib
-
- All Implemented Interfaces:
ISubscriptionDao
public class SubscriptionDaoHib extends GenericHibernateManualUpdateDao<Subscription,String> implements ISubscriptionDao
- Since:
- 4.0.8
- Version:
- $Revision: 16382 $ $Date: 2014-08-01 19:13:32 -0300 (Fri, 01 Aug 2014) $
-
-
Constructor Summary
Constructors Constructor Description SubscriptionDaoHib()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, Locale locale, ITransaction transaction)
Collection<String>
getCategoriesBySubscriptionId(String subscriptionId, ITransaction transaction)
protected String
getIdentifier(Subscription bean)
Collection<String>
getIdsByServiceInstanceAndEmail(String serviceInstanceId, String email, Locale locale, 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, exists, findByCriteria, findByCriteria, getPersistentClass, setReadOnly, update
-
-
-
-
Method Detail
-
getIdentifier
protected String getIdentifier(Subscription bean)
- Specified by:
getIdentifier
in classGenericHibernateManualUpdateDao<Subscription,String>
-
addOrUpdate
public void addOrUpdate(Subscription bean, ITransaction transaction) throws PortalException
- Specified by:
addOrUpdate
in interfaceISubscriptionDao
- Overrides:
addOrUpdate
in classGenericHibernateManualUpdateDao<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 interfaceISubscriptionDao
- Overrides:
delete
in classGenericHibernateManualUpdateDao<Subscription,String>
- Parameters:
id
- the bean's id.transaction
- the transaction for persistence access. Must be aITransactionHibernate
.- 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 interfaceISubscriptionDao
- Overrides:
get
in classGenericHibernateManualUpdateDao<Subscription,String>
- Parameters:
id
- the bean's id.transaction
- the transaction for persistence access. Must be aITransactionHibernate
.- 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, Locale locale, ITransaction transaction) throws PortalException
- Specified by:
getByEmailFormat
in interfaceISubscriptionDao
- Returns:
- Throws:
PortalException
-
getIdsByServiceInstanceAndEmail
public Collection<String> getIdsByServiceInstanceAndEmail(String serviceInstanceId, String email, Locale locale, 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 interfaceISubscriptionDao
- 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 interfaceISubscriptionDao
- Returns:
- Throws:
PortalException
-
-