Enum Class Ordering.Direction

java.lang.Object
java.lang.Enum<Ordering.Direction>
ch.tocco.nice2.persist.core.api.query.Ordering.Direction
All Implemented Interfaces:
Serializable, Comparable<Ordering.Direction>, Constable
Enclosing class:
Ordering

public static enum Ordering.Direction extends Enum<Ordering.Direction>
One of ASCENDING, DESCENDING
  • Enum Constant Details

  • Method Details

    • values

      public static Ordering.Direction[] 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 Ordering.Direction 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
    • forSql

      public static Ordering.Direction forSql(String s) throws IllegalArgumentException
      Returns the direction based on the sql order type.
      Parameters:
      s - either "ASC" or "DESC", preferred in upper case
      Returns:
      the Direction enum value.
      Throws:
      IllegalArgumentException - on an invalid input.
    • flip

      public Ordering.Direction flip()