Package com.xwiki.task
Class PaginatedReferences
java.lang.Object
com.xwiki.task.PaginatedReferences
Represents a paginated result of document references that can be used to display a pagination component i.e.
livedata.
- Since:
- 3.11.0
- Version:
- $Id$
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.PaginatedReferences(List<org.xwiki.model.reference.DocumentReference> pages) Builds a paginated result based solely on the returned pages list. -
Method Summary
-
Constructor Details
-
PaginatedReferences
public PaginatedReferences()Default constructor. -
PaginatedReferences
Builds a paginated result based solely on the returned pages list. The other parameters will default to 0 or the list size.- Parameters:
pages- a list of document references representing a subset of the queried data source.
-
-
Method Details
-
getPages
- Returns:
- the list of pages retrieved from the data source. The members should be accurate to the offset and count attributes.
-
setPages
- Parameters:
pages- seegetPages().
-
getCount
public int getCount()- Returns:
- the number of items contained by the current result.
-
setCount
public void setCount(int count) - Parameters:
count- seegetCount().
-
getOffset
public int getOffset()- Returns:
- the starting offset of the returned pages. If the dataset contains 0..n elements, the returned pages should correspond to the offset..offset+count elements of the dataset.
-
setOffset
public void setOffset(int offset) - Parameters:
offset- seegetOffset().
-
getTotal
public int getTotal()- Returns:
- the total number elements contained by the datasource.
-
setTotal
public void setTotal(int total) - Parameters:
total- seegetTotal().
-