Package | Description |
---|---|
org.nuiton.util.pagination |
This package contains all about pagination :
PaginationParameter to express the input pagination parameters when
preparing a query
PaginationOrder represents an order clause together with asc/desc
PaginationResult represents a list together with the pagination parameters
used to get the list of elements. |
Modifier and Type | Field and Description |
---|---|
static PaginationParameter |
PaginationParameter.ALL
An instance that represents a page of ALL elements
|
protected PaginationParameter |
PaginationResult.currentPage |
Modifier and Type | Method and Description |
---|---|
PaginationParameter |
PaginationParameter.PaginationParameterBuilder.build()
Final method that instantiates the immutable PaginationParameter
|
PaginationParameter |
PaginationResult.getCurrentPage() |
PaginationParameter |
PaginationResult.getFirstPage() |
PaginationParameter |
PaginationResult.getLastPage() |
PaginationParameter |
PaginationResult.getNextPage() |
PaginationParameter |
PaginationResult.getPreviousPage() |
static PaginationParameter |
PaginationParameter.of(int pageNumber,
int pageSize)
Method to create a PaginationParameter only based on pageNumber and pageSize (no order clauses).
|
static PaginationParameter |
PaginationParameter.of(int pageNumber,
int pageSize,
String orderClause1,
boolean orderDesc1)
Method to create a PaginationParameter based on pageNumber, pageSize and a single order clause.
|
static PaginationParameter |
PaginationParameter.of(int pageNumber,
int pageSize,
String orderClause1,
boolean orderDesc1,
String orderClause2,
boolean orderDesc2)
Method to create a PaginationParameter based on pageNumber, pageSize and two order clauses.
|
static PaginationParameter |
PaginationParameter.of(int pageNumber,
int pageSize,
String orderClause1,
boolean orderDesc1,
String orderClause2,
boolean orderDesc2,
String orderClause3,
boolean orderDesc3)
Method to create a PaginationParameter based on pageNumber, pageSize and three order clauses.
|
Modifier and Type | Method and Description |
---|---|
static <T> PaginationResult<T> |
PaginationResult.fromFullList(List<T> fullList,
PaginationParameter requestedPage)
Creates an instance using the full list of elements ({code}fullList{/code}) and the {code}requestedPage{/code}
PaginationParameter . |
static <T> PaginationResult<T> |
PaginationResult.of(List<T> elements,
long count,
PaginationParameter currentPage)
Creates an instance using the already computed list of {code}elements{/code} and {code}count{/count}, together
with the {code}currentPage{/code}
PaginationParameter used to build it. |
Constructor and Description |
---|
PaginationResult(List<O> elements,
long count,
PaginationParameter currentPage) |
Copyright © 2004–2020 CodeLutin. All rights reserved.