|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.dao.support.DaoSupport org.springframework.orm.hibernate.support.HibernateDaoSupport com.atlassian.hibernate.HibernateObjectDao com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao com.atlassian.confluence.core.persistence.hibernate.ContentEntityObjectHibernateDao com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao
public class HibernatePageDao
Field Summary |
---|
Fields inherited from class com.atlassian.confluence.core.persistence.hibernate.ContentEntityObjectHibernateDao |
---|
ONE_DAY |
Fields inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao |
---|
cacheFactory, confluenceUserDao |
Fields inherited from class org.springframework.dao.support.DaoSupport |
---|
logger |
Constructor Summary | |
---|---|
HibernatePageDao()
|
Method Summary | |
---|---|
java.util.List<AbstractPage> |
findBlogsWithHistoricalTitleInPermittedSpace(java.lang.String blogTitle,
Space space,
int maxResultCount)
Searches for blogs in the space specified, looking for those that have the given title in a previous version, and returns the first maxResultCount results. |
java.util.List |
findPagesWithHistoricalTitle(java.lang.String pageTitle)
|
java.util.List<AbstractPage> |
findPagesWithHistoricalTitleInAllPermittedSpacesExcept(java.lang.String pageTitle,
Space space,
int maxResultCount)
Searches for pages in all spaces except the one specified, looking for those that have the given title in a previous version, and returns the first maxResultCount results. |
java.util.List<AbstractPage> |
findPagesWithHistoricalTitleInPermittedSpace(java.lang.String pageTitle,
Space space,
int maxResultCount)
Searches for pages in the space specified, looking for those that have the given title in a previous version, and returns the first maxResultCount results. |
PageResponse<AbstractPage> |
getAbstractPagesByCreationDate(org.joda.time.DateTime date,
LimitedRequest pageRequest,
com.google.common.base.Predicate<? super AbstractPage> filter)
Returns the pages and blogposts created on the given date, that also match the given predicate, limited to the page request |
PageResponse<AbstractPage> |
getAbstractPagesByTitle(java.lang.String title,
LimitedRequest limitedRequest,
com.google.common.base.Predicate<? super AbstractPage> filter)
Returns the pages and blogposts that exactly match the given title, limited to the pagination request |
int |
getAuthoredPagesCountByUser(java.lang.String username)
|
PageResponse<BlogPost> |
getBlogPosts(Space space,
LimitedRequest limitedRequest,
com.google.common.base.Predicate<? super BlogPost> predicate)
Retrieve a page of the current blog posts in this space |
PageResponse<Page> |
getChildren(Page page,
LimitedRequest limitedRequest,
com.google.common.base.Predicate<? super Page> predicate,
Depth depth)
|
int |
getCommentCountOnPage(long id)
Count the number of comments on the passed in page. |
java.util.List<java.lang.Long> |
getDescendentIds(Page page)
|
java.util.List<Page> |
getDescendents(Page page)
|
java.lang.Integer |
getMaxSiblingPosition(Page page)
Gets the highest position value of all the page's siblings. |
java.util.Date |
getOldestPageCreationDate()
Gets the creation date of the oldest page. |
java.util.List<Page> |
getOrphanedPages(java.lang.String spaceKey)
|
Page |
getPage(Space space,
java.lang.String pageTitle)
Get the page by space and title. |
Page |
getPage(Space space,
java.lang.String pageTitle,
boolean eagerLoadComments)
|
Page |
getPageById(long id)
Get the page with the given id. |
Page |
getPageByIdWithComments(long id)
Get the page with the given id, and perform an eager load of the comments and their children. |
java.util.Collection<java.lang.Long> |
getPageIds(Space space)
Get the ids of all pages (current and historical) in the given space. |
java.util.List<Page> |
getPageInTrash(java.lang.String spaceKey,
java.lang.String title)
|
PageResponse<Page> |
getPages(LimitedRequest limitedRequest,
com.google.common.base.Predicate<? super Page> predicate)
Retrieve a page of all the current content |
java.util.List<Page> |
getPages(Space space,
boolean currentOnly)
|
PageResponse<Page> |
getPages(Space space,
LimitedRequest limitedRequest,
com.google.common.base.Predicate<? super Page> predicate)
Retrieve a page of the current content in this space |
java.util.List<Page> |
getPagesByIds(java.lang.Iterable<java.lang.Long> ids)
Get the pages with the given ids. |
java.util.List<Page> |
getPagesCreatedOrUpdatedSinceDate(java.util.Date previousLoginDate)
|
java.util.List<Page> |
getPagesStartingWith(Space space,
java.lang.String s)
|
Page |
getPageWithComments(Space space,
java.lang.String pageTitle)
Get the page by space and title, and perform an eager load of the comments and their children. |
java.util.List<Page> |
getPermissionPages(Space space)
|
java.lang.Class |
getPersistentClass()
|
java.util.List<Page> |
getRecentlyAddedPages(int maxCount,
java.lang.String spaceKey)
|
java.util.List<Page> |
getRecentlyAuthoredPagesByUser(java.lang.String username,
int maxCount)
|
java.util.List<Page> |
getRecentlyUpdatedPages(int maxCount,
java.lang.String spaceKey)
|
java.util.List<Page> |
getTopLevelPages(Space space)
|
PageResponse<Page> |
getTopLevelPages(Space space,
LimitedRequest limitedRequest,
com.google.common.base.Predicate<? super Page> predicate)
|
java.util.List<Page> |
getUndefinedPages(java.lang.String spaceKey)
|
void |
setGroupManager(com.atlassian.user.GroupManager groupManager)
|
void |
setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
|
void |
setLinkDao(LinkDao linkDao)
|
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao |
---|
findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, findNamedQueryStringParams, save, setCacheFactory, setConfluenceUserDao, updateModificationData |
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport |
---|
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
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.core.persistence.VersionedObjectDao |
---|
findLatestVersionsCount, findLatestVersionsIterator, save |
Methods inherited from interface bucket.core.persistence.ObjectDao |
---|
findAll, findAllSorted, findAllSorted, refresh, remove, replicate, save, saveRaw |
Constructor Detail |
---|
public HibernatePageDao()
Method Detail |
---|
public void setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
public void setLinkDao(LinkDao linkDao)
public Page getPageById(long id)
PageDao
getPageById
in interface PageDao
id
- of the page to load
public java.util.List<Page> getPagesByIds(java.lang.Iterable<java.lang.Long> ids)
PageDao
getPagesByIds
in interface PageDao
public int getCommentCountOnPage(long id)
PageDao
getCommentCountOnPage
in interface PageDao
public Page getPageByIdWithComments(long id)
PageDao
getPageByIdWithComments
in interface PageDao
id
- of the page to load
public Page getPage(Space space, java.lang.String pageTitle, boolean eagerLoadComments)
public Page getPageWithComments(Space space, java.lang.String pageTitle)
PageDao
getPageWithComments
in interface PageDao
space
- The space the page belongs topageTitle
- The title of the page
public Page getPage(Space space, java.lang.String pageTitle)
PageDao
getPage
in interface PageDao
space
- The space the page belongs topageTitle
- The title of the page
public java.util.List<Page> getPages(Space space, boolean currentOnly)
getPages
in interface PageDao
public PageResponse<Page> getPages(Space space, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super Page> predicate)
PageDao
getPages
in interface PageDao
space
- - the space to retreive the content forlimitedRequest
- - the start and offset of the pages to retrievepredicate
- - the predicate to apply
public PageResponse<Page> getPages(LimitedRequest limitedRequest, com.google.common.base.Predicate<? super Page> predicate)
PageDao
getPages
in interface PageDao
limitedRequest
- - the start and offset of the pages to retrievepredicate
- - the predicate to apply
public PageResponse<BlogPost> getBlogPosts(Space space, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super BlogPost> predicate)
PageDao
getBlogPosts
in interface PageDao
predicate
- - the predicate to filter the returned results by, may be null.
public java.util.Collection<java.lang.Long> getPageIds(Space space)
PageDao
getPageIds
in interface PageDao
space
- space to retrieve page ids from, can not be null.
public PageResponse<AbstractPage> getAbstractPagesByTitle(java.lang.String title, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super AbstractPage> filter)
PageDao
getAbstractPagesByTitle
in interface PageDao
title
- the title of the page to matchlimitedRequest
- the pagination requestedfilter
- a Predicate to apply to the results before returning
public PageResponse<AbstractPage> getAbstractPagesByCreationDate(org.joda.time.DateTime date, LimitedRequest pageRequest, com.google.common.base.Predicate<? super AbstractPage> filter)
PageDao
getAbstractPagesByCreationDate
in interface PageDao
date
- - the creation date to matchpageRequest
- the pagination requestfilter
- a Predicate to apply to the results before returning
public java.util.List<Page> getPagesStartingWith(Space space, java.lang.String s)
getPagesStartingWith
in interface PageDao
public java.util.List<Page> getRecentlyAddedPages(int maxCount, java.lang.String spaceKey)
getRecentlyAddedPages
in interface PageDao
public java.util.List<Page> getRecentlyUpdatedPages(int maxCount, java.lang.String spaceKey)
getRecentlyUpdatedPages
in interface PageDao
public java.util.List<Page> getOrphanedPages(java.lang.String spaceKey)
getOrphanedPages
in interface PageDao
public java.util.List<Page> getUndefinedPages(java.lang.String spaceKey)
getUndefinedPages
in interface PageDao
public java.util.List<Page> getPermissionPages(Space space)
getPermissionPages
in interface PageDao
public int getAuthoredPagesCountByUser(java.lang.String username)
getAuthoredPagesCountByUser
in interface PageDao
public java.util.List<Page> getRecentlyAuthoredPagesByUser(java.lang.String username, int maxCount)
getRecentlyAuthoredPagesByUser
in interface PageDao
public java.util.List<Page> getPagesCreatedOrUpdatedSinceDate(java.util.Date previousLoginDate)
getPagesCreatedOrUpdatedSinceDate
in interface PageDao
public java.lang.Class getPersistentClass()
getPersistentClass
in interface ObjectDao
getPersistentClass
in class ContentEntityObjectHibernateDao
public java.util.List findPagesWithHistoricalTitle(java.lang.String pageTitle)
findPagesWithHistoricalTitle
in interface PageDao
public java.util.List<AbstractPage> findPagesWithHistoricalTitleInPermittedSpace(java.lang.String pageTitle, Space space, int maxResultCount)
PageDao
findPagesWithHistoricalTitleInPermittedSpace
in interface PageDao
pageTitle
- title of a page in a previous version.space
- Space to search. Must not be null.maxResultCount
- maximum pages to returnpublic java.util.List<AbstractPage> findBlogsWithHistoricalTitleInPermittedSpace(java.lang.String blogTitle, Space space, int maxResultCount)
PageDao
findBlogsWithHistoricalTitleInPermittedSpace
in interface PageDao
blogTitle
- title of a page in a previous version.space
- Space to search. Must not be null.maxResultCount
- maximum pages to return
public java.util.List<AbstractPage> findPagesWithHistoricalTitleInAllPermittedSpacesExcept(java.lang.String pageTitle, Space space, int maxResultCount)
PageDao
findPagesWithHistoricalTitleInAllPermittedSpacesExcept
in interface PageDao
pageTitle
- title of a page in a previous version.space
- Space to exclude from search. If null, all spaces are searched.maxResultCount
- maximum pages to returnpublic java.util.List<Page> getPageInTrash(java.lang.String spaceKey, java.lang.String title)
getPageInTrash
in interface PageDao
public java.util.List<Page> getDescendents(Page page)
getDescendents
in interface PageDao
public java.util.List<java.lang.Long> getDescendentIds(Page page)
getDescendentIds
in interface PageDao
public java.util.List<Page> getTopLevelPages(Space space)
getTopLevelPages
in interface PageDao
public PageResponse<Page> getTopLevelPages(Space space, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super Page> predicate)
getTopLevelPages
in interface PageDao
public PageResponse<Page> getChildren(Page page, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super Page> predicate, Depth depth)
getChildren
in interface PageDao
public java.lang.Integer getMaxSiblingPosition(Page page)
PageDao
getMaxSiblingPosition
in interface PageDao
page
- The page whose siblings from which to get the max position
public void setGroupManager(com.atlassian.user.GroupManager groupManager)
public java.util.Date getOldestPageCreationDate()
ContentEntityObjectDao
getOldestPageCreationDate
in interface ContentEntityObjectDao
getOldestPageCreationDate
in class ContentEntityObjectHibernateDao
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |