lumis.service.newsletter
Class ScheduleDaoHib

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

public class ScheduleDaoHib
extends GenericHibernateManualUpdateDao<Schedule,String>
implements IScheduleDao

Since:
4.0.8

Constructor Summary
ScheduleDaoHib()
           
 
Method Summary
 void addOrUpdate(Schedule schedule, ITransaction transaction)
          Adds or updates a Schedule
 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 objects
 Schedule getForProcess(String scheduleId)
          Gets a Schedule object setting it's status to Schedule#STATUS_PROCESSING.
protected  String getIdentifier(Schedule schedule)
           
 void releaseFromProcess(String scheduleId)
          Set a schedule status from Schedule#STATUS_PROCESSING to Schedule.STATUS_ENABLED.
 
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

ScheduleDaoHib

public ScheduleDaoHib()
Method Detail

getIdentifier

protected String getIdentifier(Schedule schedule)
Specified by:
getIdentifier in class GenericHibernateManualUpdateDao<Schedule,String>

addOrUpdate

public void addOrUpdate(Schedule schedule,
                        ITransaction transaction)
                 throws DaoException,
                        PortalException
Description copied from interface: IScheduleDao
Adds or updates a Schedule

Specified by:
addOrUpdate in interface IScheduleDao
Overrides:
addOrUpdate in class GenericHibernateManualUpdateDao<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 interface IScheduleDao
Overrides:
get in class GenericHibernateManualUpdateDao<Schedule,String>
Parameters:
scheduleId - the bean's id.
transaction - the transaction for persistence access. Must be a ITransactionHibernate.
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 interface IScheduleDao
Overrides:
delete in class GenericHibernateManualUpdateDao<Schedule,String>
Parameters:
scheduleId - 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:
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 interface IScheduleDao
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 to Schedule#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 interface IScheduleDao
Returns:
Throws:
DaoException
PortalException

releaseFromProcess

public void releaseFromProcess(String scheduleId)
                        throws DaoException,
                               PortalException
Description copied from interface: IScheduleDao
Set a schedule status from Schedule#STATUS_PROCESSING to Schedule.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 interface IScheduleDao
Throws:
DaoException
PortalException


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