Enum IdentifierRole

java.lang.Object
java.lang.Enum<IdentifierRole>
org.eclipse.persistence.jpa.jpql.parser.IdentifierRole
All Implemented Interfaces:
Serializable, Comparable<IdentifierRole>

public enum IdentifierRole extends Enum<IdentifierRole>
A role describes the purpose of the JPQL identifier.
Version:
2.5
Author:
Pascal Filion
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Indicates the identifier aggregates two expressions together.
    Indicates the identifier is used to create a clause.
    Indicates the identifier is used to complement an expression, it is not required for creating an expression.
    Indicates the identifier is a kind of function, it does not return a value but it is used to perform some operation over an expression.
    Indicates the identifier is used to create a function, it has some parameters and returns a value.
    Indicates the identifier is not part of the language but it has been reserved for future use.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    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 Details

    • AGGREGATE

      public static final IdentifierRole AGGREGATE
      Indicates the identifier aggregates two expressions together. The identifiers are AND, OR, and the arithmetic operators.
    • CLAUSE

      public static final IdentifierRole CLAUSE
      Indicates the identifier is used to create a clause. They are the root of a portion of the query. An example is SELECT.
    • COMPLEMENT

      public static final IdentifierRole COMPLEMENT
      Indicates the identifier is used to complement an expression, it is not required for creating an expression. Examples are AS or OUTER.
    • COMPOUND_FUNCTION

      public static final IdentifierRole COMPOUND_FUNCTION
      Indicates the identifier is a kind of function, it does not return a value but it is used to perform some operation over an expression. The expression can have an expression before and after but it's not used to aggregate those two expression. An example is x MEMBER y.
    • FUNCTION

      public static final IdentifierRole FUNCTION
      Indicates the identifier is used to create a function, it has some parameters and returns a value. An example is ABS(x), usually the identifier has some values encapsulated with parenthesis.

      Note: TRUE, FALSE, NULL, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP are considered functions.

    • UNUSED

      public static final IdentifierRole UNUSED
      Indicates the identifier is not part of the language but it has been reserved for future use. The identifiers are BIT_LENGTH, CHAR_LENGTH, CHARACTER_LENGTH, POSITION, and UNKNOWN.
  • Method Details

    • values

      public static IdentifierRole[] 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 IdentifierRole 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