Class LimitOffsetPageable

java.lang.Object
cn.dinodev.spring.data.domain.LimitOffsetPageable
All Implemented Interfaces:
Serializable, org.springframework.data.domain.Pageable

public class LimitOffsetPageable extends Object implements org.springframework.data.domain.Pageable, Serializable
Author:
Cody Lu
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    LimitOffsetPageable(long offset, int limit)
    Creates a new OffsetBasedPageRequest with sort parameters applied.
    LimitOffsetPageable(long offset, int limit, org.springframework.data.domain.Sort sort)
    Creates a new OffsetBasedPageRequest with sort parameters applied.
    LimitOffsetPageable(long offset, int limit, org.springframework.data.domain.Sort.Direction direction, String... properties)
    Creates a new OffsetBasedPageRequest with sort parameters applied.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.data.domain.Pageable
     
    long
     
    int
     
    int
     
    org.springframework.data.domain.Sort
     
    boolean
     
    org.springframework.data.domain.Pageable
     
     
    org.springframework.data.domain.Pageable
     
    org.springframework.data.domain.Pageable
    withPage(int pageNumber)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.data.domain.Pageable

    getSortOr, isPaged, isUnpaged, toLimit, toOptional, toScrollPosition
  • Constructor Details

    • LimitOffsetPageable

      public LimitOffsetPageable(long offset, int limit, org.springframework.data.domain.Sort sort)
      Creates a new OffsetBasedPageRequest with sort parameters applied.
      Parameters:
      offset - zero-based offset.
      limit - the size of the elements to be returned.
      sort - can be null.
    • LimitOffsetPageable

      public LimitOffsetPageable(long offset, int limit, org.springframework.data.domain.Sort.Direction direction, String... properties)
      Creates a new OffsetBasedPageRequest with sort parameters applied.
      Parameters:
      offset - zero-based offset.
      limit - the size of the elements 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.
    • LimitOffsetPageable

      public LimitOffsetPageable(long offset, int limit)
      Creates a new OffsetBasedPageRequest with sort parameters applied.
      Parameters:
      offset - zero-based offset.
      limit - the size of the elements to be returned.
  • Method Details

    • 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
    • next

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

      public LimitOffsetPageable previous()
    • 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
    • hasPrevious

      public boolean hasPrevious()
      Specified by:
      hasPrevious 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