Class PageRequestWithOffset
java.lang.Object
org.springframework.data.domain.AbstractPageRequest
org.springframework.data.domain.PageRequest
ru.sergkorot.dynamic.model.paging.PageRequestWithOffset
- All Implemented Interfaces:
Serializable,org.springframework.data.domain.Pageable
public class PageRequestWithOffset
extends org.springframework.data.domain.PageRequest
- Author:
- Sergey Korotaev Implementing PageRequest with offset and without using page
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPageRequestWithOffset(int offset, int size, org.springframework.data.domain.Sort sort) Base Constructor for building PageRequest with offset and without using page -
Method Summary
Modifier and TypeMethodDescriptionlongstatic PageRequestWithOffsetof(int offset, int limit, org.springframework.data.domain.Sort sort) Static method for building PageRequest extensionstatic PageRequestWithOffsetStatic method for building PageRequest extensionMethods inherited from class org.springframework.data.domain.PageRequest
equals, first, getSort, hashCode, next, of, of, ofSize, previous, toString, withPage, withSort, withSortMethods inherited from class org.springframework.data.domain.AbstractPageRequest
getPageNumber, getPageSize, hasPrevious, previousOrFirstMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.data.domain.Pageable
getSortOr, isPaged, isUnpaged, toOptional, toScrollPosition
-
Constructor Details
-
PageRequestWithOffset
public PageRequestWithOffset(int offset, int size, org.springframework.data.domain.Sort sort) Base Constructor for building PageRequest with offset and without using page- Parameters:
offset- - Shift relative to the beginning of the listsize- - Number of list items to returnsort- - settings for sort
-
-
Method Details
-
of
public static PageRequestWithOffset of(Integer offset, Integer limit, List<org.springframework.data.domain.Sort.Order> sortOrders) Static method for building PageRequest extension- Parameters:
offset- - Shift relative to the beginning of the listlimit- - Number of list items to returnsortOrders- - list with settings for sort- Returns:
- - PageRequestWithOffset
-
of
public static PageRequestWithOffset of(int offset, int limit, @NonNull org.springframework.data.domain.Sort sort) Static method for building PageRequest extension- Parameters:
offset- - Shift relative to the beginning of the listlimit- - Number of list items to returnsort- - settings for sort- Returns:
- - PageRequestWithOffset
-
getOffset
public long getOffset()- Specified by:
getOffsetin interfaceorg.springframework.data.domain.Pageable- Overrides:
getOffsetin classorg.springframework.data.domain.AbstractPageRequest
-