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 GlobalDescription
getByClassId(long id)
Retrieve the object with a particular id from the database.GlobalDescription
getGlobalDescription()
Find the global description by content type.GlobalDescription
getGlobalDescriptionById(long recordId)
Returns the global description record by id.Class<GlobalDescription>
getPersistentClass()
Gets the type ofEntityObject
this 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:HibernateObjectDao
Retrieve 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:
getByClassId
in 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:ObjectDaoInternal
Gets the type ofEntityObject
this Dao works with.- Specified by:
getPersistentClass
in interfaceObjectDao
- Specified by:
getPersistentClass
in interfaceObjectDaoInternal<GlobalDescription>
- Returns:
- the type
-
getGlobalDescription
public GlobalDescription getGlobalDescription()
Description copied from interface:GlobalDescriptionDao
Find 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:
getGlobalDescription
in interfaceGlobalDescriptionDao
- Returns:
- global description record if found or null if not found
-
getGlobalDescriptionById
public GlobalDescription getGlobalDescriptionById(long recordId)
Description copied from interface:GlobalDescriptionDao
Returns 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:
getGlobalDescriptionById
in interfaceGlobalDescriptionDao
- Parameters:
recordId
- record id- Returns:
- global description record if found or null if not found
-
-