com.atlassian.confluence.core.persistence.hibernate
Class VersionedHibernateObjectDao<T extends com.atlassian.core.bean.EntityObject>

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.hibernate.HibernateObjectDao
              extended by com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao<T>
All Implemented Interfaces:
ObjectDao, VersionedObjectDao, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
AbstractHibernateAttachmentDao, ConfluenceHibernateObjectDao, ContentEntityObjectHibernateDao, ContentPermissionHibernateDao, GenericHibernateVersionedObjectDao, HibernateSpacePermissionDao

public abstract class VersionedHibernateObjectDao<T extends com.atlassian.core.bean.EntityObject>
extends HibernateObjectDao
implements VersionedObjectDao


Field Summary
protected  com.atlassian.cache.CacheFactory cacheFactory
           
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
VersionedHibernateObjectDao()
           
 
Method Summary
 List<T> findAllSorted(String sortField)
          Find all objects currently persisted of a particular type and sort results by named property.
 long findLatestVersionsCount()
          Returns the number of results for the latest versions of the current persistent class.
 Iterator<T> findLatestVersionsIterator()
          Returns an iterator for the latest versions of the current persistent class.
 void save(com.atlassian.core.bean.EntityObject objectToSave, com.atlassian.core.bean.EntityObject previousVersion)
           
 void setCacheFactory(com.atlassian.cache.CacheFactory cacheFactory)
           
protected  void updateModificationData(com.atlassian.core.bean.EntityObject objectToSave)
          Perform any modifications that need to be done to an object every time it is saved.
 
Methods inherited from class com.atlassian.hibernate.HibernateObjectDao
findAll, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, getCountResult, index, refresh, reIndex, remove, replicate, save, saveRaw, setIndexer, unIndex
 
Methods inherited from class org.springframework.orm.hibernate.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
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
 

Field Detail

cacheFactory

protected com.atlassian.cache.CacheFactory cacheFactory
Constructor Detail

VersionedHibernateObjectDao

public VersionedHibernateObjectDao()
Method Detail

findLatestVersionsIterator

public Iterator<T> findLatestVersionsIterator()
Description copied from interface: VersionedObjectDao
Returns an iterator for the latest versions of the current persistent class.

Specified by:
findLatestVersionsIterator in interface VersionedObjectDao
Returns:
Iterator

findLatestVersionsCount

public long findLatestVersionsCount()
Description copied from interface: VersionedObjectDao
Returns the number of results for the latest versions of the current persistent class.

Specified by:
findLatestVersionsCount in interface VersionedObjectDao
Returns:
a long representing the number of results

findAllSorted

public List<T> findAllSorted(String sortField)
Description copied from interface: ObjectDao
Find all objects currently persisted of a particular type and sort results by named property.

Specified by:
findAllSorted in interface ObjectDao
Overrides:
findAllSorted in class HibernateObjectDao
Parameters:
sortField - the name of the property to be sorted on. This should be null if no sorting is required.

save

public void save(com.atlassian.core.bean.EntityObject objectToSave,
                 com.atlassian.core.bean.EntityObject previousVersion)
Specified by:
save in interface VersionedObjectDao

updateModificationData

protected void updateModificationData(com.atlassian.core.bean.EntityObject objectToSave)
Description copied from class: HibernateObjectDao
Perform any modifications that need to be done to an object every time it is saved. The default implementation updates the last-modified timestamp, and sets the creation timestamp if it has not yet been set.

Overrides:
updateModificationData in class HibernateObjectDao
Parameters:
objectToSave - the object that is about to be saved

setCacheFactory

public void setCacheFactory(com.atlassian.cache.CacheFactory cacheFactory)


Copyright © 2003-2012 Atlassian. All Rights Reserved.