Package lumis.service.newsletter
Class SubscriptionDaoHib
- java.lang.Object
-
- lumis.portal.dao.hibernate.GenericHibernateManualUpdateDao<Subscription,java.lang.String>
-
- lumis.service.newsletter.SubscriptionDaoHib
-
- All Implemented Interfaces:
ISubscriptionDao
public class SubscriptionDaoHib extends GenericHibernateManualUpdateDao<Subscription,java.lang.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(java.lang.String id, ITransaction transaction)
Deletes the bean with the given id from persistence.Subscription
get(java.lang.String id, ITransaction transaction)
Returns the bean with the given id.java.util.Collection<java.lang.String>
getByEmailFormat(java.lang.String serviceInstanceId, int emailFormat, java.util.Locale locale, ITransaction transaction)
java.util.Collection<java.lang.String>
getCategoriesBySubscriptionId(java.lang.String subscriptionId, ITransaction transaction)
protected java.lang.String
getIdentifier(Subscription bean)
java.util.Collection<java.lang.String>
getIdsByServiceInstanceAndEmail(java.lang.String serviceInstanceId, java.lang.String email, java.util.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 java.lang.String getIdentifier(Subscription bean)
- Specified by:
getIdentifier
in classGenericHibernateManualUpdateDao<Subscription,java.lang.String>
-
addOrUpdate
public void addOrUpdate(Subscription bean, ITransaction transaction) throws PortalException
- Specified by:
addOrUpdate
in interfaceISubscriptionDao
- Overrides:
addOrUpdate
in classGenericHibernateManualUpdateDao<Subscription,java.lang.String>
- Throws:
PortalException
-
delete
public boolean delete(java.lang.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,java.lang.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(java.lang.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,java.lang.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 java.util.Collection<java.lang.String> getByEmailFormat(java.lang.String serviceInstanceId, int emailFormat, java.util.Locale locale, ITransaction transaction) throws PortalException
- Specified by:
getByEmailFormat
in interfaceISubscriptionDao
- Returns:
- Throws:
PortalException
-
getIdsByServiceInstanceAndEmail
public java.util.Collection<java.lang.String> getIdsByServiceInstanceAndEmail(java.lang.String serviceInstanceId, java.lang.String email, java.util.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 java.util.Collection<java.lang.String> getCategoriesBySubscriptionId(java.lang.String subscriptionId, ITransaction transaction) throws PortalException
- Specified by:
getCategoriesBySubscriptionId
in interfaceISubscriptionDao
- Returns:
- Throws:
PortalException
-
-