Class DefaultGlobalDescriptionDao
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao<GlobalDescription>
-
- com.atlassian.confluence.setup.settings.DefaultGlobalDescriptionDao
-
- All Implemented Interfaces:
ObjectDao,ObjectDaoInternal<GlobalDescription>,GlobalDescriptionDaoInternal,GlobalDescriptionDao,org.springframework.beans.factory.InitializingBean
public class DefaultGlobalDescriptionDao extends HibernateObjectDao<GlobalDescription> implements GlobalDescriptionDaoInternal
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
HibernateObjectDao.Cacheability
-
-
Constructor Summary
Constructors Constructor Description DefaultGlobalDescriptionDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected GlobalDescriptiongetByClassId(long id)Retrieve the object with a particular id from the database.GlobalDescriptiongetGlobalDescription()Find the global description by content type.GlobalDescriptiongetGlobalDescriptionById(long recordId)Returns the global description record by id.Class<GlobalDescription>getPersistentClass()Gets the type ofEntityObjectthis Dao works with.-
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
applyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findAllSorted, findByClassIds, findByClassIdsFiltered, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getCountResult, getHibernateTemplate, getSessionFactory, index, indexEntity, refresh, refreshEntity, reIndex, reIndexEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntity, setEventPublisher, setHibernateTemplate, setIndexer, setSessionFactory, unIndex, unIndexEntity, uniqueResult, updateEntityModificationData, updateModificationData
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.internal.persistence.ObjectDaoInternal
findAll, findAllSorted, findAllSorted, findByClassIds, findByClassIdsFiltered, refresh, refreshEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntity
-
-
-
-
Method Detail
-
getByClassId
protected GlobalDescription getByClassId(long id)
Description copied from class:HibernateObjectDaoRetrieve the object with a particular id from the database. The object must be of the same class as the DAO's getPersistentClass() method returns.- Overrides:
getByClassIdin classHibernateObjectDao<GlobalDescription>- Parameters:
id- the id of the object to look up- Returns:
- the corresponding object, or null if the object does not exist with the appropriate class and id.
-
getPersistentClass
public Class<GlobalDescription> getPersistentClass()
Description copied from interface:ObjectDaoInternalGets the type ofEntityObjectthis Dao works with.- Specified by:
getPersistentClassin interfaceObjectDao- Specified by:
getPersistentClassin interfaceObjectDaoInternal<GlobalDescription>- Returns:
- the type
-
getGlobalDescription
public GlobalDescription getGlobalDescription()
Description copied from interface:GlobalDescriptionDaoFind the global description by content type. Would be extremely slow operation when it is called on a cold instance because it has to scan the entire CONTENT table.- Specified by:
getGlobalDescriptionin interfaceGlobalDescriptionDao- Returns:
- global description record if found or null if not found
-
getGlobalDescriptionById
public GlobalDescription getGlobalDescriptionById(long recordId)
Description copied from interface:GlobalDescriptionDaoReturns the global description record by id. It assumes that the caller knows ID of the global description record (for example, it was stored/cached somewhere else). Note that this method never returns invalid or wrong record. For example, if a record was not found, or a record with a wrong content type is found, this method will return null.- Specified by:
getGlobalDescriptionByIdin interfaceGlobalDescriptionDao- Parameters:
recordId- record id- Returns:
- global description record if found or null if not found
-
-