public class PageRequest extends AbstractPageRequest
Pageable.| Constructor and Description |
|---|
PageRequest(int page,
int size)
Creates a new
PageRequest. |
PageRequest(int page,
int size,
Sort.Direction direction,
String... properties)
Creates a new
PageRequest with sort parameters applied. |
PageRequest(int page,
int size,
Sort sort)
Creates a new
PageRequest with sort parameters applied. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Pageable |
first()
Returns the
Pageable requesting the first page. |
Sort |
getSort()
Returns the sorting parameters.
|
int |
hashCode() |
Pageable |
next()
|
PageRequest |
previous()
|
String |
toString() |
getOffset, getPageNumber, getPageSize, hasPrevious, previousOrFirstpublic PageRequest(int page,
int size)
PageRequest. Pages are zero indexed, thus providing 0 for page will return the first
page.page - zero-based page index.size - the size of the page to be returned.public PageRequest(int page,
int size,
Sort.Direction direction,
String... properties)
PageRequest with sort parameters applied.page - zero-based page index.size - the size of the page to be returned.direction - the direction of the Sort to be specified, can be null.properties - the properties to sort by, must not be null or empty.public PageRequest(int page,
int size,
Sort sort)
PageRequest with sort parameters applied.page - zero-based page index.size - the size of the page to be returned.sort - can be null.public Sort getSort()
Pageablepublic Pageable next()
Pageablenext in interface Pageablenext in class AbstractPageRequestpublic PageRequest previous()
AbstractPageRequestprevious in class AbstractPageRequestpublic Pageable first()
PageablePageable requesting the first page.first in interface Pageablefirst in class AbstractPageRequestpublic boolean equals(Object obj)
equals in class AbstractPageRequestpublic int hashCode()
hashCode in class AbstractPageRequestCopyright © 2011-2014-2014 Pivotal. All Rights Reserved.