Package org.alfresco.query
Class ListBackedPagingResults<R>
- java.lang.Object
-
- org.alfresco.query.ListBackedPagingResults<R>
-
- All Implemented Interfaces:
PagingResults<R>
public class ListBackedPagingResults<R> extends Object implements PagingResults<R>
Wraps a list of items as aPagingResults
, used typically when migrating from a full listing system to a paged one.- Since:
- Odin
- Author:
- Nick Burch
-
-
Constructor Summary
Constructors Constructor Description ListBackedPagingResults(List<R> list)
ListBackedPagingResults(List<R> list, PagingRequest paging)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<R>
getPage()
Returns the whole set of results as one pageString
getQueryExecutionId()
There is no unique query ID, as no query was donePair<Integer,Integer>
getTotalResultCount()
We know exactly how many results there areboolean
hasMoreItems()
True if more items on next page.
-
-
-
Constructor Detail
-
ListBackedPagingResults
public ListBackedPagingResults(List<R> list, PagingRequest paging)
-
-
Method Detail
-
getPage
public List<R> getPage()
Returns the whole set of results as one page- Specified by:
getPage
in interfacePagingResults<R>
- Returns:
- the results - possibly empty but never null
-
hasMoreItems
public boolean hasMoreItems()
Description copied from interface:PagingResults
True if more items on next page. Note: could also return true if page was cutoff/trimmed for some reason (eg. due to permission checks of large page of requested max items)- Specified by:
hasMoreItems
in interfacePagingResults<R>
- Returns:
- true if more items (eg. on next page)
- true => at least one more page (or incomplete page - if cutoff)
- false => last page (or incomplete page - if cutoff)
-
getTotalResultCount
public Pair<Integer,Integer> getTotalResultCount()
We know exactly how many results there are- Specified by:
getTotalResultCount
in interfacePagingResults<R>
- Returns:
- Returns the total results as a range (all results, including the paged results returned)
-
getQueryExecutionId
public String getQueryExecutionId()
There is no unique query ID, as no query was done- Specified by:
getQueryExecutionId
in interfacePagingResults<R>
- Returns:
- a unique ID associated with the query execution results
-
-