Class PaginatedResult<T>
java.lang.Object
com.xwiki.projectmanagement.model.PaginatedResult<T>
- Type Parameters:
T- the type of the data held by this class.
The representation of a paginated result that contains useful information for following requests, such as the total
number of requested items present in the database.
- Since:
- 1.0
- Version:
- $Id$
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor that initializes the items with an empty list. -
Method Summary
Modifier and TypeMethodDescriptiongetItems()getPage()voidvoidvoidsetPageSize(Integer pageSize) voidsetTotalItems(Integer totalItems)
-
Constructor Details
-
PaginatedResult
public PaginatedResult()Default constructor that initializes the items with an empty list. -
PaginatedResult
- Parameters:
items- the items contained by this paginated result. The size of the items should be smaller than the pageSize.page- which page does this object represent.pageSize- the number of items present in this paginated result.totalItems- the total number of items that can are present in the store where this paginated result is retrieved.
-
-
Method Details
-
getItems
- Returns:
- the list of items that are present in this paginated result.
-
setItems
- Parameters:
items- seegetItems().
-
getPage
- Returns:
- the number of the page.
-
setPage
- Parameters:
page- seegetPage().
-
getPageSize
- Returns:
- the maximum number of elements the
getItems()can contain.
-
setPageSize
- Parameters:
pageSize- seegetPageSize().
-
getTotalItems
- Returns:
- the total number of items that can be retrieved from the store where this paginated result was retrieved from.
-
setTotalItems
- Parameters:
totalItems- seegetTotalItems().
-