Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.jpa.internal.jpql.parser
Enum IdentifierRole

java.lang.Object
  extended by java.lang.Enum<IdentifierRole>
      extended by org.eclipse.persistence.jpa.internal.jpql.parser.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. To retrieve the role of an identifier, one can use AbstractExpression.identifierRole(String) where the string is the identifier.

Since:
2.3
Version:
2.3
Author:
Pascal Filion

Enum Constant Summary
AGGREGATE
          Indicates the identifier aggregates two expressions together.
CLAUSE
          Indicates the identifier is used to create a clause.
COMPLETEMENT
          Indicates the identifier is used to complement an expression, it is not required for creating an expression.
COMPOUND_FUNCTION
          Indicates the identifier is kind of a function, it does not return a value but it is used to perform some operation over some 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
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 /.

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.

COMPLETEMENT

public static final IdentifierRole COMPLETEMENT
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 kind of a function, it does not return a value but it is used to perform some operation over some expression. The expression can have an expression before and then 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

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.