Package cn.dinodev.spring.data.domain
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
ConstructorsConstructorDescriptionLimitOffsetPageable(long offset, int limit) Creates a newOffsetBasedPageRequestwith sort parameters applied.LimitOffsetPageable(long offset, int limit, org.springframework.data.domain.Sort sort) Creates a newOffsetBasedPageRequestwith sort parameters applied.LimitOffsetPageable(long offset, int limit, org.springframework.data.domain.Sort.Direction direction, String... properties) Creates a newOffsetBasedPageRequestwith sort parameters applied. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Pageablefirst()longintintorg.springframework.data.domain.SortgetSort()booleanorg.springframework.data.domain.Pageablenext()previous()org.springframework.data.domain.Pageableorg.springframework.data.domain.PageablewithPage(int pageNumber) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 newOffsetBasedPageRequestwith 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 newOffsetBasedPageRequestwith sort parameters applied.- Parameters:
offset- zero-based offset.limit- the size of the elements 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.
-
LimitOffsetPageable
public LimitOffsetPageable(long offset, int limit) Creates a newOffsetBasedPageRequestwith 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:
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
-
next
public org.springframework.data.domain.Pageable next()- Specified by:
nextin interfaceorg.springframework.data.domain.Pageable
-
previous
-
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
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceorg.springframework.data.domain.Pageable
-
withPage
public org.springframework.data.domain.Pageable withPage(int pageNumber) - Specified by:
withPagein interfaceorg.springframework.data.domain.Pageable
-