Class SolrPageRequest

java.lang.Object
org.springframework.data.solr.core.query.SolrPageRequest
All Implemented Interfaces:
org.springframework.data.domain.Pageable

public class SolrPageRequest extends Object implements org.springframework.data.domain.Pageable
Solr specific implementation of Pageable allowing zero sized pages.
  • Constructor Details

    • SolrPageRequest

      public SolrPageRequest(int page, int size)
      Creates a new SolrPageRequest. 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 new SolrPageRequest with sort parameters applied.
      Parameters:
      page - zero-based page index.
      size - the size of the page to be returned.
      direction - the direction of the Sort to 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 new SolrPageRequest with 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:
      isPaged in interface org.springframework.data.domain.Pageable
    • isUnpaged

      public boolean isUnpaged()
      Specified by:
      isUnpaged in interface org.springframework.data.domain.Pageable
    • getPageNumber

      public int getPageNumber()
      Specified by:
      getPageNumber in interface org.springframework.data.domain.Pageable
    • getPageSize

      public int getPageSize()
      Specified by:
      getPageSize in interface org.springframework.data.domain.Pageable
    • getOffset

      public long getOffset()
      Specified by:
      getOffset in interface org.springframework.data.domain.Pageable
    • getSort

      public org.springframework.data.domain.Sort getSort()
      Specified by:
      getSort in interface org.springframework.data.domain.Pageable
    • getSortOr

      public org.springframework.data.domain.Sort getSortOr(org.springframework.data.domain.Sort sort)
      Specified by:
      getSortOr in interface org.springframework.data.domain.Pageable
    • next

      public org.springframework.data.domain.Pageable next()
      Specified by:
      next in interface org.springframework.data.domain.Pageable
    • previousOrFirst

      public org.springframework.data.domain.Pageable previousOrFirst()
      Specified by:
      previousOrFirst in interface org.springframework.data.domain.Pageable
    • first

      public org.springframework.data.domain.Pageable first()
      Specified by:
      first in interface org.springframework.data.domain.Pageable
    • withPage

      public org.springframework.data.domain.Pageable withPage(int pageNumber)
      Specified by:
      withPage in interface org.springframework.data.domain.Pageable
    • hasPrevious

      public boolean hasPrevious()
      Specified by:
      hasPrevious in interface org.springframework.data.domain.Pageable
    • toOptional

      public Optional<org.springframework.data.domain.Pageable> toOptional()
      Specified by:
      toOptional in interface org.springframework.data.domain.Pageable
    • toScrollPosition

      public org.springframework.data.domain.OffsetScrollPosition toScrollPosition()
      Specified by:
      toScrollPosition in interface org.springframework.data.domain.Pageable
    • previous

      public org.springframework.data.domain.Pageable previous()
      Returns the Pageable requesting the previous Page.
      Returns:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object