Enum IdentifierRole

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

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

      Enum Constants 
      Enum Constant Description
      AGGREGATE
      Indicates the identifier aggregates two expressions together.
      CLAUSE
      Indicates the identifier is used to create a clause.
      COMPLEMENT
      Indicates the identifier is used to complement an expression, it is not required for creating an expression.
      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.
      FUNCTION
      Indicates the identifier is used to create a function, it has some parameters and returns a value.
      UNUSED
      Indicates the identifier is not part of the language but it has been reserved for future use.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static IdentifierRole valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static IdentifierRole[] 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

      • 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 Detail

      • values

        public static IdentifierRole[] 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 (IdentifierRole c : IdentifierRole.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

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