Class SolrPageRequest
java.lang.Object
org.springframework.data.solr.core.query.SolrPageRequest
- All Implemented Interfaces:
org.springframework.data.domain.Pageable
Solr specific implementation of
Pageable allowing zero sized pages.-
Constructor Summary
ConstructorsConstructorDescriptionSolrPageRequest(int page, int size) Creates a newSolrPageRequest.SolrPageRequest(int page, int size, org.springframework.data.domain.Sort sort) Creates a newSolrPageRequestwith sort parameters applied.SolrPageRequest(int page, int size, org.springframework.data.domain.Sort.Direction direction, String... properties) Creates a newSolrPageRequestwith sort parameters applied. -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.springframework.data.domain.Pageablefirst()longintintorg.springframework.data.domain.SortgetSort()org.springframework.data.domain.SortgetSortOr(org.springframework.data.domain.Sort sort) inthashCode()booleanbooleanisPaged()booleanorg.springframework.data.domain.Pageablenext()org.springframework.data.domain.Pageableprevious()Returns thePageablerequesting the previousPage.org.springframework.data.domain.PageableOptional<org.springframework.data.domain.Pageable>org.springframework.data.domain.OffsetScrollPositiontoString()org.springframework.data.domain.PageablewithPage(int pageNumber)
-
Constructor Details
-
SolrPageRequest
public SolrPageRequest(int page, int size) Creates a newSolrPageRequest. Pages are zero indexed.- Parameters:
page- zero-based page index.size- the size of the page to be returned.
-
SolrPageRequest
public SolrPageRequest(int page, int size, org.springframework.data.domain.Sort.Direction direction, String... properties) Creates a newSolrPageRequestwith sort parameters applied.- Parameters:
page- zero-based page index.size- the size of the page to be returned.direction- the direction of theSortto be specified, can be null.properties- the properties to sort by, must not be null or empty.
-
SolrPageRequest
public SolrPageRequest(int page, int size, @Nullable org.springframework.data.domain.Sort sort) Creates a newSolrPageRequestwith sort parameters applied.- Parameters:
page- zero-based page index.size- the size of the page to be returned.sort- can be null.
-
-
Method Details
-
isPaged
public boolean isPaged()- Specified by:
isPagedin interfaceorg.springframework.data.domain.Pageable
-
isUnpaged
public boolean isUnpaged()- Specified by:
isUnpagedin interfaceorg.springframework.data.domain.Pageable
-
getPageNumber
public int getPageNumber()- Specified by:
getPageNumberin interfaceorg.springframework.data.domain.Pageable
-
getPageSize
public int getPageSize()- Specified by:
getPageSizein interfaceorg.springframework.data.domain.Pageable
-
getOffset
public long getOffset()- Specified by:
getOffsetin interfaceorg.springframework.data.domain.Pageable
-
getSort
public org.springframework.data.domain.Sort getSort()- Specified by:
getSortin interfaceorg.springframework.data.domain.Pageable
-
getSortOr
public org.springframework.data.domain.Sort getSortOr(org.springframework.data.domain.Sort sort) - Specified by:
getSortOrin interfaceorg.springframework.data.domain.Pageable
-
next
public org.springframework.data.domain.Pageable next()- Specified by:
nextin interfaceorg.springframework.data.domain.Pageable
-
previousOrFirst
public org.springframework.data.domain.Pageable previousOrFirst()- Specified by:
previousOrFirstin interfaceorg.springframework.data.domain.Pageable
-
first
public org.springframework.data.domain.Pageable first()- Specified by:
firstin interfaceorg.springframework.data.domain.Pageable
-
withPage
public org.springframework.data.domain.Pageable withPage(int pageNumber) - Specified by:
withPagein interfaceorg.springframework.data.domain.Pageable
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceorg.springframework.data.domain.Pageable
-
toOptional
- Specified by:
toOptionalin interfaceorg.springframework.data.domain.Pageable
-
toScrollPosition
public org.springframework.data.domain.OffsetScrollPosition toScrollPosition()- Specified by:
toScrollPositionin interfaceorg.springframework.data.domain.Pageable
-
previous
public org.springframework.data.domain.Pageable previous()Returns thePageablerequesting the previousPage.- Returns:
-
hashCode
public int hashCode() -
equals
-
toString
-