Class PagingRequest

java.lang.Object
org.alfresco.query.PagingRequest

@AlfrescoPublicApi public class PagingRequest extends Object
Simple wrapper for single page request (with optional request for total count up to a given max)
Since:
4.0
Author:
janv
  • Constructor Details

    • PagingRequest

      public PagingRequest(int maxItems)
      Construct a page request
      Parameters:
      maxItems - the maximum number of items per page
    • PagingRequest

      public PagingRequest(int skipCount, int maxItems)
      Construct a page request
      Parameters:
      maxItems - the maximum number of items per page
      skipCount - the number of items to skip before the first page
    • PagingRequest

      public PagingRequest(int maxItems, String queryExecutionId)
      Construct a page request
      Parameters:
      maxItems - the maximum number of items per page
      queryExecutionId - a query execution ID associated with ealier paged requests
    • PagingRequest

      public PagingRequest(int skipCount, int maxItems, String queryExecutionId)
      Construct a page request
      Parameters:
      skipCount - the number of items to skip before the first page
      maxItems - the maximum number of items per page
      queryExecutionId - a query execution ID associated with ealier paged requests
  • Method Details

    • getSkipCount

      public int getSkipCount()
      Results to skip before retrieving the page. Usually a multiple of page size (ie. page size * num pages to skip). Default is 0.
      Returns:
      the number of results to skip before the page
    • setSkipCount

      protected void setSkipCount(int skipCount)
      Change the skip count. Must be called before the paging query is run.
    • getMaxItems

      public int getMaxItems()
      Size of the page - if skip count is 0 then return up to max items.
      Returns:
      the maximum size of the page
    • setMaxItems

      protected void setMaxItems(int maxItems)
      Change the size of the page. Must be called before the paging query is run.
    • getRequestTotalCountMax

      public int getRequestTotalCountMax()
      Get requested total count (up to a given maximum).
    • setRequestTotalCountMax

      public void setRequestTotalCountMax(int requestTotalCountMax)
      Set request total count (up to a given maximum). Default is 0 => do not request total count (which allows possible query optimisation).
      Parameters:
      requestTotalCountMax -
    • getQueryExecutionId

      public String getQueryExecutionId()
      Get a unique ID associated with these query results. This must be available before and after execution i.e. it must depend on the type of query and the query parameters rather than the execution results. Client has the option to pass this back as a hint when paging.
      Returns:
      a unique ID associated with the query execution results
    • setQueryExecutionId

      protected void setQueryExecutionId(String queryExecutionId)
      Change the unique query ID for the results. Must be called before the paging query is run.