net.sf.sail.webapp.dao.impl
Class AbstractHibernateDao<T>

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by net.sf.sail.webapp.dao.impl.AbstractHibernateDao<T>
All Implemented Interfaces:
SimpleDao<T>, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
HibernateAclEntryDao, HibernateAclSidDao, HibernateAclTargetObjectDao, HibernateAclTargetObjectIdentityDao, HibernateAnnotationBundleDao, HibernateAnnouncementDao, HibernateAnswerDao, HibernateBrainstormDao, HibernateCurnitDao, HibernateDIYProjectCommunicatorDao, HibernateGrantedAuthorityDao, HibernateGroupDao, HibernateJnlpDao, HibernateMessageDao, HibernateModuleDao, HibernateNewsItemDao, HibernateOfferingDao, HibernatePortalDao, HibernatePortalStatisticsDao, HibernatePremadeCommentDao, HibernatePremadeCommentListDao, HibernateProjectDao, HibernateRunDao, HibernateStudentAttendanceDao, HibernateTagDao, HibernateUserDao, HibernateUserDetailsDao, HibernateWISEWorkgroupDao, HibernateWorkgroupDao, RooloLOROtmlModuleDao, RooloOtmlModuleDao

public abstract class AbstractHibernateDao<T>
extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
implements SimpleDao<T>

Version:
$Id$
Author:
Cynick Young

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
AbstractHibernateDao()
           
 
Method Summary
 void delete(T object)
          Deletes the object from a persistent data store.
 T getById(Serializable id)
          Retrieves a single object from persistent data store based on the primary key.
protected abstract  Class<? extends T> getDataObjectClass()
          Gets the class of the persistent entity.
protected abstract  String getFindAllQuery()
          Gets a string that will perform a query to retrieve all available objects from the persistent data store.
 List<T> getList()
          Gets a list of objects from a persistent data store.
 void save(T object)
          Saves the object to a persistent data store.
 
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

AbstractHibernateDao

public AbstractHibernateDao()
Method Detail

delete

public void delete(T object)
Description copied from interface: SimpleDao
Deletes the object from a persistent data store.

Specified by:
delete in interface SimpleDao<T>
See Also:
SimpleDao.delete(java.lang.Object)

save

public void save(T object)
Description copied from interface: SimpleDao
Saves the object to a persistent data store.

Specified by:
save in interface SimpleDao<T>
See Also:
SimpleDao.save(java.lang.Object)

getList

public List<T> getList()
Description copied from interface: SimpleDao
Gets a list of objects from a persistent data store.

Specified by:
getList in interface SimpleDao<T>
Returns:
List of objects
See Also:
SimpleDao.getList()

getFindAllQuery

protected abstract String getFindAllQuery()
Gets a string that will perform a query to retrieve all available objects from the persistent data store.

Returns:
String query

getById

public T getById(Serializable id)
          throws ObjectNotFoundException
Description copied from interface: SimpleDao
Retrieves a single object from persistent data store based on the primary key.

Specified by:
getById in interface SimpleDao<T>
Parameters:
id - The id of the object you are retrieving.
Returns:
The object.
Throws:
ObjectNotFoundException
See Also:
net.sf.sail.webapp.dao.SimpleDao#getById(java.lang.Integer)

getDataObjectClass

protected abstract Class<? extends T> getDataObjectClass()
Gets the class of the persistent entity.

Returns:
the Class


Copyright © 2012. All Rights Reserved.