Enum PaginationStrategy

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<PaginationStrategy>

    public enum PaginationStrategy
    extends java.lang.Enum<PaginationStrategy>
    The type of pagination strategy used by a resource.
    Author:
    cdivilly
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ITEM_OFFSET
      The resource is paginated by identifying the offset of the first item to include in the page.
      NONE
      The resource is not paginated by ORDS.
      NOT_PAGINATED
      The resource is explicitly not paginated.
      PAGE_OFFSET
      The resource is paginated by a page offset.
      RESULT_SET_PAGINATION
      The resource is not paginated by modifying the query, instead the query is executed as is , but the number of rows returned is limited to the number specified by the limit
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean paginated​(PaginationStrategy pagination)
      Test if a Pagination Strategy requires pagination
      static PaginationStrategy valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static PaginationStrategy[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

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

      • NONE

        public static final PaginationStrategy NONE
        The resource is not paginated by ORDS. It may be paginated by the servlet itself
      • ITEM_OFFSET

        public static final PaginationStrategy ITEM_OFFSET
        The resource is paginated by identifying the offset of the first item to include in the page. This is the default strategy and the one specified by the Oracle REST Services Standard.
      • PAGE_OFFSET

        public static final PaginationStrategy PAGE_OFFSET
        The resource is paginated by a page offset. This is the legacy pagination strategy used in earlier versions of the product.
      • NOT_PAGINATED

        public static final PaginationStrategy NOT_PAGINATED
        The resource is explicitly not paginated. Presence of pagination parameters in the request query string indicate an error.
      • RESULT_SET_PAGINATION

        public static final PaginationStrategy RESULT_SET_PAGINATION
        The resource is not paginated by modifying the query, instead the query is executed as is , but the number of rows returned is limited to the number specified by the limit
    • Method Detail

      • values

        public static PaginationStrategy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PaginationStrategy c : PaginationStrategy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PaginationStrategy valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • paginated

        public static boolean paginated​(PaginationStrategy pagination)
        Test if a Pagination Strategy requires pagination
        Parameters:
        pagination - The strategy to test
        Returns:
        true if the resource is paginated