Class KeysetPageRequest
java.lang.Object
org.springframework.data.domain.AbstractPageRequest
org.springframework.data.domain.PageRequest
com.blazebit.persistence.spring.data.repository.KeysetPageRequest
- All Implemented Interfaces:
KeysetPageable,Serializable,org.springframework.data.domain.Pageable
public class KeysetPageRequest
extends org.springframework.data.domain.PageRequest
implements KeysetPageable
Like
PageRequest but with support for keyset pagination.- Since:
- 1.6.9
- Author:
- Christian Beikov, Eugen Mayer
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionKeysetPageRequest(int page, int pageSize, com.blazebit.persistence.KeysetPage keysetPage, org.springframework.data.domain.Sort sort) Construct a page request with an optional keyset page that may be used for keyset pagination.KeysetPageRequest(com.blazebit.persistence.KeysetPage keysetPage, org.springframework.data.domain.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, org.springframework.data.domain.Sort sort) Construct a page request representing the current page via a keyset page and a sort specification.KeysetPageRequest(com.blazebit.persistence.KeysetPage keysetPage, org.springframework.data.domain.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, org.springframework.data.domain.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
Modifier and TypeMethodDescriptionbooleanfirst()intReturns the offset as int.com.blazebit.persistence.KeysetPageReturns the keyset page information.inthashCode()booleanReturns whether count query execution is enabled or not.booleanReturns whether extraction for all keysets is enabled or not.next()Methods inherited from class org.springframework.data.domain.PageRequest
getSort, of, of, of, ofSize, previous, toString, withPage, withSort, withSortMethods inherited from class org.springframework.data.domain.AbstractPageRequest
getOffset, getPageNumber, getPageSize, hasPreviousMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.data.domain.Pageable
getOffset, getPageNumber, getPageSize, getSort, getSortOr, hasPrevious, isPaged, isUnpaged, toOptional, toScrollPosition, withPage
-
Constructor Details
-
KeysetPageRequest
public KeysetPageRequest(int page, int pageSize, com.blazebit.persistence.KeysetPage keysetPage, org.springframework.data.domain.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, org.springframework.data.domain.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, org.springframework.data.domain.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, org.springframework.data.domain.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, org.springframework.data.domain.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
-
getIntOffset
public int getIntOffset()Description copied from interface:KeysetPageableReturns the offset as int.- Specified by:
getIntOffsetin interfaceKeysetPageable- Returns:
- The offset as int
-
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
- Specified by:
nextin interfaceorg.springframework.data.domain.Pageable- Overrides:
nextin classorg.springframework.data.domain.PageRequest
-
previousOrFirst
- Specified by:
previousOrFirstin interfaceorg.springframework.data.domain.Pageable- Overrides:
previousOrFirstin classorg.springframework.data.domain.AbstractPageRequest
-
first
- Specified by:
firstin interfaceorg.springframework.data.domain.Pageable- Overrides:
firstin classorg.springframework.data.domain.PageRequest
-
equals
- Overrides:
equalsin classorg.springframework.data.domain.PageRequest
-
hashCode
public int hashCode()- Overrides:
hashCodein classorg.springframework.data.domain.PageRequest
-