Class KeysetPageRequest
java.lang.Object
com.blazebit.persistence.deltaspike.data.PageRequest
com.blazebit.persistence.deltaspike.data.KeysetPageRequest
- All Implemented Interfaces:
KeysetPageable,Pageable,Serializable
Like
PageRequest but with support for keyset pagination.- Since:
- 1.2.0
- Author:
- Christian Beikov
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionKeysetPageRequest(int page, int pageSize, com.blazebit.persistence.KeysetPage keysetPage, Sort sort) Construct a page request with an optional keyset page that may be used for keyset pagination.KeysetPageRequest(com.blazebit.persistence.KeysetPage keysetPage, Pageable pageable) Construct a page request from a pageable with an optional keyset page that may be used for keyset pagination.KeysetPageRequest(com.blazebit.persistence.KeysetPage keysetPage, Sort sort) Construct a page request representing the current page via a keyset page and a sort specification.KeysetPageRequest(com.blazebit.persistence.KeysetPage keysetPage, Sort sort, int offset, int pageSize) Construct a page request with an optional keyset page that may be used for keyset pagination.KeysetPageRequest(com.blazebit.persistence.KeysetPage keysetPage, Sort sort, int offset, int pageSize, boolean withCountQuery, boolean withExtractAllKeysets) Construct a page request with an optional keyset page that may be used for keyset pagination and flags to enable the count query and keyset extraction. -
Method Summary
Methods inherited from class com.blazebit.persistence.deltaspike.data.PageRequest
getOffset, getPageNumber, getPageSize, getSort, hasPrevious, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.blazebit.persistence.deltaspike.data.Pageable
getOffset, getPageNumber, getPageSize, getSort, hasPrevious
-
Constructor Details
-
KeysetPageRequest
public KeysetPageRequest(int page, int pageSize, com.blazebit.persistence.KeysetPage keysetPage, Sort sort) Construct a page request with an optional keyset page that may be used for keyset pagination.- Parameters:
page- The page number, 0-basedpageSize- The number of elements per pagekeysetPage- The keyset pagesort- The sort specification
-
KeysetPageRequest
Construct a page request from a pageable with an optional keyset page that may be used for keyset pagination.- Parameters:
keysetPage- The keyset pagepageable- The pageable
-
KeysetPageRequest
Construct a page request representing the current page via a keyset page and a sort specification.- Parameters:
keysetPage- The keyset pagesort- The sort specification
-
KeysetPageRequest
public KeysetPageRequest(com.blazebit.persistence.KeysetPage keysetPage, Sort sort, int offset, int pageSize) Construct a page request with an optional keyset page that may be used for keyset pagination.- Parameters:
keysetPage- The keyset pagesort- The sort specificationoffset- The offset number, 0-basedpageSize- The number of elements per page- Since:
- 1.3.0
-
KeysetPageRequest
public KeysetPageRequest(com.blazebit.persistence.KeysetPage keysetPage, Sort sort, int offset, int pageSize, boolean withCountQuery, boolean withExtractAllKeysets) Construct a page request with an optional keyset page that may be used for keyset pagination and flags to enable the count query and keyset extraction.- Parameters:
keysetPage- The keyset pagesort- The sort specificationoffset- The offset number, 0-basedpageSize- The number of elements per pagewithCountQuery- True to enable the count querywithExtractAllKeysets- True to enable extraction of all keysets- Since:
- 1.4.0
-
-
Method Details
-
isWithCountQuery
public boolean isWithCountQuery()Description copied from interface:KeysetPageableReturns whether count query execution is enabled or not.- Specified by:
isWithCountQueryin interfaceKeysetPageable- Returns:
- true when enabled, false otherwise
-
isWithExtractAllKeysets
public boolean isWithExtractAllKeysets()Description copied from interface:KeysetPageableReturns whether extraction for all keysets is enabled or not.- Specified by:
isWithExtractAllKeysetsin interfaceKeysetPageable- Returns:
- true when enabled, false otherwise
-
getKeysetPage
public com.blazebit.persistence.KeysetPage getKeysetPage()Description copied from interface:KeysetPageableReturns the keyset page information.- Specified by:
getKeysetPagein interfaceKeysetPageable- Returns:
- The keyset page
-
next
Description copied from interface:Pageable- Specified by:
nextin interfaceKeysetPageable- Specified by:
nextin interfacePageable- Overrides:
nextin classPageRequest- Returns:
- The Pageable for the next Page
-
previous
Description copied from interface:PageableReturns the Pageable that can be used to request the previousPageor null if the current one already is the first one.- Specified by:
previousin interfaceKeysetPageable- Specified by:
previousin interfacePageable- Overrides:
previousin classPageRequest- Returns:
- The Pageable for the previous Page
-
previousOrFirst
Description copied from interface:PageableReturns the Pageable that can be used to request the previousPageor the first if the current one already is the first one.- Specified by:
previousOrFirstin interfaceKeysetPageable- Specified by:
previousOrFirstin interfacePageable- Overrides:
previousOrFirstin classPageRequest- Returns:
- The Pageable for the previous or first Page
-
first
Description copied from interface:Pageable- Specified by:
firstin interfaceKeysetPageable- Specified by:
firstin interfacePageable- Overrides:
firstin classPageRequest- Returns:
- The Pageable for the first Page
-
equals
- Overrides:
equalsin classPageRequest
-
hashCode
public int hashCode()- Overrides:
hashCodein classPageRequest
-