Enum Class Pageable.Mode

java.lang.Object
java.lang.Enum<Pageable.Mode>
io.micronaut.data.model.Pageable.Mode
All Implemented Interfaces:
Serializable, Comparable<Pageable.Mode>, Constable
Enclosing interface:
Pageable

public static enum Pageable.Mode extends Enum<Pageable.Mode>
The type of pagination: offset-based or currentCursor-based, which includes a direction.
Since:
4.8.0
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Indicates forward currentCursor-based pagination, which follows the direction of the sort criteria, using a currentCursor that is formed from the key of the last entity on the current page.
    Indicates a request for a page with currentCursor-based pagination in the previous page direction to the sort criteria, using a currentCursor that is formed from the key of first entity on the current page.
    Indicates a request for a page using offset pagination.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    static Pageable.Mode[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • CURSOR_NEXT

      public static final Pageable.Mode CURSOR_NEXT
      Indicates forward currentCursor-based pagination, which follows the direction of the sort criteria, using a currentCursor that is formed from the key of the last entity on the current page.
    • CURSOR_PREVIOUS

      public static final Pageable.Mode CURSOR_PREVIOUS
      Indicates a request for a page with currentCursor-based pagination in the previous page direction to the sort criteria, using a currentCursor that is formed from the key of first entity on the current page. The order of results on each page follows the sort criteria and is not reversed.
    • OFFSET

      public static final Pageable.Mode OFFSET
      Indicates 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 page and maximum page size. Offset pagination is used when a currentCursor is not supplied.
  • Method Details

    • values

      public static Pageable.Mode[] values()
      Returns 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
    • valueOf

      public static Pageable.Mode valueOf(String name)
      Returns 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