|
Spring Data Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.domain.PageRequest
public class PageRequest
Basic Java Bean implementation of Pageable
.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Pageable |
first()
Returns the Pageable 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. |
Sort |
getSort()
Returns the sorting parameters. |
int |
hashCode()
|
boolean |
hasPrevious()
Returns whether there's a previous Pageable we can access from the current one. |
Pageable |
next()
Returns the Pageable requesting the next Page . |
Pageable |
previousOrFirst()
Returns the previous Pageable or the first Pageable if the current one already is the first one. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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
- can be null.Method Detail |
---|
public int getPageSize()
Pageable
getPageSize
in interface Pageable
public int getPageNumber()
Pageable
getPageNumber
in interface Pageable
public int getOffset()
Pageable
getOffset
in interface Pageable
public Sort getSort()
Pageable
getSort
in interface Pageable
public boolean hasPrevious()
Pageable
Pageable
we can access from the current one. Will return
false in case the current Pageable
already refers to the first page.
hasPrevious
in interface Pageable
public Pageable next()
Pageable
Pageable
requesting the next Page
.
next
in interface Pageable
public Pageable previousOrFirst()
Pageable
Pageable
or the first Pageable
if the current one already is the first one.
previousOrFirst
in interface Pageable
public Pageable first()
Pageable
Pageable
requesting the first page.
first
in interface Pageable
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
Spring Data Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |