com.atlassian.confluence.pages.persistence.dao.hibernate
Class HibernatePageDao

java.lang.Object
  extended byorg.springframework.orm.hibernate.support.HibernateDaoSupport
      extended bycom.atlassian.hibernate.HibernateObjectDao
          extended bybucket.core.persistence.hibernate.CachableHibernateObjectDao
              extended bycom.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
                  extended bycom.atlassian.confluence.core.persistence.hibernate.ContentEntityObjectHibernateDao
                      extended bycom.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao
All Implemented Interfaces:
ContentEntityObjectDao, org.springframework.beans.factory.InitializingBean, ObjectDao, PageDao, VersionedObjectDao

public class HibernatePageDao
extends ContentEntityObjectHibernateDao
implements PageDao


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
log
 
Fields inherited from class bucket.core.persistence.hibernate.CachableHibernateObjectDao
cacheManager
 
Fields inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
logger
 
Constructor Summary
HibernatePageDao()
           
 
Method Summary
 List findPagesWithHistoricalTitle(String pageTitle)
           
 int getAuthoredPagesCountByUser(String username)
           
 List getDescendentIds(Page page)
           
 List getDescendents(Page page)
           
 List getOrphanedPages(String spaceKey)
           
 Page getPage(String spaceKey, String pageTitle)
           
 Page getPageById(long id)
           
 List getPageInTrash(String spaceKey, String title)
           
 List getPages(Space space, boolean currenOnly)
          Return an iterator for the specified space.
 List getPagesCreatedOrUpdatedSinceDate(Date previousLoginDate)
           
 List getPagesStartingWith(Space space, String s)
           
 List getPermissionPages(Space space)
           
 Class getPersistentClass()
           
 List getRecentlyAddedPages(int maxCount, String spaceKey)
           
 List getRecentlyAuthoredPagesByUser(String username, int maxCount)
           
 List getRecentlyUpdatedPages(int maxCount, String spaceKey)
           
 List getTopLevelPages(Space space)
           
 List getUndefinedPages(String spaceKey)
           
 void remove(EntityObject objectToRemove)
           
 void removeFromPageKeyCache(String spaceKey, String pageTitle)
           
 void setCaching(boolean caching)
          Allows you to turn caching on and off from the spring properties setup.
 void setHibernateConfig(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, getTrashedContent, getVersion, getVersionHistorySummary
 
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, save, updateModificationData
 
Methods inherited from class bucket.core.persistence.hibernate.CachableHibernateObjectDao
setCacheManager
 
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
afterPropertiesSet, closeSessionIfNecessary, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, initDao, setHibernateTemplate, setSessionFactory
 
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, getTrashedContent, getVersion, getVersionHistorySummary
 
Methods inherited from interface com.atlassian.confluence.core.persistence.VersionedObjectDao
findLatestVersionsCount, findLatestVersionsIterator, save
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, refresh, replicate, save, saveRaw
 

Constructor Detail

HibernatePageDao

public HibernatePageDao()
Method Detail

setHibernateConfig

public void setHibernateConfig(HibernateConfig hibernateConfig)

setLinkDao

public void setLinkDao(LinkDao linkDao)

getPageById

public Page getPageById(long id)
Specified by:
getPageById in interface PageDao

getPage

public Page getPage(String spaceKey,
                    String pageTitle)
Specified by:
getPage in interface PageDao

getPages

public 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
Parameters:
space -
Returns:

getPagesStartingWith

public List getPagesStartingWith(Space space,
                                 String s)
Specified by:
getPagesStartingWith in interface PageDao

getRecentlyAddedPages

public List getRecentlyAddedPages(int maxCount,
                                  String spaceKey)
Specified by:
getRecentlyAddedPages in interface PageDao

getRecentlyUpdatedPages

public List getRecentlyUpdatedPages(int maxCount,
                                    String spaceKey)
Specified by:
getRecentlyUpdatedPages in interface PageDao

getOrphanedPages

public List getOrphanedPages(String spaceKey)
Specified by:
getOrphanedPages in interface PageDao

getUndefinedPages

public List getUndefinedPages(String spaceKey)
Specified by:
getUndefinedPages in interface PageDao

getPermissionPages

public List getPermissionPages(Space space)
Specified by:
getPermissionPages in interface PageDao

getAuthoredPagesCountByUser

public int getAuthoredPagesCountByUser(String username)
Specified by:
getAuthoredPagesCountByUser in interface PageDao

getRecentlyAuthoredPagesByUser

public List getRecentlyAuthoredPagesByUser(String username,
                                           int maxCount)
Specified by:
getRecentlyAuthoredPagesByUser in interface PageDao

getPagesCreatedOrUpdatedSinceDate

public List getPagesCreatedOrUpdatedSinceDate(Date previousLoginDate)
Specified by:
getPagesCreatedOrUpdatedSinceDate in interface PageDao

remove

public void remove(EntityObject objectToRemove)
Specified by:
remove in interface ObjectDao

getPersistentClass

public Class getPersistentClass()
Specified by:
getPersistentClass in interface 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(String spaceKey,
                                   String pageTitle)
Specified by:
removeFromPageKeyCache in interface PageDao

findPagesWithHistoricalTitle

public List findPagesWithHistoricalTitle(String pageTitle)
Specified by:
findPagesWithHistoricalTitle in interface PageDao

getPageInTrash

public List getPageInTrash(String spaceKey,
                           String title)
Specified by:
getPageInTrash in interface PageDao

getDescendents

public List getDescendents(Page page)
Specified by:
getDescendents in interface PageDao

getDescendentIds

public List getDescendentIds(Page page)
Specified by:
getDescendentIds in interface PageDao

getTopLevelPages

public List getTopLevelPages(Space space)
Specified by:
getTopLevelPages in interface PageDao


Confluence is developed by Atlassian.