org.ikasan.framework.systemevent.dao
Class HibernateSystemEventDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by org.ikasan.framework.systemevent.dao.HibernateSystemEventDao
All Implemented Interfaces:
SystemEventDao, org.springframework.beans.factory.InitializingBean

public class HibernateSystemEventDao
extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
implements SystemEventDao

Hibernate implementation of SystemEventDao Note that can be configured to housekeep either simply, or in batches.

Author:
Ikasan Development Team

Constructor Summary
HibernateSystemEventDao()
          Constructor
HibernateSystemEventDao(boolean batchHousekeepDelete, Integer housekeepingBatchSize)
          Constructor
 
Method Summary
 void deleteExpired()
          Deletes all expired system events
 PagedSearchResult<SystemEvent> find(int pageNo, int pageSize, String orderBy, boolean orderAscending, String subject, String action, Date timestampFrom, Date timestampTo, String actor)
          Performs a paged search for SystemEvents restricting by criteria fields as supplied
 void save(SystemEvent systemEvent)
          Persists a new system event
 
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateSystemEventDao

public HibernateSystemEventDao(boolean batchHousekeepDelete,
                               Integer housekeepingBatchSize)
Constructor

Parameters:
batchHousekeepDelete - - pass true if you want to use batch deleting
housekeepingBatchSize - - batch size, only respected if set to use batching

HibernateSystemEventDao

public HibernateSystemEventDao()
Constructor

Method Detail

save

public void save(SystemEvent systemEvent)
Description copied from interface: SystemEventDao
Persists a new system event

Specified by:
save in interface SystemEventDao

find

public PagedSearchResult<SystemEvent> find(int pageNo,
                                           int pageSize,
                                           String orderBy,
                                           boolean orderAscending,
                                           String subject,
                                           String action,
                                           Date timestampFrom,
                                           Date timestampTo,
                                           String actor)
Description copied from interface: SystemEventDao
Performs a paged search for SystemEvents restricting by criteria fields as supplied

Specified by:
find in interface SystemEventDao
Parameters:
pageNo - - page control field - page no of results to return
pageSize - - page control field - size of page
orderBy - - page control - field to order by
orderAscending - - page control field - true/false results in ascending order with respect to orderBy field
subject - - criteria field - filter for exact match on subject
action - - criteria field - filter for exact match on action
timestampFrom - - criteria field - filter for events with timestamp greater than this value
timestampTo - - criteria field - filter for events with timestamp less than this value
actor - - criteria field - filter for exact match on actor
Returns:
PagedSearchResult - page friendly search result subset

deleteExpired

public void deleteExpired()
Description copied from interface: SystemEventDao
Deletes all expired system events

Specified by:
deleteExpired in interface SystemEventDao


Copyright © 2007-2012 Ikasan. All Rights Reserved.