public class ContentEntityObjectHibernateDao extends VersionedHibernateObjectDao implements ContentEntityObjectDao
HibernateObjectDao.Cacheability| Modifier and Type | Field and Description |
|---|---|
static long |
ONE_DAY |
cacheFactory, confluenceUserDaoNON_CACHEABLE| Constructor and Description |
|---|
ContentEntityObjectHibernateDao() |
| Modifier and Type | Method and Description |
|---|---|
int |
countContentBySpaceIdAndStatus(long spaceId,
String status)
Retrieve the count of content for a given space with a particular status.
|
List<ContentEntityObject> |
findAllDraftsFor(long contentId)
Retrieves a list of drafts for the given content if any drafts exist.
|
List<ContentEntityObject> |
findContentBySpaceIdAndStatus(long spaceId,
String status,
int offset,
int count)
Retrieve content for a given space with a particular status.
|
PageResponse<ContentEntityObject> |
findContentBySpaceIdAndStatus(long spaceId,
String status,
LimitedRequest limitedRequest,
com.google.common.base.Predicate<Page> predicate)
Retrieve content for a given space with a particular status.
|
ContentEntityObject |
findDraftFor(long contentId)
Retrieves the draft for the given content if exists.
|
List |
findHistoricalVersionsAfterVersion(long originalContentId,
int version) |
List |
findPreviousVersions(long originalContentId) |
List<ContentEntityObject> |
findUnpublishedContentWithUserContributions(String username)
Retrives the drafts for the given
User |
Iterator |
getAllCurrentEntities() |
protected ContentEntityObject |
getByClassId(long id)
Retrieve the object with a particular id from the database.
|
ContentEntityObject |
getById(long id) |
List |
getContentAuthoredByUser(String username) |
ContentEntityObject |
getFirstVersionAfter(long originalVersionContentId,
int version) |
ContentEntityObject |
getFirstVersionBefore(long originalVersionContentId,
int version) |
List<ContentEntityObject> |
getLastEditedVersionsOf(ContentEntityObject content)
Retrieves all the last edited versions for each user who has contributed to the specified piece of content.
|
String |
getObjectType(long id) |
Date |
getOldestPageCreationDate()
Gets the creation date of the oldest page.
|
PageResponse<AbstractPage> |
getPageAndBlogPostsVersionsLastEditedByUser(com.atlassian.sal.api.user.UserKey userKey,
LimitedRequest limitedRequest)
Retrieve a page of entities, either the current version or historical version, that have been modified by the user,
in order of the user's most recent modification.
|
Class |
getPersistentClass() |
Iterator |
getRecentlyAddedEntities(String spaceKey,
int maxResults) |
Iterator |
getRecentlyModifiedEntities(int maxResults) |
Iterator |
getRecentlyModifiedEntities(String spaceKey,
int maxResults) |
Iterator |
getRecentlyModifiedEntitiesForUser(String username) |
List |
getRecentlyModifiedForChangeDigest(Date fromDate)
Retrieves a list of
ContentEntityObjects that have been newly added or modified
since the date specified. |
List |
getTrashedContent(String spaceKey) |
ContentEntityObject |
getVersion(long originalVersionContentId,
int version) |
Map<Long,List<ConfluenceUser>> |
getVersionEditContributors(Iterable<ContentEntityObject> originalVersions)
Get version edit contributors for a set of content identifiers.
|
List<VersionHistorySummary> |
getVersionHistorySummary(long originalContentId) |
PageResponse<VersionHistorySummary> |
getVersionHistorySummary(long originalContentId,
LimitedRequest request)
Get version history with pagination.
|
Map<Long,ContentEntityObject> |
getVersionsLastEditedByUser(Collection<Long> contentIds,
com.atlassian.sal.api.user.UserKey userKey)
Gets the
ContentEntityObject objects, either the current version or historical version relating to
given contentIds of the current version that was the most recent version edited by the given user. |
findAllSorted, findLatestVersionsCount, findLatestVersionsCount, findLatestVersionsIterator, findLatestVersionsIterator, findNamedQueryStringParams, findNamedQueryStringParams, save, setCacheFactory, setConfluenceUserDao, updateModificationDataapplyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findByClassIds, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getCountResult, getHibernateTemplate, getSession, getSessionFactory, index, refresh, reIndex, remove, replicate, save, saveRaw, setHibernateTemplate, setIndexer, setSessionFactory, unIndex, uniqueResultclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindLatestVersionsCount, findLatestVersionsIterator, savefindAll, findAllSorted, findAllSorted, findByClassIds, refresh, remove, replicate, save, saveRawpublic static final long ONE_DAY
public Class getPersistentClass()
getPersistentClass in interface ObjectDaopublic ContentEntityObject getById(long id)
getById in interface ContentEntityObjectDaoprotected ContentEntityObject getByClassId(long id)
HibernateObjectDaogetByClassId in class HibernateObjectDaoid - the id of the object to look uppublic List getContentAuthoredByUser(String username)
getContentAuthoredByUser in interface ContentEntityObjectDaopublic Iterator getAllCurrentEntities()
getAllCurrentEntities in interface ContentEntityObjectDaopublic Iterator getRecentlyAddedEntities(String spaceKey, int maxResults)
getRecentlyAddedEntities in interface ContentEntityObjectDaopublic Iterator getRecentlyModifiedEntities(int maxResults)
getRecentlyModifiedEntities in interface ContentEntityObjectDaopublic Iterator getRecentlyModifiedEntities(String spaceKey, int maxResults)
getRecentlyModifiedEntities in interface ContentEntityObjectDaopublic Iterator getRecentlyModifiedEntitiesForUser(String username)
getRecentlyModifiedEntitiesForUser in interface ContentEntityObjectDaopublic ContentEntityObject getFirstVersionBefore(long originalVersionContentId, int version)
getFirstVersionBefore in interface ContentEntityObjectDaopublic ContentEntityObject getFirstVersionAfter(long originalVersionContentId, int version)
getFirstVersionAfter in interface ContentEntityObjectDaopublic ContentEntityObject getVersion(long originalVersionContentId, int version)
getVersion in interface ContentEntityObjectDaopublic List getRecentlyModifiedForChangeDigest(Date fromDate)
ContentEntityObjectDaoContentEntityObjects that have been newly added or modified
since the date specified. This list excludes drafts, space descriptions and mail.getRecentlyModifiedForChangeDigest in interface ContentEntityObjectDaofromDate - content modified after this date will be returnedContentEntityObjects that have been newly added or modified
since the date specifiedpublic List<ContentEntityObject> getLastEditedVersionsOf(ContentEntityObject content)
ContentEntityObjectDaogetLastEditedVersionsOf in interface ContentEntityObjectDaocontent - latest versionpublic List getTrashedContent(String spaceKey)
getTrashedContent in interface ContentEntityObjectDaopublic List<ContentEntityObject> findContentBySpaceIdAndStatus(long spaceId, String status, int offset, int count)
ContentEntityObjectDaofindContentBySpaceIdAndStatus in interface ContentEntityObjectDaospaceId - the id of the spacestatus - the status of the content being retrieved (e.g. ContentEntityObject.DELETEDoffset - the offset of the first item to retrieve (0-based)count - the maximum number of items to retrievepublic PageResponse<ContentEntityObject> findContentBySpaceIdAndStatus(long spaceId, String status, LimitedRequest limitedRequest, com.google.common.base.Predicate<Page> predicate)
ContentEntityObjectDaofindContentBySpaceIdAndStatus in interface ContentEntityObjectDaospaceId - the id of the spacestatus - the status of the content being retrieved (e.g. ContentEntityObject.DELETEDlimitedRequest - - the start and offset of the pages to retrievepredicate - - a predicate to filter the returned results bypublic int countContentBySpaceIdAndStatus(long spaceId,
String status)
ContentEntityObjectDaocountContentBySpaceIdAndStatus in interface ContentEntityObjectDaospaceId - the id of the spacestatus - the status of the content being retrieved (e.g. ContentEntityObject.DELETEDpublic String getObjectType(long id)
getObjectType in interface ContentEntityObjectDaopublic Map<Long,ContentEntityObject> getVersionsLastEditedByUser(Collection<Long> contentIds, com.atlassian.sal.api.user.UserKey userKey)
ContentEntityObjectDaoContentEntityObject objects, either the current version or historical version relating to
given contentIds of the current version that was the most recent version edited by the given user. Only content
with a "current" status are returned.getVersionsLastEditedByUser in interface ContentEntityObjectDaocontentIds - the ids of the content we're interested in. These *must* be ids of the latest version.userKey - the userKey of the user that we're interested inContentEntityObject objects relating to the version of the given contentIds that were last
edited by the given user.public PageResponse<AbstractPage> getPageAndBlogPostsVersionsLastEditedByUser(com.atlassian.sal.api.user.UserKey userKey, LimitedRequest limitedRequest)
ContentEntityObjectDaogetPageAndBlogPostsVersionsLastEditedByUser in interface ContentEntityObjectDaouserKey - the key for the user for whom to retrieve the modified contentlimitedRequest - the requestpublic List<VersionHistorySummary> getVersionHistorySummary(long originalContentId)
getVersionHistorySummary in interface ContentEntityObjectDaopublic PageResponse<VersionHistorySummary> getVersionHistorySummary(long originalContentId, LimitedRequest request)
ContentEntityObjectDaogetVersionHistorySummary in interface ContentEntityObjectDaooriginalContentId - the content Id of latest version, the CURRENT versionrequest - page request contains start, limit fields for pagination purpose.public Map<Long,List<ConfluenceUser>> getVersionEditContributors(Iterable<ContentEntityObject> originalVersions)
ContentEntityObjectDaogetVersionEditContributors in interface ContentEntityObjectDaooriginalVersions - the contents of latest versions, the CURRENT versionspublic List findPreviousVersions(long originalContentId)
findPreviousVersions in interface ContentEntityObjectDaopublic List findHistoricalVersionsAfterVersion(long originalContentId, int version)
findHistoricalVersionsAfterVersion in interface ContentEntityObjectDaopublic Date getOldestPageCreationDate()
ContentEntityObjectDaogetOldestPageCreationDate in interface ContentEntityObjectDaopublic List<ContentEntityObject> findAllDraftsFor(long contentId)
ContentEntityObjectDaofindAllDraftsFor in interface ContentEntityObjectDaocontentId - id of the content to retrieve the draft forContentEntityObject.DRAFTpublic ContentEntityObject findDraftFor(long contentId)
ContentEntityObjectDaofindDraftFor in interface ContentEntityObjectDaocontentId - id of the content to retrieve the draft forContentEntityObject.DRAFTpublic List<ContentEntityObject> findUnpublishedContentWithUserContributions(String username)
ContentEntityObjectDaoUserfindUnpublishedContentWithUserContributions in interface ContentEntityObjectDaousername - the owner of the draftsContentEntityObject with the
ContentEntityObject.DRAFT statusCopyright © 2003–2017 Atlassian. All rights reserved.