com.atlassian.confluence.pages.persistence.dao.hibernate
Class HibernatePageDao
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
- All Implemented Interfaces:
- bucket.core.persistence.ObjectDao, ContentEntityObjectDao, VersionedObjectDao, PageDao, org.springframework.beans.factory.InitializingBean
public class HibernatePageDao
- extends ContentEntityObjectHibernateDao
- implements PageDao
Fields inherited from class org.springframework.dao.support.DaoSupport |
logger |
Method Summary |
java.util.List |
findPagesWithHistoricalTitle(java.lang.String pageTitle)
|
int |
getAuthoredPagesCountByUser(java.lang.String username)
|
java.util.List |
getDescendentIds(Page page)
|
java.util.List |
getDescendents(Page page)
|
java.util.List |
getOrphanedPages(java.lang.String spaceKey)
|
Page |
getPage(java.lang.String spaceKey,
java.lang.String pageTitle)
|
Page |
getPage(java.lang.String spaceKey,
java.lang.String pageTitle,
boolean eagerLoadComments)
Get the page by space key and title, and perform an eager load of the comments and their children. |
Page |
getPageById(long id)
|
java.util.List |
getPageInTrash(java.lang.String spaceKey,
java.lang.String title)
|
java.util.List |
getPages(Space space,
boolean currenOnly)
Return an iterator for the specified space. |
java.util.List |
getPagesCreatedOrUpdatedSinceDate(java.util.Date previousLoginDate)
|
java.util.List |
getPagesStartingWith(Space space,
java.lang.String s)
|
java.util.List |
getPermissionPages(Space space)
|
java.lang.Class |
getPersistentClass()
|
java.util.List |
getRecentlyAddedPages(int maxCount,
java.lang.String spaceKey)
|
java.util.List |
getRecentlyAuthoredPagesByUser(java.lang.String username,
int maxCount)
|
java.util.List |
getRecentlyUpdatedPages(int maxCount,
java.lang.String spaceKey)
|
java.util.List |
getTopLevelPages(Space space)
|
java.util.List |
getUndefinedPages(java.lang.String spaceKey)
|
void |
remove(com.atlassian.core.bean.EntityObject objectToRemove)
|
void |
removeFromPageKeyCache(java.lang.String spaceKey,
java.lang.String pageTitle)
|
void |
setCaching(boolean caching)
Allows you to turn caching on and off from the spring properties setup. |
void |
setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
|
void |
setLinkDao(LinkDao linkDao)
|
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.ContentEntityObjectHibernateDao |
findPreviousVersions, getAllCurrentEntities, getById, getContentAuthoredByUser, getEntitiesModifiedSince, getFirstVersionAfter, getFirstVersionBefore, getLockedContentBySpace, getObjectType, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesByType, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getTrashedContent, getVersion, getVersionHistorySummary |
Methods inherited from class com.atlassian.hibernate.HibernateObjectDao |
findAll, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, index, refresh, reIndex, replicate, save, saveRaw, setIndexer, unIndex |
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.ContentEntityObjectDao |
findPreviousVersions, getAllCurrentEntities, getById, getContentAuthoredByUser, getEntitiesModifiedSince, getFirstVersionAfter, getFirstVersionBefore, getLockedContentBySpace, getObjectType, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesByType, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getTrashedContent, getVersion, getVersionHistorySummary |
Methods inherited from interface bucket.core.persistence.ObjectDao |
findAll, findAllSorted, refresh, replicate, save, saveRaw |
HibernatePageDao
public HibernatePageDao()
setHibernateConfig
public void setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
setLinkDao
public void setLinkDao(LinkDao linkDao)
getPageById
public Page getPageById(long id)
- Specified by:
getPageById
in interface PageDao
getPage
public Page getPage(java.lang.String spaceKey,
java.lang.String pageTitle)
- Specified by:
getPage
in interface PageDao
getPage
public Page getPage(java.lang.String spaceKey,
java.lang.String pageTitle,
boolean eagerLoadComments)
- Description copied from interface:
PageDao
- Get the page by space key 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:
getPage
in interface PageDao
- Parameters:
spaceKey
- to match withpageTitle
- to match witheagerLoadComments
- true if comments should be loaded eagerly
- Returns:
- the page
getPages
public java.util.List getPages(Space space,
boolean currenOnly)
- Description copied from interface:
PageDao
- Return an iterator for the specified space. This is an efficient alternative
to space.getPages
- Specified by:
getPages
in interface PageDao
- Returns:
getPagesStartingWith
public java.util.List getPagesStartingWith(Space space,
java.lang.String s)
- Specified by:
getPagesStartingWith
in interface PageDao
getRecentlyAddedPages
public java.util.List getRecentlyAddedPages(int maxCount,
java.lang.String spaceKey)
- Specified by:
getRecentlyAddedPages
in interface PageDao
getRecentlyUpdatedPages
public java.util.List getRecentlyUpdatedPages(int maxCount,
java.lang.String spaceKey)
- Specified by:
getRecentlyUpdatedPages
in interface PageDao
getOrphanedPages
public java.util.List getOrphanedPages(java.lang.String spaceKey)
- Specified by:
getOrphanedPages
in interface PageDao
getUndefinedPages
public java.util.List getUndefinedPages(java.lang.String spaceKey)
- Specified by:
getUndefinedPages
in interface PageDao
getPermissionPages
public java.util.List getPermissionPages(Space space)
- Specified by:
getPermissionPages
in interface PageDao
getAuthoredPagesCountByUser
public int getAuthoredPagesCountByUser(java.lang.String username)
- Specified by:
getAuthoredPagesCountByUser
in interface PageDao
getRecentlyAuthoredPagesByUser
public java.util.List getRecentlyAuthoredPagesByUser(java.lang.String username,
int maxCount)
- Specified by:
getRecentlyAuthoredPagesByUser
in interface PageDao
getPagesCreatedOrUpdatedSinceDate
public java.util.List getPagesCreatedOrUpdatedSinceDate(java.util.Date previousLoginDate)
- Specified by:
getPagesCreatedOrUpdatedSinceDate
in interface PageDao
remove
public void remove(com.atlassian.core.bean.EntityObject objectToRemove)
- Specified by:
remove
in interface bucket.core.persistence.ObjectDao
- Overrides:
remove
in class com.atlassian.hibernate.HibernateObjectDao
getPersistentClass
public java.lang.Class getPersistentClass()
- Specified by:
getPersistentClass
in interface bucket.core.persistence.ObjectDao
- Overrides:
getPersistentClass
in class ContentEntityObjectHibernateDao
setCaching
public void setCaching(boolean caching)
- Allows you to turn caching on and off from the spring properties setup. Useful for testing
and diagnostics. Caching is turned on by default.
- Parameters:
caching
- true to keep caching turned on, false otherwise.
removeFromPageKeyCache
public void removeFromPageKeyCache(java.lang.String spaceKey,
java.lang.String pageTitle)
- Specified by:
removeFromPageKeyCache
in interface PageDao
findPagesWithHistoricalTitle
public java.util.List findPagesWithHistoricalTitle(java.lang.String pageTitle)
- Specified by:
findPagesWithHistoricalTitle
in interface PageDao
getPageInTrash
public java.util.List getPageInTrash(java.lang.String spaceKey,
java.lang.String title)
- Specified by:
getPageInTrash
in interface PageDao
getDescendents
public java.util.List getDescendents(Page page)
- Specified by:
getDescendents
in interface PageDao
getDescendentIds
public java.util.List getDescendentIds(Page page)
- Specified by:
getDescendentIds
in interface PageDao
getTopLevelPages
public java.util.List getTopLevelPages(Space space)
- Specified by:
getTopLevelPages
in interface PageDao
Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.