public abstract class

VersionedHibernateObjectDao

extends HibernateObjectDao
implements VersionedObjectDao
java.lang.Object
   ↳ org.springframework.dao.support.DaoSupport
     ↳ org.springframework.orm.hibernate.support.HibernateDaoSupport
       ↳ com.atlassian.hibernate.HibernateObjectDao
         ↳ com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao<T extends com.atlassian.core.bean.EntityObject>
Known Direct Subclasses
Known Indirect Subclasses

Summary

Fields
protected CacheFactory cacheFactory
[Expand]
Inherited Fields
From class com.atlassian.hibernate.HibernateObjectDao
From class org.springframework.dao.support.DaoSupport
Public Constructors
VersionedHibernateObjectDao()
Public Methods
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(EntityObject objectToSave, EntityObject previousVersion)
void setCacheFactory(CacheFactory cacheFactory)
Protected Methods
void updateModificationData(EntityObject objectToSave)
Perform any modifications that need to be done to an object every time it is saved.
[Expand]
Inherited Methods
From class com.atlassian.hibernate.HibernateObjectDao
From class org.springframework.orm.hibernate.support.HibernateDaoSupport
From class org.springframework.dao.support.DaoSupport
From class java.lang.Object
From interface bucket.core.persistence.ObjectDao
From interface com.atlassian.confluence.core.persistence.VersionedObjectDao
From interface org.springframework.beans.factory.InitializingBean

Fields

protected CacheFactory cacheFactory

Public Constructors

public VersionedHibernateObjectDao ()

Public Methods

public List<T> findAllSorted (String sortField)

Find all objects currently persisted of a particular type and sort results by named property.

Parameters
sortField the name of the property to be sorted on. This should be null if no sorting is required.

public long findLatestVersionsCount ()

Returns the number of results for the latest versions of the current persistent class.

Returns
  • a long representing the number of results

public Iterator<T> findLatestVersionsIterator ()

Returns an iterator for the latest versions of the current persistent class.

Returns
  • Iterator

public void save (EntityObject objectToSave, EntityObject previousVersion)

public void setCacheFactory (CacheFactory cacheFactory)

Protected Methods

protected void updateModificationData (EntityObject objectToSave)

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.

Parameters
objectToSave the object that is about to be saved