com.atlassian.confluence.core.persistence
Interface ContentEntityObjectDao

All Superinterfaces:
ObjectDao, VersionedObjectDao
All Known Subinterfaces:
ContentDao, CustomContentDao, MailDao, PageDao, UserStatusDao
All Known Implementing Classes:
CachingPageDao, ContentEntityObjectHibernateDao, DefaultContentDao, HibernateMailDao, HibernatePageDao, HibernateUserStatusDao, PluginContentHibernateDao

public interface ContentEntityObjectDao
extends VersionedObjectDao


Method Summary
 int countContentBySpaceIdAndStatus(long spaceId, String status)
          Retrieve the count of content for a given space with a particular status.
 List<ContentEntityObject> findContentBySpaceIdAndStatus(long spaceId, String status, int offset, int count)
          Retrieve content for a given space with a particular status.
 List findHistoricalVersionsAfterVersion(long originalContentId, int version)
           
 List findPreviousVersions(long originalContentId)
           
 Iterator getAllCurrentEntities()
           
 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.
 List getLockedContentBySpace(String spaceKey)
           
 String getObjectType(long id)
           
 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)
           
 List<VersionHistorySummary> getVersionHistorySummary(long originalContentId)
           
 
Methods inherited from interface com.atlassian.confluence.core.persistence.VersionedObjectDao
findLatestVersionsCount, findLatestVersionsIterator, save
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
 

Method Detail

getById

ContentEntityObject getById(long id)

getContentAuthoredByUser

List getContentAuthoredByUser(String username)

getAllCurrentEntities

Iterator getAllCurrentEntities()

getRecentlyAddedEntities

Iterator getRecentlyAddedEntities(String spaceKey,
                                  int maxResults)

getRecentlyModifiedEntities

Iterator getRecentlyModifiedEntities(int maxResults)

getRecentlyModifiedEntities

Iterator getRecentlyModifiedEntities(String spaceKey,
                                     int maxResults)

getRecentlyModifiedForChangeDigest

List getRecentlyModifiedForChangeDigest(Date fromDate)
Retrieves a list of ContentEntityObjects that have been newly added or modified since the date specified. This list excludes drafts, space descriptions and mail.

Parameters:
fromDate - content modified after this date will be returned
Returns:
a list of ContentEntityObjects that have been newly added or modified since the date specified

getRecentlyModifiedEntitiesForUser

Iterator getRecentlyModifiedEntitiesForUser(String username)

getLockedContentBySpace

List getLockedContentBySpace(String spaceKey)

getTrashedContent

List getTrashedContent(String spaceKey)

getObjectType

String getObjectType(long id)

getFirstVersionBefore

ContentEntityObject getFirstVersionBefore(long originalVersionContentId,
                                          int version)

getFirstVersionAfter

ContentEntityObject getFirstVersionAfter(long originalVersionContentId,
                                         int version)

getVersion

ContentEntityObject getVersion(long originalVersionContentId,
                               int version)

getVersionHistorySummary

List<VersionHistorySummary> getVersionHistorySummary(long originalContentId)

findPreviousVersions

List findPreviousVersions(long originalContentId)

findHistoricalVersionsAfterVersion

List findHistoricalVersionsAfterVersion(long originalContentId,
                                        int version)

getLastEditedVersionsOf

List<ContentEntityObject> getLastEditedVersionsOf(ContentEntityObject content)
Retrieves all the last edited versions for each user who has contributed to the specified piece of content. That is, if a user has contributed multiple edits, only the version that corresponds to their latest edit will be added to the list returned. Result will be sorted with the earliest version coming first.

Parameters:
content - content (must be the latest version)
Returns:
the last edited versions for each user who has contributed to the specified piece of content.
Throws:
IllegalArgumentException - if the content is not the latest version or null

findContentBySpaceIdAndStatus

List<ContentEntityObject> findContentBySpaceIdAndStatus(long spaceId,
                                                        String status,
                                                        int offset,
                                                        int count)
Retrieve content for a given space with a particular status. Results will be sorted by descending date of last modification.

Parameters:
spaceId - the id of the space
status - the status of the content being retrieved (e.g. ContentEntityObject.DELETED
offset - the offset of the first item to retrieve (0-based)
count - the maximum number of items to retrieve
Returns:
the list of content matching the query

countContentBySpaceIdAndStatus

int countContentBySpaceIdAndStatus(long spaceId,
                                   String status)
Retrieve the count of content for a given space with a particular status.

Parameters:
spaceId - the id of the space
status - the status of the content being retrieved (e.g. ContentEntityObject.DELETED
Returns:
the number of content objects with that status in that space


Copyright © 2003-2013 Atlassian. All Rights Reserved.