Enum PaginationSignalSource

java.lang.Object
java.lang.Enum<PaginationSignalSource>
com.shri.restinpeace.annotation.pagination.PaginationSignalSource
All Implemented Interfaces:
Serializable, Comparable<PaginationSignalSource>, java.lang.constant.Constable

public enum PaginationSignalSource extends Enum<PaginationSignalSource>
Where one particular @Paginated signal comes from - reused across pointerSource, hasMoreSource, totalSource, and totalPagesSource (one enum, four uses, not four renamed near-duplicates) per docs/design/pagination-helper.md §6.1.

ITEM_FIELD is only meaningful for pointerSource - keyset pagination derives the next pointer from the last fetched item itself (§6.6), a concept that doesn't apply to a hasMore/total-count signal - RIP.getClient(...) rejects it for any other attribute.

  • Enum Constant Details

    • RESPONSE_BODY

      public static final PaginationSignalSource RESPONSE_BODY
      Read from the (possibly nested) response body.
    • RESPONSE_HEADER

      public static final PaginationSignalSource RESPONSE_HEADER
      Read from a response header.
    • ITEM_FIELD

      public static final PaginationSignalSource ITEM_FIELD
      Derived from the last fetched item, for pointerSource only.
    • NONE

      public static final PaginationSignalSource NONE
      No such signal - this attribute isn't used.
  • Method Details

    • values

      public static PaginationSignalSource[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PaginationSignalSource valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null