Class DefaultFastContentRetentionDao

java.lang.Object
com.atlassian.confluence.impl.retention.fast.dao.DefaultFastContentRetentionDao
All Implemented Interfaces:
FastContentRetentionDao

public class DefaultFastContentRetentionDao extends Object implements FastContentRetentionDao
Since:
9.1.0
  • Constructor Details

    • DefaultFastContentRetentionDao

      public DefaultFastContentRetentionDao(org.hibernate.SessionFactory sessionFactory)
  • Method Details

    • getOriginalVersions

      public List<OriginalVersion> getOriginalVersions(ContentType contentType, long startOriginalId, int limit)
      Description copied from interface: FastContentRetentionDao
      Get a list of original contents whose content id greater or equal to .
      Specified by:
      getOriginalVersions in interface FastContentRetentionDao
      Parameters:
      contentType - only entries with this type will be returned
      startOriginalId - only entries with contentId greater or equal to this will be returned
      limit - the maximum number of original versions to retrieve.
      Returns:
      the list of OriginalVersion found within the requested range
    • getOriginalVersions

      public List<OriginalVersion> getOriginalVersions(ContentType contentType, long startOriginalId, long spaceId, int limit)
      Description copied from interface: FastContentRetentionDao
      Get a list of original contents in target space whose content id greater or equal to .
      Specified by:
      getOriginalVersions in interface FastContentRetentionDao
      Parameters:
      contentType - only entries with this type will be returned
      startOriginalId - only entries with contentId greater or equal to this will be returned
      spaceId - the space id to filter
      limit - the maximum number of original versions to retrieve.
      Returns:
      the list of OriginalVersion found within the requested range
    • getHistoricalVersionsByMaxVersion

      public List<SimpleHistoricalVersion> getHistoricalVersionsByMaxVersion(ContentType contentType, List<Long> originalIds, int limit, int maxVersionToKeep, @Nullable Long startVersionId)
      Description copied from interface: FastContentRetentionDao
      Get a list of historical contents filter by max version.
      Specified by:
      getHistoricalVersionsByMaxVersion in interface FastContentRetentionDao
      Parameters:
      contentType - only entries with this type will be returned
      originalIds - the ids of original contents to filter historical versions from
      limit - the maximum number of historical versions to retrieve.
      maxVersionToKeep - the maximum number of historical versions to keep for each original content, so only versions with row numbers (partition by original content) greater than this will be returned.
      startVersionId - only entries with contentId greater or equal to this will be returned
      Returns:
      the list of SimpleHistoricalVersion found within the requested range
    • getHistoricalVersionsByMaxModifiedDate

      public List<SimpleHistoricalVersion> getHistoricalVersionsByMaxModifiedDate(ContentType contentType, List<Long> originalIds, int limit, ZonedDateTime maxModifiedDate, @Nullable Long startVersionId)
      Description copied from interface: FastContentRetentionDao
      Get a list of historical contents filter by max modified date.
      Specified by:
      getHistoricalVersionsByMaxModifiedDate in interface FastContentRetentionDao
      Parameters:
      contentType - only entries with this type will be returned
      originalIds - the ids of original contents to filter historical versions from
      limit - the maximum number of historical versions to retrieve.
      maxModifiedDate - only versions modified before this date will be returned.
      startVersionId - only entries with contentId greater or equal to this will be returned
      Returns:
      the list of SimpleHistoricalVersion found within the requested range
    • getTrashContents

      public List<SpaceContentEntityObject> getTrashContents(long startContentId, int limit)
      Description copied from interface: FastContentRetentionDao
      Get a list of content with deleted status and content id is id greater or equal to .
      Specified by:
      getTrashContents in interface FastContentRetentionDao
      Parameters:
      startContentId - only return content with id greater or equal to this value.
      limit - the maximum number of trash contents to retrieve.
      Returns:
      the list of SpaceContentEntityObject found within the requested range
    • getTrashContents

      public List<SpaceContentEntityObject> getTrashContents(long startContentId, int limit, Long spaceId)
      Description copied from interface: FastContentRetentionDao
      Get a list of content with deleted status and content id is id greater or equal to and space id is .
      Specified by:
      getTrashContents in interface FastContentRetentionDao
      Parameters:
      startContentId - only return content with id greater or equal to this value.
      limit - the maximum number of trash contents to retrieve.
      spaceId - only return content with space id equals to this value.
      Returns:
      the list of SpaceContentEntityObject found within the requested range