Package lumis.service.newsletter
Class ScheduleDaoHib
- java.lang.Object
-
- lumis.portal.dao.hibernate.GenericHibernateManualUpdateDao<Schedule,String>
-
- lumis.service.newsletter.ScheduleDaoHib
-
- All Implemented Interfaces:
IScheduleDao
public class ScheduleDaoHib extends GenericHibernateManualUpdateDao<Schedule,String> implements IScheduleDao
- Since:
- 4.0.8
- Version:
- $Revision: 16824 $ $Date: 2015-01-23 18:49:12 -0200 (Fri, 23 Jan 2015) $
-
-
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(String scheduleId, ITransaction transaction)
Deletes the bean with the given id from persistence.Schedule
get(String scheduleId, ITransaction transaction)
Returns the bean with the given id.Collection<String>
getActiveSchedules(String serviceInstanceId, ITransaction transaction)
Get all active schedule objectsSchedule
getForProcess(String scheduleId)
Gets a Schedule object setting it's status toSchedule#STATUS_PROCESSING
.protected String
getIdentifier(Schedule schedule)
void
releaseFromProcess(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 String getIdentifier(Schedule schedule)
- Specified by:
getIdentifier
in classGenericHibernateManualUpdateDao<Schedule,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,String>
- Throws:
DaoException
PortalException
-
get
public Schedule get(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,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(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,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 Collection<String> getActiveSchedules(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(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(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
-
-