public final class Pager extends PageContext
| Modifier and Type | Class and Description |
|---|---|
static class |
Pager.Builder |
UNLIMITED_PAGE_SIZE| Constructor and Description |
|---|
Pager(int pageNumber,
int pageSize,
Iterable<Order> orders) |
Pager(int pageNumber,
int pageSize,
Order... orders) |
| Modifier and Type | Method and Description |
|---|---|
static Pager.Builder |
builder() |
Pager |
nextPage()
If this is a limited pager (
PageContext.isLimited()), returns the pager pointing to the next page of the results. |
Pager |
previousPage()
If this is a limited pager (
PageContext.isLimited()), returns the pager pointing to the previous page of the
results. |
static Pager |
unlimited(Iterable<Order> order)
Same as
unlimited(Order...) but the ordering represented by a collection. |
static Pager |
unlimited(Order... order)
The result should not be paged.
|
equals, getEnd, getOrder, getPageNumber, getPageSize, getStart, hashCode, isLimited, toStringpublic Pager(int pageNumber,
int pageSize,
Order... orders)
pageNumber - the number of the page to fetchpageSize - the number of the elements on the pageorders - the ordering of the results requiredpublic Pager(int pageNumber,
int pageSize,
Iterable<Order> orders)
pageNumber - see Pager(int, int, Order...)pageSize - see Pager(int, int, Order...)orders - see Pager(int, int, Order...)Pager(int, int, Order...)public static Pager.Builder builder()
public static Pager unlimited(Order... order)
order - the ordering of the resultspublic static Pager unlimited(Iterable<Order> order)
unlimited(Order...) but the ordering represented by a collection.order - the ordering of the resultspublic Pager nextPage()
PageContext.isLimited()), returns the pager pointing to the next page of the results.
If this is an unlimited pager, then simply returns this very pager because there can be no other page of the
results.public Pager previousPage()
PageContext.isLimited()), returns the pager pointing to the previous page of the
results.
If this is an unlimited pager, then simply returns this very pager because there can be no other page of the
results.Copyright © 2015–2016 Red Hat, Inc.. All rights reserved.