public abstract class VersionedHibernateObjectDao<T extends com.atlassian.core.bean.EntityObject> extends HibernateObjectDao<T> implements VersionedObjectDaoInternal<T>
HibernateObjectDao.Cacheability| Modifier and Type | Field and Description |
|---|---|
protected com.atlassian.cache.CacheFactory |
cacheFactory |
protected ConfluenceUserDao |
confluenceUserDao |
| Constructor and Description |
|---|
VersionedHibernateObjectDao() |
| Modifier and Type | Method and Description |
|---|---|
@NonNull 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.
|
protected long |
findLatestVersionsCount(String... statuses) |
Iterator<T> |
findLatestVersionsIterator()
Returns an iterator for the latest versions of the current
persistent class.
|
protected Iterator<T> |
findLatestVersionsIterator(String... statuses) |
protected List |
findNamedQueryStringParams(String queryName,
boolean cacheable,
LimitedRequest limitedRequest,
Object... paramNamesAndValues)
Deprecated.
since 5.8 Use the equivalent method that uses the
Cacheability enum instead of the cacheable boolean flag |
protected List |
findNamedQueryStringParams(String queryName,
HibernateObjectDao.Cacheability cacheability,
LimitedRequest limitedRequest,
Object... paramNamesAndValues)
This method here instead of in
HibernateObjectDao in bucket because we don't want to update bucket right now. |
void |
save(com.atlassian.core.bean.EntityObject objectToSave,
com.atlassian.core.bean.EntityObject previousVersion)
Deprecated.
since 6.10.0. Use
saveEntity(EntityObject, EntityObject) instead. |
void |
saveEntity(T objectToSave,
T previousVersion)
Saves the given current object and historical object.
|
void |
setCacheFactory(com.atlassian.cache.CacheFactory cacheFactory)
Deprecated.
since 5.10. Subclasses should implement this themselves.
|
void |
setConfluenceUserDao(ConfluenceUserDao confluenceUserDao)
Deprecated.
since 5.10. Subclasses should implement this themselves.
|
protected void |
updateEntityModificationData(T objectToSave) |
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.
|
applyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findByClassIds, findByClassIdsFiltered, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, getCountResult, getHibernateTemplate, getSession, getSessionFactory, index, indexEntity, refresh, refreshEntity, reIndex, reIndexEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntity, setEventPublisher, setHibernateTemplate, setIndexer, setSessionFactory, unIndex, unIndexEntity, uniqueResultclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindAll, findAllSorted, findByClassIds, findByClassIdsFiltered, getPersistentClass, refresh, refreshEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntityprotected com.atlassian.cache.CacheFactory cacheFactory
protected ConfluenceUserDao confluenceUserDao
public Iterator<T> findLatestVersionsIterator()
VersionedObjectDaofindLatestVersionsIterator in interface VersionedObjectDao<T extends com.atlassian.core.bean.EntityObject>public long findLatestVersionsCount()
VersionedObjectDaofindLatestVersionsCount in interface VersionedObjectDao<T extends com.atlassian.core.bean.EntityObject>protected long findLatestVersionsCount(String... statuses)
public @NonNull List<T> findAllSorted(String sortField)
ObjectDaoInternalfindAllSorted in interface ObjectDaofindAllSorted in interface ObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>findAllSorted in class HibernateObjectDao<T extends com.atlassian.core.bean.EntityObject>sortField - the name of the property to be sorted on. This should be null if no sorting is required.public void saveEntity(T objectToSave, T previousVersion)
VersionedObjectDaoInternalsaveEntity in interface VersionedObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>objectToSave - the current object.previousVersion - the original object. This will be mutated to become a historical version as part of this save.@Deprecated public void save(com.atlassian.core.bean.EntityObject objectToSave, com.atlassian.core.bean.EntityObject previousVersion)
saveEntity(EntityObject, EntityObject) instead.VersionedObjectDaosave in interface VersionedObjectDao<T extends com.atlassian.core.bean.EntityObject>objectToSave - the current object.previousVersion - the original object. This will be mutated to become a historical version as part of this save.protected void updateModificationData(com.atlassian.core.bean.EntityObject objectToSave)
HibernateObjectDaoupdateModificationData in class HibernateObjectDao<T extends com.atlassian.core.bean.EntityObject>objectToSave - the object that is about to be savedprotected void updateEntityModificationData(T objectToSave)
updateEntityModificationData in class HibernateObjectDao<T extends com.atlassian.core.bean.EntityObject>@Deprecated protected List findNamedQueryStringParams(String queryName, boolean cacheable, LimitedRequest limitedRequest, Object... paramNamesAndValues)
Cacheability enum instead of the cacheable boolean flagprotected List findNamedQueryStringParams(String queryName, HibernateObjectDao.Cacheability cacheability, LimitedRequest limitedRequest, Object... paramNamesAndValues)
HibernateObjectDao in bucket because we don't want to update bucket right now.@Deprecated public void setCacheFactory(com.atlassian.cache.CacheFactory cacheFactory)
@Deprecated public void setConfluenceUserDao(ConfluenceUserDao confluenceUserDao)
Copyright © 2003–2022 Atlassian. All rights reserved.