Package lumis.service.newsletter
Class ScheduleDaoHib
- java.lang.Object
-
- lumis.portal.dao.hibernate.GenericHibernateManualUpdateDao<Schedule,java.lang.String>
-
- lumis.service.newsletter.ScheduleDaoHib
-
- All Implemented Interfaces:
IScheduleDao
public class ScheduleDaoHib extends GenericHibernateManualUpdateDao<Schedule,java.lang.String> implements IScheduleDao
- Since:
- 4.0.8
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description ScheduleDaoHib()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOrUpdate(Schedule schedule, ITransaction transaction)
Adds or updates aSchedule
boolean
delete(java.lang.String scheduleId, ITransaction transaction)
Deletes the bean with the given id from persistence.Schedule
get(java.lang.String scheduleId, ITransaction transaction)
Returns the bean with the given id.java.util.Collection<java.lang.String>
getActiveSchedules(java.lang.String serviceInstanceId, ITransaction transaction)
Get all active schedule objectsSchedule
getForProcess(java.lang.String scheduleId)
Gets a Schedule object setting it's status toSchedule#STATUS_PROCESSING
.protected java.lang.String
getIdentifier(Schedule schedule)
void
releaseFromProcess(java.lang.String scheduleId)
Set a schedule status fromSchedule#STATUS_PROCESSING
toSchedule.STATUS_ENABLED
.-
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(Schedule schedule)
- Specified by:
getIdentifier
in classGenericHibernateManualUpdateDao<Schedule,java.lang.String>
-
addOrUpdate
public void addOrUpdate(Schedule schedule, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IScheduleDao
Adds or updates aSchedule
- Specified by:
addOrUpdate
in interfaceIScheduleDao
- Overrides:
addOrUpdate
in classGenericHibernateManualUpdateDao<Schedule,java.lang.String>
- Throws:
DaoException
PortalException
-
get
public Schedule get(java.lang.String scheduleId, ITransaction transaction) throws DaoException, 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 interfaceIScheduleDao
- Overrides:
get
in classGenericHibernateManualUpdateDao<Schedule,java.lang.String>
- Parameters:
scheduleId
- the bean's id.transaction
- the transaction for persistence access. Must be aITransactionHibernate
.- Returns:
- the bean.
- Throws:
DaoException
PortalException
-
delete
public boolean delete(java.lang.String scheduleId, ITransaction transaction) throws DaoException, PortalException
Description copied from class:GenericHibernateManualUpdateDao
Deletes the bean with the given id from persistence.- Specified by:
delete
in interfaceIScheduleDao
- Overrides:
delete
in classGenericHibernateManualUpdateDao<Schedule,java.lang.String>
- Parameters:
scheduleId
- 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:
DaoException
PortalException
-
getActiveSchedules
public java.util.Collection<java.lang.String> getActiveSchedules(java.lang.String serviceInstanceId, ITransaction transaction) throws PortalException
Description copied from interface:IScheduleDao
Get all active schedule objects- Specified by:
getActiveSchedules
in interfaceIScheduleDao
- Returns:
- Throws:
PortalException
-
getForProcess
public Schedule getForProcess(java.lang.String scheduleId) throws DaoException, PortalException
Description copied from interface:IScheduleDao
Gets a Schedule object setting it's status toSchedule#STATUS_PROCESSING
. The method creates it's own transaction so there can be no manipulation of data on the specified bean on a active transaction.- Specified by:
getForProcess
in interfaceIScheduleDao
- Returns:
- Throws:
DaoException
PortalException
-
releaseFromProcess
public void releaseFromProcess(java.lang.String scheduleId) throws DaoException, PortalException
Description copied from interface:IScheduleDao
Set a schedule status fromSchedule#STATUS_PROCESSING
toSchedule.STATUS_ENABLED
. The method creates it's own transaction so there can be no manipulation of data on the specified bean on a active transaction.- Specified by:
releaseFromProcess
in interfaceIScheduleDao
- Throws:
DaoException
PortalException
-
-