Package jakarta.data.page
Enum Class Pageable.Mode
- All Implemented Interfaces:
- Serializable,- Comparable<Pageable.Mode>,- Constable
- Enclosing interface:
- Pageable
The type of pagination, which can be offset pagination or
 keyset cursor pagination which includes a direction.
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionIndicates forward keyset pagination, which follows the direction of theOrderByannotations,Pageable.sortBy(Sort...)orPageable.sortBy(Iterable)parameters, repository methodSortparameters, orOrderByname pattern of the repository method.Indicates a request for a page with keyset pagination in the reverse direction of theOrderByannotations,Pageable.sortBy(Sort...)orPageable.sortBy(Iterable)parameters, repository methodSortparameters, orOrderByname pattern of the repository method.Indicates a request for a page using offset pagination.
- 
Method SummaryModifier and TypeMethodDescriptionstatic Pageable.ModeReturns the enum constant of this class with the specified name.static Pageable.Mode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
CURSOR_NEXTIndicates forward keyset pagination, which follows the direction of theOrderByannotations,Pageable.sortBy(Sort...)orPageable.sortBy(Iterable)parameters, repository methodSortparameters, orOrderByname pattern of the repository method.
- 
CURSOR_PREVIOUSIndicates a request for a page with keyset pagination in the reverse direction of theOrderByannotations,Pageable.sortBy(Sort...)orPageable.sortBy(Iterable)parameters, repository methodSortparameters, orOrderByname pattern of the repository method. The order of results on each page follows the sort criteria and is not reversed.
- 
OFFSETIndicates a request for a page using offset pagination. The starting position for pages is computed as an offset from the first result based on the page number and maximum page size. Offset pagination is used when a cursor is not supplied.
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
 
-