Class PluginContentHibernateDao
java.lang.Object
org.springframework.dao.support.DaoSupport
com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao<CustomContentEntityObject>
com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao<CustomContentEntityObject>
com.atlassian.confluence.internal.persistence.hibernate.AbstractContentEntityObjectHibernateDao<CustomContentEntityObject>
com.atlassian.confluence.content.persistence.hibernate.PluginContentHibernateDao
- All Implemented Interfaces:
ObjectDao,CustomContentDao,ContentEntityObjectDao<CustomContentEntityObject>,VersionedObjectDao<CustomContentEntityObject>,ContentEntityObjectDaoInternal<CustomContentEntityObject>,ObjectDaoInternal<CustomContentEntityObject>,VersionedObjectDaoInternal<CustomContentEntityObject>,org.springframework.beans.factory.InitializingBean
public class PluginContentHibernateDao
extends AbstractContentEntityObjectHibernateDao<CustomContentEntityObject>
implements CustomContentDao, org.springframework.beans.factory.InitializingBean
Hibernate Implementation of the CustomContentDao
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
HibernateObjectDao.Cacheability -
Field Summary
Fields inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
cacheFactory, confluenceUserDaoFields inherited from class org.springframework.dao.support.DaoSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcountChildrenOfType(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.<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) intfindTotalInSpace(long spaceId, String pluginModuleKey) Gets the type ofEntityObjectthis Dao works with.<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) voidsaveRawWithoutReindex(com.atlassian.core.bean.EntityObject objectToSave) This is for internal use only, Do not rely on it as a public API.voidsetDatabaseCapabilities(HibernateDatabaseCapabilities databaseCapabilities) voidsetPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor) Methods inherited from class com.atlassian.confluence.internal.persistence.hibernate.AbstractContentEntityObjectHibernateDao
countContentBySpaceIdAndStatus, findAllDraftsFor, findAllLegacyDraftsFor, findContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findDraftFor, findDraftsWithUnpublishedChangesForUser, findHistoricalVersionsAfterVersion, findPreviousVersions, findUnpublishedContentWithUserContributions, getAllCurrentEntities, getAllModifiers, getByClassId, getById, getContentAuthoredByUser, getContributionStatusByUser, getFirstVersionAfter, getFirstVersionBefore, getLastEditedVersionsOf, getObjectType, getOldestPageCreationDate, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getPagesByCursor, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getTrashedContent, getTrashedContents, getTrashedContents, getTrashedEntities, getVersion, getVersionEditContributors, getVersionHistorySummary, getVersionHistorySummary, getVersionsLastEditedByUser, getVersionsLastEditedByUserNewMethods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
findAllSorted, findLatestVersionsCount, findLatestVersionsCount, findLatestVersionsIterator, findLatestVersionsIterator, findNamedQueryStringParams, findNamedQueryStringParams, save, saveEntity, setCacheFactory, setConfluenceUserDao, updateEntityModificationData, updateModificationDataMethods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
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, getCountResult, getHibernateTemplate, getSessionFactory, index, indexEntity, refresh, refreshEntity, reIndex, reIndexEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, setEventPublisher, setHibernateTemplate, setSessionFactory, unIndex, unIndexEntity, uniqueResultMethods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDaoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.core.persistence.ContentEntityObjectDao
countContentBySpaceIdAndStatus, findAllDraftsFor, findAllLegacyDraftsFor, findContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findDraftFor, findDraftsWithUnpublishedChangesForUser, findHistoricalVersionsAfterVersion, findPreviousVersions, findUnpublishedContentWithUserContributions, getAllCurrentEntities, getAllModifiers, getAllModifiers, getById, getContentAuthoredByUser, getContributionStatusByUser, getFirstVersionAfter, getFirstVersionBefore, getLastEditedVersionsOf, getObjectType, getOldestPageCreationDate, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getTrashedContent, getTrashedContents, getTrashedContents, getVersion, getVersionEditContributors, getVersionHistorySummary, getVersionHistorySummary, getVersionsLastEditedByUser, getVersionsLastEditedByUserNewMethods inherited from interface com.atlassian.confluence.internal.persistence.ContentEntityObjectDaoInternal
findContentBySpaceIdAndStatusAndFilterMethods inherited from interface org.springframework.beans.factory.InitializingBean
afterPropertiesSetMethods inherited from interface bucket.core.persistence.ObjectDao
refresh, remove, replicate, save, saveRawMethods inherited from interface com.atlassian.confluence.internal.persistence.ObjectDaoInternal
findAll, findAllSorted, findAllSorted, findByClassIds, findByClassIdsFiltered, refreshEntity, removeEntity, replicateEntity, saveEntityMethods inherited from interface com.atlassian.confluence.core.persistence.VersionedObjectDao
findLatestVersionsCount, findLatestVersionsIterator, saveMethods inherited from interface com.atlassian.confluence.internal.persistence.VersionedObjectDaoInternal
saveEntity
-
Constructor Details
-
PluginContentHibernateDao
public PluginContentHibernateDao()
-
-
Method Details
-
getPersistentClass
Description copied from interface:ObjectDaoInternalGets the type ofEntityObjectthis Dao works with.- Specified by:
getPersistentClassin interfaceObjectDao- Specified by:
getPersistentClassin interfaceObjectDaoInternal<CustomContentEntityObject>- Returns:
- the type
-
setPluginAccessor
public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor) -
setDatabaseCapabilities
- 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
-
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
-
saveRawWithoutReindex
public void saveRawWithoutReindex(com.atlassian.core.bean.EntityObject objectToSave) Description copied from interface:ContentEntityObjectDaoInternalThis is for internal use only, Do not rely on it as a public API.
Perform a saveRaw but without performing the re-index; it is unnecessary in the context of a migration or upgrade.
- Specified by:
saveRawWithoutReindexin interfaceContentEntityObjectDaoInternal<CustomContentEntityObject>
-