public class PageRequest extends Object implements Pageable, Serializable
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) |
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.
|
Sort |
getSort()
Returns the sorting parameters.
|
int |
hashCode() |
public PageRequest(int page, int size)
PageRequest
. Pages are zero indexed, thus providing 0 for page
will return the first
page.size
- page
- public PageRequest(int page, int size, Sort.Direction direction, String... properties)
PageRequest
with sort parameters applied.page
- size
- direction
- properties
- public PageRequest(int page, int size, Sort sort)
PageRequest
with sort parameters applied.page
- size
- sort
- public int getPageSize()
Pageable
getPageSize
in interface Pageable
public int getPageNumber()
Pageable
getPageNumber
in interface Pageable
public int getOffset()
Pageable
public Sort getSort()
Pageable
Copyright © 2012. All Rights Reserved.