Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

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

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 Summary
PagingRequest(int maxItems)
          Construct a page request
PagingRequest(int skipCount, int maxItems)
          Construct a page request
PagingRequest(int skipCount, int maxItems, String queryExecutionId)
          Construct a page request
PagingRequest(int maxItems, String queryExecutionId)
          Construct a page request
Method Summary
int
getMaxItems()
          Size of the page - if skip count is 0 then return up to max items.
getQueryExecutionId()
          Get a unique ID associated with these query results.
int
getRequestTotalCountMax()
          Get requested total count (up to a given maximum).
int
getSkipCount()
          Results to skip before retrieving the page.
protected void
setMaxItems(int maxItems)
          Change the size of the page.
protected void
setQueryExecutionId(String queryExecutionId)
          Change the unique query ID for the results.
void
setRequestTotalCountMax(int requestTotalCountMax)
          Set request total count (up to a given maximum).
protected void
setSkipCount(int skipCount)
          Change the skip count.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
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:
skipCount - the number of items to skip before the first page
maxItems - the maximum number of items per 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 Detail
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).

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.

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2016 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.