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 Details

    • 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 Details

    • 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 - see getPages().
    • getCount

      public int getCount()
      Returns:
      the number of items contained by the current result.
    • setCount

      public void setCount(int count)
      Parameters:
      count - see getCount().
    • 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 - see getOffset().
    • getTotal

      public int getTotal()
      Returns:
      the total number elements contained by the datasource.
    • setTotal

      public void setTotal(int total)
      Parameters:
      total - see getTotal().