Class PluginContentHibernateDao
java.lang.Object
org.springframework.dao.support.DaoSupport
com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao<CustomContentEntityObject>
com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao<CustomContentEntityObject>
com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao<CustomContentEntityObject>
com.atlassian.confluence.content.persistence.hibernate.PluginContentHibernateDao
- All Implemented Interfaces:
CustomContentDao,org.springframework.beans.factory.InitializingBean
public class PluginContentHibernateDao
extends VersionedHibernateObjectDao<CustomContentEntityObject>
implements CustomContentDao
Hibernate Implementation of the CustomContentDao
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
HibernateObjectDao.Cacheability, HibernateObjectDao.HibernateOperations -
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcountAllByPluginModuleKeys(Collection<String> pluginModuleKeys) Count CustomContentEntityObjects by multiple plugin module keys across all spaces.longcountAllInSpaceByPluginModuleKeys(Collection<String> pluginModuleKeys, long spaceId) Count CustomContentEntityObjects by multiple plugin module keys within a specific space.longcountChildrenOfType(long parentId, String pluginModuleKey) Retrieves an iterator ofCustomContentEntityObjectwith the specified pluginContentKeyfindAllChildren(long parentId) Retrieves all children of the specified content.findAllContainedOfType(long containerContentId, String pluginContentKey) findAllInSpace(long spaceId) findAllInSpace(String pluginModuleKey, long spaceId) findAllInSpaceWithAttachments(long spaceId) findAllInSpaceWithAttachments(String pluginModuleKey, long spaceId) findAllWithAttachments(String pluginContentKey) Retrieves an iterator ofCustomContentEntityObjectwith the specified pluginContentKey.findByPluginModuleKeys(Collection<String> pluginModuleKeys, LimitedRequest limitedRequest) Find CustomContentEntityObjects by multiple plugin module keys across all spaces with cursor support.<T> List<T> findByQuery(ContentQuery<T> contentQuery, boolean cacheable, LimitedRequest limitedRequest) <T> Iterator<T> findByQuery(ContentQuery<T> contentQuery, int offset, int maxResults) findChildrenOfType(long parentId, String pluginModuleKey, int offset, int maxResults, CustomContentManager.SortField sortField, CustomContentManager.SortOrder sortOrder) findCurrentInSpace(long spaceId, String pluginModuleKey, int offset, int maxResults, CustomContentManager.SortField sortField, CustomContentManager.SortOrder sortOrder) findInSpaceByPluginModuleKeys(Collection<String> pluginModuleKeys, long spaceId, LimitedRequest limitedRequest) Find CustomContentEntityObjects by multiple plugin module keys within a specific space with cursor support.intfindTotalInSpace(long spaceId, String pluginModuleKey) getById(long id) protected void<T,R> R query(ContentQuery<T> contentQuery, int offset, int maxResults, Function<org.hibernate.query.Query<T>, R> f) <T> List<T> queryForList(ContentQuery<T> contentQuery) It is strongly recommended that theCustomContentDao.queryForList(ContentQuery, int, int)method be used in preference to this one, as this method does not apply pagination limits to the result set.<T> List<T> queryForList(ContentQuery<T> contentQuery, int offset, int maxResults) voidsetDatabaseCapabilities(HibernateDatabaseCapabilities databaseCapabilities) Deprecated, for removal: This API element is subject to removal in a future version.since 10.1voidsetEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher) voidsetPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor) Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
applyChildVersioningPolicy, findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, findLatestVersionsIterator, findNamedQueryStringParams, remove, saveMethods inherited from class com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao
findNamedQueryStringParams, getContentStatusStringList, getStatusNames, scanFilteredContents, scanFilteredContents, updateModificationDataMethods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, getCountResult, getHibernateTemplate, getSessionFactory, hibernate, reIndex, save, saveEntity, saveRaw, setHibernateTemplate, setSessionFactory, uniqueResultMethods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
-
Constructor Details
-
PluginContentHibernateDao
public PluginContentHibernateDao()
-
-
Method Details
-
getPersistentClass
- Specified by:
getPersistentClassin classHibernateObjectDao<CustomContentEntityObject>
-
setPluginAccessor
public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor) -
setDatabaseCapabilities
@Deprecated(forRemoval=true) public void setDatabaseCapabilities(HibernateDatabaseCapabilities databaseCapabilities) Deprecated, for removal: This API element is subject to removal in a future version.since 10.1- Since:
- 7.13.17
-
findByQuery
- Specified by:
findByQueryin interfaceCustomContentDao
-
queryForList
- Specified by:
queryForListin interfaceCustomContentDao- Since:
- 7.14
-
query
public <T,R> R query(ContentQuery<T> contentQuery, int offset, int maxResults, Function<org.hibernate.query.Query<T>, R> f) -
queryForList
Description copied from interface:CustomContentDaoIt is strongly recommended that theCustomContentDao.queryForList(ContentQuery, int, int)method be used in preference to this one, as this method does not apply pagination limits to the result set. This can result in excessive memory pressure. This method should only be used when the query is self-limiting, or when the size of the result set is otherwise known in advance.- Specified by:
queryForListin interfaceCustomContentDao- Since:
- 7.16
-
findByQuery
public <T> List<T> findByQuery(ContentQuery<T> contentQuery, boolean cacheable, LimitedRequest limitedRequest) - Specified by:
findByQueryin interfaceCustomContentDao
-
findTotalInSpace
- Specified by:
findTotalInSpacein interfaceCustomContentDao
-
findCurrentInSpace
public Iterator<CustomContentEntityObject> findCurrentInSpace(long spaceId, String pluginModuleKey, int offset, int maxResults, CustomContentManager.SortField sortField, CustomContentManager.SortOrder sortOrder) - Specified by:
findCurrentInSpacein interfaceCustomContentDao
-
findAllInSpaceWithAttachments
public Iterator<CustomContentEntityObject> findAllInSpaceWithAttachments(String pluginModuleKey, long spaceId) - Specified by:
findAllInSpaceWithAttachmentsin interfaceCustomContentDao
-
findAllInSpace
- Specified by:
findAllInSpacein interfaceCustomContentDao
-
findByPluginModuleKeys
public Iterator<CustomContentEntityObject> findByPluginModuleKeys(Collection<String> pluginModuleKeys, LimitedRequest limitedRequest) Description copied from interface:CustomContentDaoFind CustomContentEntityObjects by multiple plugin module keys across all spaces with cursor support.- Specified by:
findByPluginModuleKeysin interfaceCustomContentDao- Parameters:
pluginModuleKeys- collection of plugin module keys to search forlimitedRequest- request with cursor and limit information- Returns:
- iterator of matching CustomContentEntityObjects
-
findInSpaceByPluginModuleKeys
public Iterator<CustomContentEntityObject> findInSpaceByPluginModuleKeys(Collection<String> pluginModuleKeys, long spaceId, LimitedRequest limitedRequest) Description copied from interface:CustomContentDaoFind CustomContentEntityObjects by multiple plugin module keys within a specific space with cursor support.- Specified by:
findInSpaceByPluginModuleKeysin interfaceCustomContentDao- Parameters:
pluginModuleKeys- collection of plugin module keys to search forspaceId- the space ID to search withinlimitedRequest- request with cursor and limit information- Returns:
- iterator of matching CustomContentEntityObjects
-
findAllInSpaceWithAttachments
- Specified by:
findAllInSpaceWithAttachmentsin interfaceCustomContentDao
-
findAllInSpace
- Specified by:
findAllInSpacein interfaceCustomContentDao
-
findAll
Description copied from interface:CustomContentDaoRetrieves an iterator ofCustomContentEntityObjectwith the specified pluginContentKey- Specified by:
findAllin interfaceCustomContentDao- Parameters:
pluginContentKey- CustomContentEntityObject with this plugin content key will be returned- Returns:
- iterator of
CustomContentEntityObject
-
findAllWithAttachments
Description copied from interface:CustomContentDaoRetrieves an iterator ofCustomContentEntityObjectwith the specified pluginContentKey. We are loading- Specified by:
findAllWithAttachmentsin interfaceCustomContentDao- Parameters:
pluginContentKey- CustomContentEntityObject with this plugin content key will be returned- Returns:
- iterator of
CustomContentEntityObject
-
findAllChildren
Description copied from interface:CustomContentDaoRetrieves all children of the specified content.- Specified by:
findAllChildrenin interfaceCustomContentDao- Parameters:
parentId- children of this content entity will be returned- Returns:
- iterator of
CustomContentEntityObject
-
findChildrenOfType
public Iterator<CustomContentEntityObject> findChildrenOfType(long parentId, String pluginModuleKey, int offset, int maxResults, CustomContentManager.SortField sortField, CustomContentManager.SortOrder sortOrder) - Specified by:
findChildrenOfTypein interfaceCustomContentDao
-
countChildrenOfType
- Specified by:
countChildrenOfTypein interfaceCustomContentDao
-
findAllContainedOfType
public Iterator<CustomContentEntityObject> findAllContainedOfType(long containerContentId, String pluginContentKey) - Specified by:
findAllContainedOfTypein interfaceCustomContentDao
-
countAllByPluginModuleKeys
Description copied from interface:CustomContentDaoCount CustomContentEntityObjects by multiple plugin module keys across all spaces.- Specified by:
countAllByPluginModuleKeysin interfaceCustomContentDao- Parameters:
pluginModuleKeys- collection of plugin module keys to count- Returns:
- total count of matching CustomContentEntityObjects
-
countAllInSpaceByPluginModuleKeys
Description copied from interface:CustomContentDaoCount CustomContentEntityObjects by multiple plugin module keys within a specific space.- Specified by:
countAllInSpaceByPluginModuleKeysin interfaceCustomContentDao- Parameters:
pluginModuleKeys- collection of plugin module keys to countspaceId- the space ID to search within- Returns:
- total count of matching CustomContentEntityObjects in the space
-
getById
- Specified by:
getByIdin interfaceCustomContentDao
-
setEventPublisher
public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher) -
publishEvent
- Overrides:
publishEventin classHibernateObjectDao<CustomContentEntityObject>
-