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:
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
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected GlobalDescription
getByClassId
(long id) Retrieve the object with a particular id from the database.Find the global description by content type.getGlobalDescriptionById
(long recordId) Returns the global description record by id.Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
applyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getCountResult, getHibernateTemplate, getSessionFactory, publishEvent, reIndex, remove, save, saveEntity, saveRaw, setHibernateTemplate, setSessionFactory, uniqueResult, updateModificationData
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 com.atlassian.confluence.setup.settings.GlobalDescriptionDao
save
-
Constructor Details
-
DefaultGlobalDescriptionDao
public DefaultGlobalDescriptionDao()
-
-
Method Details
-
getByClassId
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
- Specified by:
getPersistentClass
in classHibernateObjectDao<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
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
-