public class PageRequest extends AbstractPageRequest
Pageable
.Constructor and Description |
---|
PageRequest(int page,
int size)
Deprecated.
use
of(int, int) instead. |
PageRequest(int page,
int size,
Sort.Direction direction,
String... properties)
Deprecated.
use
#of(int, int, Direction, String...) instead. |
PageRequest(int page,
int size,
Sort sort)
Deprecated.
since 2.0, use
of(int, int, Sort) instead. |
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()
|
static PageRequest |
of(int page,
int size)
Creates a new unsorted
PageRequest . |
static PageRequest |
of(int page,
int size,
Sort.Direction direction,
String... properties)
Creates a new
PageRequest with sort direction and properties applied. |
static PageRequest |
of(int page,
int size,
Sort sort)
Creates a new
PageRequest with sort parameters applied. |
PageRequest |
previous()
|
String |
toString() |
getOffset, getPageNumber, getPageSize, hasPrevious, previousOrFirst
@Deprecated public PageRequest(int page, int size)
of(int, int)
instead.PageRequest
. Pages are zero indexed, thus providing 0 for page
will return the first
page.page
- zero-based page index, must not be negative.size
- the size of the page to be returned, must be greater than 0.@Deprecated public PageRequest(int page, int size, Sort.Direction direction, String... properties)
#of(int, int, Direction, String...)
instead.PageRequest
with sort parameters applied.page
- zero-based page index, must not be negative.direction
- the direction of the Sort
to be specified, must not be null.properties
- the properties to sort by, must not be null or empty.@Deprecated public PageRequest(int page, int size, Sort sort)
of(int, int, Sort)
instead.PageRequest
with sort parameters applied.page
- zero-based page index, must not be negative.size
- the size of the page to be returned, must be greater than 0.sort
- must not be null.public static PageRequest of(int page, int size)
PageRequest
.page
- zero-based page index, must not be negative.size
- the size of the page to be returned, must be greater than 0.public static PageRequest of(int page, int size, Sort sort)
PageRequest
with sort parameters applied.page
- zero-based page index, must not be negative.size
- the size of the page to be returned, must be greater than 0.sort
- must not be null.public static PageRequest of(int page, int size, Sort.Direction direction, String... properties)
PageRequest
with sort direction and properties applied.page
- zero-based page index, must not be negative.size
- the size of the page to be returned, must be greater than 0.direction
- must not be null.properties
- must not be null.public Sort getSort()
Pageable
public Pageable next()
Pageable
next
in interface Pageable
next
in class AbstractPageRequest
public PageRequest previous()
AbstractPageRequest
previous
in class AbstractPageRequest
public Pageable first()
Pageable
Pageable
requesting the first page.first
in interface Pageable
first
in class AbstractPageRequest
public boolean equals(@Nullable Object obj)
equals
in class AbstractPageRequest
public int hashCode()
hashCode
in class AbstractPageRequest
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.