public class QPageRequest extends AbstractPageRequest
Pageable
with support for QueryDSL.Constructor and Description |
---|
QPageRequest(int page,
int size)
Deprecated.
since 2.1, use
of(int, int) instead. |
QPageRequest(int page,
int size,
com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers)
Deprecated.
since 2.1, use
of(int, int, OrderSpecifier...) instead. |
QPageRequest(int page,
int size,
QSort sort)
Deprecated.
since 2.1, use
of(int, int, QSort) instead. |
Modifier and Type | Method and Description |
---|---|
Pageable |
first()
Returns the
Pageable requesting the first page. |
Sort |
getSort()
Returns the sorting parameters.
|
Pageable |
next()
|
static QPageRequest |
of(int page,
int size)
Creates a new
QPageRequest . |
static QPageRequest |
of(int page,
int size,
com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers)
Creates a new
QPageRequest with the given OrderSpecifier s applied. |
static QPageRequest |
of(int page,
int size,
QSort sort)
Creates a new
QPageRequest with sort parameters applied. |
static QPageRequest |
ofSize(int pageSize)
|
Pageable |
previous()
|
QPageRequest |
withPage(int pageNumber)
Creates a new
QPageRequest with pageNumber applied. |
QPageRequest |
withSort(QSort sort)
Creates a new
QPageRequest with QSort applied. |
equals, getOffset, getPageNumber, getPageSize, hashCode, hasPrevious, previousOrFirst
@Deprecated public QPageRequest(int page, int size)
of(int, int)
instead.QPageRequest
. Pages are zero indexed, thus providing 0 for page
will return the first
page.page
- must not be negative.size
- must be greater or equal to 0.@Deprecated public QPageRequest(int page, int size, com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers)
of(int, int, OrderSpecifier...)
instead.QPageRequest
with the given OrderSpecifier
s applied.page
- must not be negative.size
- must be greater or equal to 0.orderSpecifiers
- must not be null or empty;@Deprecated public QPageRequest(int page, int size, QSort sort)
of(int, int, QSort)
instead.QPageRequest
with sort parameters applied.page
- must not be negative.size
- must be greater or equal to 0.sort
- must not be null.public static QPageRequest of(int page, int size)
QPageRequest
. Pages are zero indexed, thus providing 0 for page
will return the first
page.page
- must not be negative.size
- must be greater or equal to 0.public static QPageRequest of(int page, int size, com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers)
QPageRequest
with the given OrderSpecifier
s applied.page
- must not be negative.size
- must be greater or equal to 0.orderSpecifiers
- must not be null or empty;public static QPageRequest of(int page, int size, QSort sort)
QPageRequest
with sort parameters applied.page
- must not be negative.size
- must be greater or equal to 0.sort
- must not be null.public static QPageRequest ofSize(int pageSize)
pageSize
- the size of the page to be returned, must be greater than 0.QPageRequest
.public Sort getSort()
Pageable
public Pageable next()
Pageable
next
in interface Pageable
next
in class AbstractPageRequest
public Pageable previous()
AbstractPageRequest
previous
in class AbstractPageRequest
public Pageable first()
Pageable
Pageable
requesting the first page.first
in interface Pageable
first
in class AbstractPageRequest
public QPageRequest withPage(int pageNumber)
QPageRequest
with pageNumber
applied.pageNumber
- PageRequest
.public QPageRequest withSort(QSort sort)
QPageRequest
with QSort
applied.sort
- must not be null.PageRequest
.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.