Class ReadThroughCachingPageDao
- java.lang.Object
-
- com.atlassian.confluence.pages.persistence.dao.DelegatingPageDao
-
- com.atlassian.confluence.impl.pages.persistence.dao.ReadThroughCachingPageDao
-
- All Implemented Interfaces:
ObjectDao,ContentEntityObjectDao<Page>,VersionedObjectDao<Page>,PageDaoInternal,ContentEntityObjectDaoInternal<Page>,ObjectDaoInternal<Page>,VersionedObjectDaoInternal<Page>,PageDao
public class ReadThroughCachingPageDao extends DelegatingPageDao
This maintains a cache of (space key, page title) -> (page id) mappings. All page ids cached refer to current pages. When a page is marked for deletion, it is removed from this cache.- Since:
- 7.5
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ReadThroughCachingPageDaocreate(PageDaoInternal delegateDao, com.atlassian.cache.CacheFactory cacheFactory)PagegetPage(Space space, String pageTitle)Get the page by space and title.PagegetPageWithComments(Space space, String pageTitle)Get the page by space and title, and perform an eager load of the comments and their children.voidremove(com.atlassian.core.bean.EntityObject object)Remove object from persistence.voidremoveEntity(Page objectToRemove)Remove object from persistence.voidsave(com.atlassian.core.bean.EntityObject objectToSave)voidsave(com.atlassian.core.bean.EntityObject objectToSave, com.atlassian.core.bean.EntityObject originalObject)Saves the given current object and historical objectvoidsaveEntity(Page objectToSave)Saves the given object to the database.voidsaveEntity(Page currentObject, @Nullable Page originalObject)Saves the given current object and historical object.voidsaveRaw(com.atlassian.core.bean.EntityObject objectToSave)saves the object.voidsaveRawEntity(Page objectToSave)Saves the object without updating modification daa.-
Methods inherited from class com.atlassian.confluence.pages.persistence.dao.DelegatingPageDao
countAllPages, countContentBySpaceIdAndStatus, countCurrentPages, countDraftPages, countPagesInSubtree, countPagesWithUnpublishedChanges, findAll, findAllDraftsFor, findAllLegacyDraftsFor, findAllSorted, findAllSorted, findBlogsWithCurrentOrHistoricalTitleInAllPermittedSpacesExcept, findBlogsWithCurrentOrHistoricalTitleInPermittedSpace, findByClassIds, findByClassIdsFiltered, findContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findContentPermissionSummaryByIds, findDraftFor, findDraftsWithUnpublishedChangesForUser, findHistoricalVersionsAfterVersion, findLatestVersionsCount, findLatestVersionsIterator, findPagesWithCurrentOrHistoricalTitleInAllPermittedSpacesExcept, findPagesWithCurrentOrHistoricalTitleInPermittedSpace, findPreviousVersions, findUnpublishedContentWithUserContributions, getAbstractPages, getAbstractPages, getAbstractPages, getAbstractPages, getAbstractPages, getAbstractPagesByCreationDate, getAbstractPagesByTitle, getAllChildren, getAllCurrentEntities, getAllModifiers, getAllModifiers, getAncestorsFor, getAuthoredPagesCountByUser, getBlogPosts, getById, getChildren, getCommentCountOnPage, getContentAuthoredByUser, getContributionStatusByUser, getDelegateDao, getDescendantIds, getDescendantIds, getDescendants, getDescendantTitles, getDraftChildren, getFirstVersionAfter, getFirstVersionBefore, getLastEditedVersionsOf, getMaxSiblingPosition, getObjectType, getOldestPageCreationDate, getOrphanedPages, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getPageById, getPageByIdWithComments, getPageCount, getPageCount, getPageIds, getPageInTrash, getPages, getPages, getPages, getPagesByIds, getPagesCreatedOrUpdatedSinceDate, getPagesStartingWith, getPageStatistics, getPagesWithPermissions, getPermissionPages, getPermissionPages, getPermissionPagesCount, getPersistentClass, getRecentlyAddedEntities, getRecentlyAddedPages, getRecentlyAuthoredPagesByUser, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getRecentlyUpdatedPages, getTopLevelPages, getTopLevelPages, getTrashedContent, getTrashedContents, getTrashedEntities, getUndefinedLinks, getUndefinedPages, getVersion, getVersionEditContributors, getVersionHistorySummary, getVersionHistorySummary, getVersionsLastEditedByUser, getVersionsLastEditedByUserNew, refresh, refreshEntity, replicate, replicateEntity, saveRawWithoutReindex, scanFilteredPages, scanFilteredPages
-
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.core.persistence.ContentEntityObjectDao
getTrashedContents
-
Methods inherited from interface com.atlassian.confluence.internal.persistence.ContentEntityObjectDaoInternal
findContentBySpaceIdAndStatusAndFilter
-
Methods inherited from interface com.atlassian.confluence.internal.pages.persistence.PageDaoInternal
getAbstractPages, getAbstractPages, getAbstractPages, getAbstractPages, getAbstractPages, getAbstractPagesByCreationDate, getAbstractPagesByTitle, getBlogPosts, getChildren, getPages, getPages, getTopLevelPages
-
-
-
-
Method Detail
-
create
public static ReadThroughCachingPageDao create(PageDaoInternal delegateDao, com.atlassian.cache.CacheFactory cacheFactory)
-
getPage
public Page getPage(Space space, String pageTitle)
Description copied from interface:PageDaoGet the page by space and title.- Specified by:
getPagein interfacePageDao- Overrides:
getPagein classDelegatingPageDao- Parameters:
space- The space the page belongs topageTitle- The title of the page- Returns:
- the page with the given title in the given space, or null if no such page exists
-
getPageWithComments
public Page getPageWithComments(Space space, String pageTitle)
Description copied from interface:PageDaoGet the page by space and title, and perform an eager load of the comments and their children. This can be used as a performance optimisation when it is known that all comments will be displayed.- Specified by:
getPageWithCommentsin interfacePageDao- Overrides:
getPageWithCommentsin classDelegatingPageDao- Parameters:
space- The space the page belongs topageTitle- The title of the page- Returns:
- the page with the given title in the given space, or null if no such page exists
-
remove
public void remove(com.atlassian.core.bean.EntityObject object)
Description copied from interface:ObjectDaoRemove object from persistence.- Specified by:
removein interfaceObjectDao- Specified by:
removein interfaceObjectDaoInternal<Page>- Overrides:
removein classDelegatingPageDao
-
removeEntity
public void removeEntity(Page objectToRemove)
Description copied from interface:ObjectDaoInternalRemove object from persistence.- Specified by:
removeEntityin interfaceObjectDaoInternal<Page>- Overrides:
removeEntityin classDelegatingPageDao
-
save
public void save(com.atlassian.core.bean.EntityObject objectToSave, com.atlassian.core.bean.EntityObject originalObject)Description copied from interface:VersionedObjectDaoSaves the given current object and historical object- Specified by:
savein interfaceVersionedObjectDao<Page>- Overrides:
savein classDelegatingPageDao- Parameters:
objectToSave- the current object.originalObject- the original object. This will be mutated to become a historical version as part of this save.
-
saveEntity
public void saveEntity(Page currentObject, @Nullable Page originalObject)
Description copied from interface:VersionedObjectDaoInternalSaves the given current object and historical object.- Specified by:
saveEntityin interfaceVersionedObjectDaoInternal<Page>- Overrides:
saveEntityin classDelegatingPageDao- Parameters:
currentObject- the current object.originalObject- the original object. This will be mutated to become a historical version as part of this save.
-
save
public void save(com.atlassian.core.bean.EntityObject objectToSave)
- Specified by:
savein interfaceObjectDao- Specified by:
savein interfaceObjectDaoInternal<Page>- Overrides:
savein classDelegatingPageDao
-
saveEntity
public void saveEntity(Page objectToSave)
Description copied from interface:ObjectDaoInternalSaves the given object to the database.- Specified by:
saveEntityin interfaceObjectDaoInternal<Page>- Overrides:
saveEntityin classDelegatingPageDao- Parameters:
objectToSave- the object to save.
-
saveRaw
public void saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
Description copied from interface:ObjectDaosaves the object. if the object is new, this won't set the creation date on the object. if it already exists, then it won't set the date that it was updated.- Specified by:
saveRawin interfaceObjectDao- Specified by:
saveRawin interfaceObjectDaoInternal<Page>- Overrides:
saveRawin classDelegatingPageDao- Parameters:
objectToSave- the object to save.
-
saveRawEntity
public void saveRawEntity(Page objectToSave)
Description copied from interface:ObjectDaoInternalSaves the object without updating modification daa.If the object is new, this won't set the creation date on the object. If it already exists, then it won't set the date that it was updated.
- Specified by:
saveRawEntityin interfaceObjectDaoInternal<Page>- Overrides:
saveRawEntityin classDelegatingPageDao- Parameters:
objectToSave- the object to save.
-
-