Package com.xwiki.task
Class PaginatedReferences
- java.lang.Object
-
- com.xwiki.task.PaginatedReferences
-
public class PaginatedReferences extends Object
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
Constructors Constructor Description PaginatedReferences()Default constructor.PaginatedReferences(List<org.xwiki.model.reference.DocumentReference> pages)Builds a paginated result based solely on the returned pages list.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCount()intgetOffset()List<org.xwiki.model.reference.DocumentReference>getPages()intgetTotal()voidsetCount(int count)voidsetOffset(int offset)voidsetPages(List<org.xwiki.model.reference.DocumentReference> pages)voidsetTotal(int total)
-
-
-
Constructor Detail
-
PaginatedReferences
public PaginatedReferences()
Default constructor.
-
PaginatedReferences
public PaginatedReferences(List<org.xwiki.model.reference.DocumentReference> pages)
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 Detail
-
getPages
public List<org.xwiki.model.reference.DocumentReference> getPages()
- Returns:
- the list of pages retrieved from the data source. The members should be accurate to the offset and count attributes.
-
setPages
public void setPages(List<org.xwiki.model.reference.DocumentReference> pages)
- 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().
-
-