Class HibernateAbstractPageDao
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
-
- com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateAbstractPageDao
-
- All Implemented Interfaces:
ObjectDao,AbstractPageDaoInternal,ObjectDaoInternal,AbstractPageDao,org.springframework.beans.factory.InitializingBean
public class HibernateAbstractPageDao extends HibernateObjectDao implements AbstractPageDaoInternal
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
HibernateObjectDao.Cacheability
-
-
Constructor Summary
Constructors Constructor Description HibernateAbstractPageDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountStaleSharedDrafts()Counting number of stale share draft in DBAbstractPagegetAbstractPageById(long id)List<AbstractPage>getAbstractPageByIds(Iterable<Long> ids)Retrieves a list ofAbstractPagefor the list of idprotected AbstractPagegetByClassId(long id)Retrieve the object with a particular id from the database.intgetCountOfLatestXhtmlContent(long endContentId)Count the number of AbstractPages that have an ID lower than the specified ID, excluding older versions.longgetHighestCeoId()Get the highest content ID in the database, excluding older versions of content.List<ContentEntityObject>getOrderedXhtmlContentFromContentId(long startContentId, long endContentId, int maxRows)Gets the latest versions of AbstractPages between the given IDs limited by the specified number of rows.ClassgetPersistentClass()Gets the type ofEntityObjectthis Dao works with.List<ContentEntityObject>getPreviousVersionsOfPageWithTaskId(long pageId, long taskId, int maxRows)Get previous versions of a CEO that contain the given task ID sorted by versions in descending order.List<ContentEntityObject>getStaleSharedDrafts()Get all stale shared drafts in the database.List<ContentEntityObject>getStaleSharedDrafts(LimitedRequest limitedRequest)Get all stale shared drafts in the database.-
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
applyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, 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, saveRawEntity, setEventPublisher, setHibernateTemplate, setIndexer, setSessionFactory, unIndex, unIndexEntity, uniqueResult, updateEntityModificationData, updateModificationData
-
-
-
-
Method Detail
-
getByClassId
protected AbstractPage getByClassId(long id)
Description copied from class:HibernateObjectDaoRetrieve the object with a particular id from the database. The object must be of the same class as the DAO's getPersistentClass() method returns.- Overrides:
getByClassIdin classHibernateObjectDao- Parameters:
id- the id of the object to look up- Returns:
- the corresponding object, or null if the object does not exist with the appropriate class and id.
-
getAbstractPageById
public AbstractPage getAbstractPageById(long id)
- Specified by:
getAbstractPageByIdin interfaceAbstractPageDao- Returns:
- an object that is either a
PageorBlogPost(current subclasses ofAbstractPage). Null if no result could be found.
-
getAbstractPageByIds
public List<AbstractPage> getAbstractPageByIds(Iterable<Long> ids)
Description copied from interface:AbstractPageDaoRetrieves a list ofAbstractPagefor the list of id- Specified by:
getAbstractPageByIdsin interfaceAbstractPageDao
-
getOrderedXhtmlContentFromContentId
public List<ContentEntityObject> getOrderedXhtmlContentFromContentId(long startContentId, long endContentId, int maxRows)
Description copied from interface:AbstractPageDaoGets the latest versions of AbstractPages between the given IDs limited by the specified number of rows. Sorted by IDs in ascending order.- Specified by:
getOrderedXhtmlContentFromContentIdin interfaceAbstractPageDao- Parameters:
startContentId- The minimum IDendContentId- The maximum IDmaxRows- The maximum number of rows to return- Returns:
- A list of CEOs that match the criteria.
-
getHighestCeoId
public long getHighestCeoId()
Description copied from interface:AbstractPageDaoGet the highest content ID in the database, excluding older versions of content.- Specified by:
getHighestCeoIdin interfaceAbstractPageDao- Returns:
- The highest content ID
-
getPreviousVersionsOfPageWithTaskId
public List<ContentEntityObject> getPreviousVersionsOfPageWithTaskId(long pageId, long taskId, int maxRows)
Description copied from interface:AbstractPageDaoGet previous versions of a CEO that contain the given task ID sorted by versions in descending order.- Specified by:
getPreviousVersionsOfPageWithTaskIdin interfaceAbstractPageDao- Parameters:
pageId- The ID of the latest version of the pagetaskId- The task ID to look for in previous versionsmaxRows- The maximum number of previous versions to return- Returns:
- A maximum of maxRows previous versions of the page that contain the given taskId
-
getCountOfLatestXhtmlContent
public int getCountOfLatestXhtmlContent(long endContentId)
Description copied from interface:AbstractPageDaoCount the number of AbstractPages that have an ID lower than the specified ID, excluding older versions.- Specified by:
getCountOfLatestXhtmlContentin interfaceAbstractPageDao- Parameters:
endContentId- The maximum ID- Returns:
- The number of AbstractPages that have IDs lower than the specified ID
-
countStaleSharedDrafts
public int countStaleSharedDrafts()
Description copied from interface:AbstractPageDaoInternalCounting number of stale share draft in DB- Specified by:
countStaleSharedDraftsin interfaceAbstractPageDaoInternal- Returns:
- number of stale share draft
-
getStaleSharedDrafts
public List<ContentEntityObject> getStaleSharedDrafts(LimitedRequest limitedRequest)
Description copied from interface:AbstractPageDaoInternalGet all stale shared drafts in the database. These are drafts where the lastModified date is before the current version of the page- Specified by:
getStaleSharedDraftsin interfaceAbstractPageDaoInternal- Parameters:
limitedRequest- limit number of object to return- Returns:
- A list containing the stale shared drafts.
-
getStaleSharedDrafts
public List<ContentEntityObject> getStaleSharedDrafts()
Description copied from interface:AbstractPageDaoGet all stale shared drafts in the database. These are drafts where the lastModified date is before the current version of the page- Specified by:
getStaleSharedDraftsin interfaceAbstractPageDao- Returns:
- A list containing the stale shared drafts.
-
getPersistentClass
public Class getPersistentClass()
Description copied from interface:ObjectDaoInternalGets the type ofEntityObjectthis Dao works with.- Specified by:
getPersistentClassin interfaceObjectDao- Specified by:
getPersistentClassin interfaceObjectDaoInternal- Returns:
- the type
-
-