Interface SlicePaginationPicker<T>
-
- Type Parameters:
T- the type of the paginated object.
- All Known Subinterfaces:
PaginationTypePicker<T>,RepositoryOptionsPicker<A,I>
public interface SlicePaginationPicker<T>An element of thePaginatorDSL allowing to choose the pagination type. Two pagination types are supported:- Offset-based which allows to skip a specified amount of objects,
- Key-based which allows to select objects that come after a specific value of a specific attribute.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description KeyValuePicker<T>byAttribute(String attributeName)Choose a key-based pagination type.LimitPicker<Slice<T>,T>byOffset(long startingOffset)Choose an offset-based pagination type.
-
-
-
Method Detail
-
byOffset
LimitPicker<Slice<T>,T> byOffset(long startingOffset)
Choose an offset-based pagination type. Objects that come before the specified index will be skipped.- Parameters:
startingOffset- the index of first object that will be returned.- Returns:
- the next operation of the paginator DSL, allowing to specify a limit to the number of objects returned.
-
byAttribute
KeyValuePicker<T> byAttribute(String attributeName)
Choose a key-based pagination type.- Parameters:
attributeName- the attribute on which the lessThan/greaterThan comparison will be made.- Returns:
- the next operation of the paginator DSL, allowing to specify the value used as boundary.
-
-