Class KeysetPageRequest
- java.lang.Object
-
- com.blazebit.persistence.deltaspike.data.PageRequest
-
- com.blazebit.persistence.deltaspike.data.KeysetPageRequest
-
- All Implemented Interfaces:
KeysetPageable,Pageable,Serializable
public class KeysetPageRequest extends PageRequest implements KeysetPageable
LikePageRequestbut with support for keyset pagination.- Since:
- 1.2.0
- Author:
- Christian Beikov
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description 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.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)KeysetPageablefirst()com.blazebit.persistence.KeysetPagegetKeysetPage()Returns the keyset page information.inthashCode()booleanisWithCountQuery()Returns whether count query execution is enabled or not.booleanisWithExtractAllKeysets()Returns whether extraction for all keysets is enabled or not.KeysetPageablenext()KeysetPageableprevious()KeysetPageablepreviousOrFirst()-
Methods inherited from class com.blazebit.persistence.deltaspike.data.PageRequest
getOffset, getPageNumber, getPageSize, getSort, hasPrevious, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.blazebit.persistence.deltaspike.data.Pageable
getOffset, getPageNumber, getPageSize, getSort, hasPrevious
-
-
-
-
Constructor Detail
-
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
public 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.- Parameters:
keysetPage- The keyset pagepageable- The pageable
-
KeysetPageRequest
public KeysetPageRequest(com.blazebit.persistence.KeysetPage keysetPage, Sort sort)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 Detail
-
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
public KeysetPageable 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
public KeysetPageable 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
public KeysetPageable 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
public KeysetPageable 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
public boolean equals(Object o)
- Overrides:
equalsin classPageRequest
-
hashCode
public int hashCode()
- Overrides:
hashCodein classPageRequest
-
-