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 OrderSpecifiers 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 OrderSpecifiers 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 OrderSpecifiers 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()
Pageablepublic Pageable next()
Pageablenext in interface Pageablenext in class AbstractPageRequestpublic Pageable previous()
AbstractPageRequestprevious in class AbstractPageRequestpublic Pageable first()
PageablePageable requesting the first page.first in interface Pageablefirst in class AbstractPageRequestpublic 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.