PageRequestImpl
public interface PageRequest
Modifier and Type | Interface | Description |
---|---|---|
static class |
PageRequest.Builder |
Modifier and Type | Method | Description |
---|---|---|
static PageRequest.Builder |
defaultBuilder() |
|
PageRequest |
first() |
Returns the
PageRequest requesting the first page. |
int |
getOffset() |
Returns the offset to be taken according to the underlying page and page size.
|
int |
getPageNumber() |
Returns the page to be returned.
|
int |
getPageSize() |
Returns the number of items to be returned.
|
Sorting |
getSorting() |
Returns the sorting parameters.
|
boolean |
hasPrevious() |
Returns whether there's a previous
PageRequest we can access from the current one. |
PageRequest |
next() |
Returns the
PageRequest requesting the next page. |
PageRequest |
previousOrFirst() |
Returns the previous
PageRequest or the first PageRequest if the current one already is the first one. |
void |
setPageSize(int pageSize) |
Sets the number of items.
|
void |
setSorting(Sorting sorting) |
Sets the sorting parameters.
|
int getPageNumber()
int getPageSize()
int getOffset()
Sorting getSorting()
PageRequest next()
PageRequest
requesting the next page.PageRequest previousOrFirst()
PageRequest
or the first PageRequest
if the current one already is the first one.PageRequest first()
PageRequest
requesting the first page.boolean hasPrevious()
PageRequest
we can access from the current one. Will return false in case the current PageRequest
already refers to the first page.void setPageSize(int pageSize)
pageSize
- the number of items of that pagevoid setSorting(Sorting sorting)
sorting
- the sorting parametersstatic PageRequest.Builder defaultBuilder()
Copyright © 2018. All rights reserved.