Enum ReadAllQuery.Direction

java.lang.Object
java.lang.Enum<ReadAllQuery.Direction>
org.eclipse.persistence.queries.ReadAllQuery.Direction
All Implemented Interfaces:
Serializable, Comparable<ReadAllQuery.Direction>, java.lang.constant.Constable
Enclosing class:
ReadAllQuery

public static enum ReadAllQuery.Direction extends Enum<ReadAllQuery.Direction>
Specifies the direction in which the hierarchy is traversed in a hierarchical query.
  • Enum Constant Details

    • PARENT_TO_CHILD

      public static final ReadAllQuery.Direction PARENT_TO_CHILD
      Hierarchy will be traversed from parent to child - PRIOR keyword is generated on the left side of the equation
    • CHILD_TO_PARENT

      public static final ReadAllQuery.Direction CHILD_TO_PARENT
      Hierarchy will be traversed from child to parent - PRIOR keyword is generated on the right side of the equation
  • Method Details

    • values

      public static ReadAllQuery.Direction[] 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 ReadAllQuery.Direction 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
    • getDefault

      public static ReadAllQuery.Direction getDefault(DatabaseMapping mapping)
      PUBLIC: Returns the default hierarchy traversal direction for the specified mapping.
      For OneToOne mappings, source in parent object goes to target in child object, collections are the opposite way.
      Parameters:
      mapping - The mapping for which to return default hierarchy traversal direction
      Returns:
      The default hierarchy traversal direction for the mapping passed