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
Interface Expression

All Known Implementing Classes:
AbsExpression, AbstractConditionalClause, AbstractDoubleEncapsulatedExpression, AbstractEncapsulatedExpression, AbstractExpression, AbstractFromClause, AbstractPathExpression, AbstractSchemaName, AbstractSelectClause, AbstractSelectStatement, AbstractSingleEncapsulatedExpression, AbstractTripleEncapsulatedExpression, AdditionExpression, AggregateFunction, AllOrAnyExpression, AndExpression, ArithmeticExpression, ArithmeticFactor, AvgFunction, BadExpression, BetweenExpression, CaseExpression, CoalesceExpression, CollectionExpression, CollectionMemberDeclaration, CollectionMemberExpression, CollectionValuedPathExpression, ComparisonExpression, CompoundExpression, ConcatExpression, ConstructorExpression, CountFunction, DateTime, DeleteClause, DeleteStatement, DivisionExpression, EmptyCollectionComparisonExpression, EncapsulatedIdentificationVariableExpression, EntityTypeLiteral, EntryExpression, ExistsExpression, FromClause, FuncExpression, GroupByClause, HavingClause, IdentificationVariable, IdentificationVariableDeclaration, IndexExpression, InExpression, InputParameter, Join, JoinFetch, JPQLExpression, KeyExpression, KeywordExpression, LengthExpression, LikeExpression, LocateExpression, LogicalExpression, LowerExpression, MaxFunction, MinFunction, ModExpression, MultiplicationExpression, NotExpression, NullComparisonExpression, NullExpression, NullIfExpression, NumericLiteral, ObjectExpression, OrderByClause, OrderByItem, OrExpression, RangeVariableDeclaration, ResultVariable, SelectClause, SelectStatement, SimpleFromClause, SimpleSelectClause, SimpleSelectStatement, SizeExpression, SqrtExpression, StateFieldPathExpression, StringLiteral, SubExpression, SubstringExpression, SubtractionExpression, SumFunction, TreatExpression, TrimExpression, TypeExpression, UnknownExpression, UpdateClause, UpdateItem, UpdateStatement, UpperExpression, ValueExpression, WhenClause, WhereClause

public interface Expression

This is the root interface of the Java Persistence query parsed tree. The parser supports the latest release of the JPQL functional specification, which is JSR 317: Java™ Persistence 2.0

The BNF for the Java Persistence query language, version 2.0:

 QL_statement ::= select_statement | update_statement | delete_statement

 select_statement ::= select_clause from_clause [where_clause] [groupby_clause] [having_clause] [orderby_clause]

 update_statement ::= update_clause [where_clause]

 delete_statement ::= delete_clause [where_clause]

 from_clause ::= FROM identification_variable_declaration {, {identification_variable_declaration | collection_member_declaration}}*

 identification_variable_declaration ::= range_variable_declaration { join | fetch_join }*

 range_variable_declaration ::= entity_name [AS] identification_variable

 join ::= join_spec join_association_path_expression [AS] identification_variable

 fetch_join ::= join_spec FETCH join_association_path_expression

 join_spec ::= [ LEFT [OUTER] | INNER ] JOIN

 join_association_path_expression ::= join_collection_valued_path_expression |
                                      join_single_valued_path_expression

 join_collection_valued_path_expression ::= identification_variable.{single_valued_embeddable_object_field.}*collection_valued_field

 join_single_valued_path_expression ::= identification_variable.{single_valued_embeddable_object_field.}*single_valued_object_field

 collection_member_declaration ::= IN (collection_valued_path_expression) [AS] identification_variable

 qualified_identification_variable ::= KEY(identification_variable) |
                                       VALUE(identification_variable) |
                                       ENTRY(identification_variable)

 single_valued_path_expression ::= qualified_identification_variable |
                                   state_field_path_expression |
                                   single_valued_object_path_expression

 general_identification_variable ::= identification_variable |
                                     KEY(identification_variable) |
                                     VALUE(identification_variable)

 state_field_path_expression ::= general_identification_variable.{single_valued_object_field.}*state_field

 single_valued_object_path_expression ::= general_identification_variable.{single_valued_object_field.}*single_valued_object_field

 collection_valued_path_expression ::= general_identification_variable.{single_valued_object_field.}*collection_valued_field

 update_clause ::= UPDATE entity_name [[AS] identification_variable] SET update_item {, update_item}*

 update_item ::= [identification_variable.]{state_field | single_valued_object_field} = new_value

 new_value ::= scalar_expression | simple_entity_expression | NULL

 delete_clause ::= DELETE FROM entity_name [[AS] identification_variable]

 select_clause ::= SELECT [DISTINCT] select_item {, select_item}*

 select_item ::= select_expression [[AS] result_variable]

 select_expression ::= single_valued_path_expression |
                       scalar_expression |
                       aggregate_expression |
                       identification_variable |
                       OBJECT(identification_variable) |
                       constructor_expression

 constructor_expression ::= NEW constructor_name ( constructor_item {, constructor_item}* )

 constructor_item ::= single_valued_path_expression |
                      scalar_expression |
                      aggregate_expression |
                      identification_variable

 aggregate_expression ::= { AVG | MAX | MIN | SUM } ([DISTINCT] state_field_path_expression) |
                          COUNT ([DISTINCT] identification_variable |
                                            state_field_path_expression |
                                            single_valued_object_path_expression)

 where_clause ::= WHERE conditional_expression

 groupby_clause ::= GROUP BY groupby_item {, groupby_item}*

 groupby_item ::= single_valued_path_expression | identification_variable

 having_clause ::= HAVING conditional_expression

 orderby_clause ::= ORDER BY orderby_item {, orderby_item}*

 orderby_item ::= state_field_path_expression | result_variable [ ASC | DESC ]

 subquery ::= simple_select_clause subquery_from_clause [where_clause] [groupby_clause] [having_clause]

 subquery_from_clause ::= FROM subselect_identification_variable_declaration {, subselect_identification_variable_declaration | collection_member_declaration}*

 subselect_identification_variable_declaration ::= identification_variable_declaration |
                                                   derived_path_expression [AS] identification_variable {join}* |
                                                   derived_collection_member_declaration

 derived_path_expression ::= superquery_identification_variable.{single_valued_object_field.}*collection_valued_field |
                             superquery_identification_variable.{single_valued_object_field.}*single_valued_object_field

 derived_collection_member_declaration ::= IN superquery_identification_variable.{single_valued_object_field.}*collection_valued_field

 simple_select_clause ::= SELECT [DISTINCT] simple_select_expression

 simple_select_expression ::= single_valued_path_expression |
                              scalar_expression |
                              aggregate_expression |
                              identification_variable

 scalar_expression ::= simple_arithmetic_expression |
                       string_primary |
                       enum_primary |
                       datetime_primary |
                       boolean_primary |
                       case_expression |
                       entity_type_expression

 conditional_expression ::= conditional_term | conditional_expression OR conditional_term

 conditional_term ::= conditional_factor | conditional_term AND conditional_factor

 conditional_factor ::= [ NOT ] conditional_primary

 conditional_primary ::= simple_cond_expression | (conditional_expression)

 simple_cond_expression ::= comparison_expression |
                            between_expression |
                            in_expression |
                            like_expression |
                            null_comparison_expression |
                            empty_collection_comparison_expression |
                            collection_member_expression |
                            exists_expression

 between_expression ::= arithmetic_expression [NOT] BETWEEN arithmetic_expression AND arithmetic_expression |
                        string_expression [NOT] BETWEEN string_expression AND string_expression |
                        datetime_expression [NOT] BETWEEN datetime_expression AND datetime_expression

 in_expression ::= {state_field_path_expression | type_discriminator} [NOT] IN { ( in_item {, in_item}* ) | (subquery) | collection_valued_input_parameter }

 in_item ::= literal | single_valued_input_parameter

 like_expression ::= string_expression [NOT] LIKE pattern_value [ESCAPE escape_character]

 null_comparison_expression ::= {single_valued_path_expression | input_parameter} IS [NOT] NULL

 empty_collection_comparison_expression ::= collection_valued_path_expression IS [NOT] EMPTY

 collection_member_expression ::= entity_or_value_expression [NOT] MEMBER [OF] collection_valued_path_expression

 entity_or_value_expression ::= single_valued_object_path_expression |
                                state_field_path_expression |
                                simple_entity_or_value_expression

 simple_entity_or_value_expression ::= identification_variable |
                                       input_parameter |
                                       literal

 exists_expression ::= [NOT] EXISTS (subquery)

 all_or_any_expression ::= { ALL | ANY | SOME} (subquery)

 comparison_expression ::= string_expression comparison_operator {string_expression | all_or_any_expression} |
                           boolean_expression { = | <> } {boolean_expression | all_or_any_expression} |
                           enum_expression { =|<> } {enum_expression | all_or_any_expression} |
                           datetime_expression comparison_operator {datetime_expression | all_or_any_expression} |
                           entity_expression { = | <> } {entity_expression | all_or_any_expression} |
                           arithmetic_expression comparison_operator {arithmetic_expression | all_or_any_expression} |
                           entity_type_expression { = | <> } entity_type_expression}

 comparison_operator ::= = | > | >= | < | <= | <>

 arithmetic_expression ::= simple_arithmetic_expression | (subquery)

 simple_arithmetic_expression ::= arithmetic_term | simple_arithmetic_expression { + | - } arithmetic_term

 arithmetic_term ::= arithmetic_factor | arithmetic_term { * | / } arithmetic_factor

 arithmetic_factor ::= [{ + | - }] arithmetic_primary

 arithmetic_primary ::= state_field_path_expression |
                        numeric_literal |
                        (simple_arithmetic_expression) |
                        input_parameter |
                        functions_returning_numerics |
                        aggregate_expression |
                        case_expression

 string_expression ::= string_primary | (subquery)

 string_primary ::= state_field_path_expression |
                    string_literal |
                    input_parameter |
                    functions_returning_strings |
                    aggregate_expression |
                    case_expression

 datetime_primary ::= state_field_path_expression |
                      input_parameter |
                      functions_returning_datetime |
                      aggregate_expression |
                      case_expression |
                      date_time_timestamp_literal

 datetime_expression ::= datetime_primary | (subquery)

 boolean_expression ::= boolean_primary | (subquery)

 boolean_primary ::= state_field_path_expression |
                     boolean_literal |
                     input_parameter |
                     case_expression

 enum_expression ::= enum_primary | (subquery)

 enum_primary ::= state_field_path_expression |
                  enum_literal |
                  input_parameter |
                  case_expression

 entity_expression ::= single_valued_object_path_expression | simple_entity_expression

 simple_entity_expression ::= identification_variable |
                              input_parameter

 entity_type_expression ::= type_discriminator |
                            entity_type_literal |
                            input_parameter

 type_discriminator ::= TYPE(identification_variable | single_valued_object_path_expression | input_parameter)

 functions_returning_numerics ::= LENGTH(string_primary) |
                                  LOCATE(string_primary, string_primary[, simple_arithmetic_expression]) |
                                  ABS(simple_arithmetic_expression) |
                                  SQRT(simple_arithmetic_expression) |
                                  MOD(simple_arithmetic_expression, simple_arithmetic_expression) |
                                  SIZE(collection_valued_path_expression) |
                                  INDEX(identification_variable)

 functions_returning_datetime ::= CURRENT_DATE | CURRENT_TIME | CURRENT_TIMESTAMP | literalTemporal

 functions_returning_strings ::= CONCAT(string_primary, string_primary {, string_primary}*) |
                                 SUBSTRING(string_primary, simple_arithmetic_expression [, simple_arithmetic_expression]) |
                                 TRIM([[trim_specification] [trim_character] FROM] string_primary) |
                                 LOWER(string_primary) |
                                 UPPER(string_primary)

 trim_specification ::= LEADING | TRAILING | BOTH

 trim_character ::= string_literal | input_parameter

 case_expression ::= general_case_expression |
                     simple_case_expression |
                     coalesce_expression |
                     nullif_expression

 general_case_expression ::= CASE when_clause {when_clause}* ELSE scalar_expression END

 when_clause ::= WHEN conditional_expression THEN scalar_expression

 simple_case_expression ::= CASE case_operand simple_when_clause {simple_when_clause}* ELSE scalar_expression END

 case_operand ::= state_field_path_expression | type_discriminator

 simple_when_clause ::= WHEN scalar_expression THEN scalar_expression

 coalesce_expression ::= COALESCE(scalar_expression {, scalar_expression}+)

 nullif_expression ::= NULLIF(scalar_expression, scalar_expression)

 boolean_literal ::= TRUE | FALSE

 string_literal ::= 'string'

 enum_literal ::= {package_name.}*EnumType.CONSTANT

 literalTemporal ::= date_literal | TIME_LITERAL | TIMESTAMP_LITERAL

 date_literal ::= "{" "'d'" (' ' | '\t')+ '\'' DATE_STRING '\'' (' ' | '\t')* "}"

 TIME_LITERAL ::= "{" "'t'" (' ' | '\t')+ '\'' TIME_STRING '\'' (' ' | '\t')* "}"

 TIMESTAMP_LITERAL ::= "{" ('ts') (' ' | '\t')+ '\'' DATE_STRING ' ' TIME_STRING '\'' (' ' | '\t')* "}"

 DATE_STRING ::= '0'..'9' '0'..'9' '0'..'9' '0'..'9' '-' '0'..'9' '0'..'9' '-' '0'..'9' '0'..'9'

 TIME_STRING ::= '0'..'9' ('0'..'9')? ':' '0'..'9' '0'..'9' ':' '0'..'9' '0'..'9' '.' '0'..'9'*
 

The following BNFs is the EclipseLink's extension over the standard JPQL BNF.

join ::= join_spec { join_association_path_expression | join_treat_association_path_expression } [AS] identification_variable

 join_treat_association_path_expression ::= TREAT(join_association_path_expression AS entity_type_literal)

 functions_returning_strings ::= ... | func_expression

 functions_returning_numerics ::= ... | func_expression

 functions_returning_datetime ::= ... | func_expression

 func_expression ::= FUNC (func_name {, func_item}*)

 func_item ::= scalar_expression (NOT SURE)

 orderby_item ::= state_field_path_expression | result_variable | scalar_expression [ ASC | DESC ]

 groupby_item ::= single_valued_path_expression | identification_variable | scalar_expression

 aggregate_expression ::= { AVG | MAX | MIN | SUM | COUNT } ([DISTINCT] scalar_expression)

 in_item ::= literal | single_valued_input_parameter | scalar_expression

 
Since:
2.3
Version:
2.3
Author:
Pascal Filion

Field Summary
static java.lang.String ABS
          The constant for 'ABS'.
static java.lang.String ALL
          The constant for 'ALL'.
static java.lang.String AND
          The constant for 'AND'.
static java.lang.String ANY
          The constant for 'ANY'.
static java.lang.String AS
          The constant for 'AS'.
static java.lang.String ASC
          The constant for 'ASC'.
static java.lang.String AVG
          The constant for 'AVG'.
static java.lang.String BETWEEN
          The constant for 'BETWEEN'.
static java.lang.String BIT_LENGTH
          The constant for 'BIT_LENGTH', which is an unused keyword.
static java.lang.String BOTH
          The constant for 'BOTH'.
static java.lang.String CASE
          The constant for the identifier 'CASE'.
static java.lang.String CHAR_LENGTH
          The constant for 'CHAR_LENGTH', which is an unused keyword.
static java.lang.String CHARACTER_LENGTH
          The constant for 'CHARACTER_LENGTH', which is an unused keyword.
static java.lang.String CLASS
          The constant for 'CLASS', which is an unused keyword.
static java.lang.String COALESCE
          The constant for 'COALESCE'.
static java.lang.String CONCAT
          The constant for 'CONCAT'.
static java.lang.String COUNT
          The constant for 'COUNT'.
static java.lang.String CURRENT_DATE
          The constant for 'CURRENT_DATE'.
static java.lang.String CURRENT_TIME
          The constant for 'CURRENT_DATE'.
static java.lang.String CURRENT_TIMESTAMP
          The constant for 'CURRENT_TIMESTAMP'.
static java.lang.String DELETE
          The constant for 'DELETE'.
static java.lang.String DELETE_FROM
          The constant for 'DELETE FROM'.
static java.lang.String DESC
          The constant for 'DESC'.
static java.lang.String DIFFERENT
          The constant for '<>'.
static java.lang.String DISTINCT
          The constant for 'DISTINCT'.
static java.lang.String DIVISION
          The constant for the division sign '/'.
static java.lang.String ELSE
          The constant for the identifier 'ELSE'.
static java.lang.String EMPTY
          The constant for 'EMPTY'.
static java.lang.String END
          The constant for the identifier 'END'.
static java.lang.String ENTRY
          The constant for 'ENTRY'.
static java.lang.String EQUAL
          The constant for '='.
static java.lang.String ESCAPE
          The constant for 'ESCAPE'.
static java.lang.String EXISTS
          The constant for 'EXISTS'.
static java.lang.String FALSE
          The constant for 'FALSE'.
static java.lang.String FETCH
          A constant for 'FETCH'.
static java.lang.String FROM
          The constant for 'FROM'.
static java.lang.String FUNC
          The constant 'FUNC'.
static java.lang.String GREATER_THAN
          The constant for '>'.
static java.lang.String GREATER_THAN_OR_EQUAL
          The constant for '>='.
static java.lang.String GROUP_BY
          The constant for 'GROUP BY'.
static java.lang.String HAVING
          The constant for 'HAVING'.
static java.lang.String IN
          The constant for 'IN'.
static java.lang.String INDEX
          The constant for 'INDEX'.
static java.lang.String INNER
          The constant for 'INNER'.
static java.lang.String INNER_JOIN
          The constant for 'INNER JOIN'.
static java.lang.String INNER_JOIN_FETCH
          The constant for 'INNER JOIN FETCH'.
static java.lang.String IS
          The constant for 'IS'.
static java.lang.String IS_EMPTY
          The constant for 'IS EMPTY'.
static java.lang.String IS_NOT_EMPTY
          The constant for 'IS NOT EMPTY'.
static java.lang.String IS_NOT_NULL
          The constant for 'IS NOT NULL'.
static java.lang.String IS_NULL
          The constant for 'IS NULL'.
static java.lang.String JOIN
          The constant for 'JOIN'.
static java.lang.String JOIN_FETCH
          The constant for 'JOIN FETCH'.
static java.lang.String KEY
          The constant for 'KEY'.
static java.lang.String LEADING
          The constant for 'LEADING'.
static java.lang.String LEFT
          The constant for 'LEFT'.
static java.lang.String LEFT_JOIN
          The constant for 'LEFT JOIN'.
static java.lang.String LEFT_JOIN_FETCH
          The constant for 'LEFT JOIN FETCH'.
static java.lang.String LEFT_OUTER_JOIN
          The constant for 'LEFT OUTER JOIN'.
static java.lang.String LEFT_OUTER_JOIN_FETCH
          The constant for 'LEFT OUTER JOIN FETCH'.
static java.lang.String LENGTH
          The constant for 'LENGTH'.
static java.lang.String LIKE
          The constant for 'LIKE'.
static java.lang.String LOCATE
          The constant for 'LOCATE'.
static java.lang.String LOWER
          The constant for 'LOWER'.
static java.lang.String LOWER_THAN
          The constant for '<'.
static java.lang.String LOWER_THAN_OR_EQUAL
          The constant for '<='.
static java.lang.String MAX
          The constant for 'MAX'.
static java.lang.String MEMBER
          The constant for 'MEMBER'.
static java.lang.String MEMBER_OF
          The constant for 'MEMBER OF'.
static java.lang.String MIN
          The constant for 'MIN'.
static java.lang.String MINUS
          The constant for the minus sign '-'.
static java.lang.String MOD
          The constant for 'MOD'.
static java.lang.String MULTIPLICATION
          The constant for multiplication sign '*'.
static java.lang.String NAMED_PARAMETER
          The constant for ':'.
static java.lang.String NEW
          The constant for 'NEW'.
static java.lang.String NOT
          The constant for 'NOT'.
static java.lang.String NOT_BETWEEN
          The constant for 'NOT BETWEEN'.
static java.lang.String NOT_EXISTS
          The constant for 'NOT EXISTS'.
static java.lang.String NOT_IN
          The constant for 'NOT IN'.
static java.lang.String NOT_LIKE
          The constant for 'NOT LIKE'.
static java.lang.String NOT_MEMBER
          The constant for 'NOT MEMBER'.
static java.lang.String NOT_MEMBER_OF
          The constant for 'NOT MEMBER OF'.
static java.lang.String NULL
          The constant for 'NULL'.
static java.lang.String NULLIF
          The constant for 'NULLIF'.
static java.lang.String OBJECT
          The constant for 'OBJECT'.
static java.lang.String OF
          The constant for 'OF'.
static java.lang.String OR
          The constant for 'OR'.
static java.lang.String ORDER_BY
          The constant for 'ORDER BY'.
static java.lang.String OUTER
          The constant for 'OUTER'.
static java.lang.String PLUS
          The constant for for the plus sign '+'.
static java.lang.String POSITION
          The constant for 'POSITION', which is an unused keyword.
static java.lang.String POSITIONAL_PARAMETER
          The constant for '?'.
static java.lang.String QUOTE
          The constant for single quote.
static java.lang.String SELECT
          The constant for 'SELECT'.
static java.lang.String SET
          The constant for 'SET'.
static java.lang.String SIZE
          The constant for 'SIZE'.
static java.lang.String SOME
          The constant for 'SOME'.
static java.lang.String SQRT
          The constant for 'SQRT'.
static java.lang.String SUBSTRING
          The constant for 'SUBSTRING'.
static java.lang.String SUM
          The constant for 'SUM'.
static java.lang.String THEN
          The constant for 'THEN'.
static java.lang.String TRAILING
          The constant for 'TRAILING'.
static java.lang.String TREAT
          The constant for 'TREAT'.
static java.lang.String TRIM
          The constant for 'TRIM'.
static java.lang.String TRUE
          The constant for 'TRUE'.
static java.lang.String TYPE
          The constant for 'TYPE'.
static java.lang.String UNKNOWN
          The constant for 'UNKNOWN', which is an unused keyword.
static java.lang.String UPDATE
          The constant for 'UPDATE'.
static java.lang.String UPPER
          The constant for 'UPPER'.
static java.lang.String VALUE
          The constant for 'VALUE'.
static java.lang.String WHEN
          The constant for the identifier 'WHEN'.
static java.lang.String WHERE
          The constant for 'WHERE'.

 

Method Summary
 void accept(ExpressionVisitor visitor)
          Visits this Expression by the given visitor.
 void acceptChildren(ExpressionVisitor visitor)
          Visits the children of this Expression.
 java.util.ListIterator<Expression> children()
          Returns the children of this Expression.
 Expression[] getChildren()
          Returns the children of this Expression.
 Expression getParent()
          Returns the parent of this Expression.
 JPQLExpression getRoot()
          Retrieves the root node of the parsed tree hierarchy.
 boolean isAncestor(Expression expression)
          Determines whether this Expression is a parent of the given Expression.
 java.lang.String toActualText()
          Generates a string representation of this Expression, which needs to include any characters that are considered virtual, i.e. that was parsed when the query is incomplete and is needed for functionality like content assist.
 java.lang.String toParsedText()
          Returns a string representation of this Expression and its children.

 

Field Detail

ABS

static final java.lang.String ABS
The constant for 'ABS'.
See Also:
Constant Field Values

ALL

static final java.lang.String ALL
The constant for 'ALL'.
See Also:
Constant Field Values

AND

static final java.lang.String AND
The constant for 'AND'.
See Also:
Constant Field Values

ANY

static final java.lang.String ANY
The constant for 'ANY'.
See Also:
Constant Field Values

AS

static final java.lang.String AS
The constant for 'AS'.
See Also:
Constant Field Values

ASC

static final java.lang.String ASC
The constant for 'ASC'.
See Also:
Constant Field Values

AVG

static final java.lang.String AVG
The constant for 'AVG'.
See Also:
Constant Field Values

BETWEEN

static final java.lang.String BETWEEN
The constant for 'BETWEEN'.
See Also:
Constant Field Values

BIT_LENGTH

static final java.lang.String BIT_LENGTH
The constant for 'BIT_LENGTH', which is an unused keyword.
See Also:
Constant Field Values

BOTH

static final java.lang.String BOTH
The constant for 'BOTH'.
See Also:
Constant Field Values

CASE

static final java.lang.String CASE
The constant for the identifier 'CASE'.
See Also:
Constant Field Values

CHAR_LENGTH

static final java.lang.String CHAR_LENGTH
The constant for 'CHAR_LENGTH', which is an unused keyword.
See Also:
Constant Field Values

CHARACTER_LENGTH

static final java.lang.String CHARACTER_LENGTH
The constant for 'CHARACTER_LENGTH', which is an unused keyword.
See Also:
Constant Field Values

CLASS

static final java.lang.String CLASS
The constant for 'CLASS', which is an unused keyword.
See Also:
Constant Field Values

COALESCE

static final java.lang.String COALESCE
The constant for 'COALESCE'.
See Also:
Constant Field Values

CONCAT

static final java.lang.String CONCAT
The constant for 'CONCAT'.
See Also:
Constant Field Values

COUNT

static final java.lang.String COUNT
The constant for 'COUNT'.
See Also:
Constant Field Values

CURRENT_DATE

static final java.lang.String CURRENT_DATE
The constant for 'CURRENT_DATE'.
See Also:
Constant Field Values

CURRENT_TIME

static final java.lang.String CURRENT_TIME
The constant for 'CURRENT_DATE'.
See Also:
Constant Field Values

CURRENT_TIMESTAMP

static final java.lang.String CURRENT_TIMESTAMP
The constant for 'CURRENT_TIMESTAMP'.
See Also:
Constant Field Values

DELETE

static final java.lang.String DELETE
The constant for 'DELETE'.
See Also:
Constant Field Values

DELETE_FROM

static final java.lang.String DELETE_FROM
The constant for 'DELETE FROM'.
See Also:
Constant Field Values

DESC

static final java.lang.String DESC
The constant for 'DESC'.
See Also:
Constant Field Values

DIFFERENT

static final java.lang.String DIFFERENT
The constant for '<>'.
See Also:
Constant Field Values

DISTINCT

static final java.lang.String DISTINCT
The constant for 'DISTINCT'.
See Also:
Constant Field Values

DIVISION

static final java.lang.String DIVISION
The constant for the division sign '/'.
See Also:
Constant Field Values

ELSE

static final java.lang.String ELSE
The constant for the identifier 'ELSE'.
See Also:
Constant Field Values

EMPTY

static final java.lang.String EMPTY
The constant for 'EMPTY'.
See Also:
Constant Field Values

END

static final java.lang.String END
The constant for the identifier 'END'.
See Also:
Constant Field Values

ENTRY

static final java.lang.String ENTRY
The constant for 'ENTRY'.
See Also:
Constant Field Values

EQUAL

static final java.lang.String EQUAL
The constant for '='.
See Also:
Constant Field Values

ESCAPE

static final java.lang.String ESCAPE
The constant for 'ESCAPE'.
See Also:
Constant Field Values

EXISTS

static final java.lang.String EXISTS
The constant for 'EXISTS'.
See Also:
Constant Field Values

FALSE

static final java.lang.String FALSE
The constant for 'FALSE'.
See Also:
Constant Field Values

FETCH

static final java.lang.String FETCH
A constant for 'FETCH'.
See Also:
Constant Field Values

FROM

static final java.lang.String FROM
The constant for 'FROM'.
See Also:
Constant Field Values

FUNC

static final java.lang.String FUNC
The constant 'FUNC'.
See Also:
Constant Field Values

GREATER_THAN

static final java.lang.String GREATER_THAN
The constant for '>'.
See Also:
Constant Field Values

GREATER_THAN_OR_EQUAL

static final java.lang.String GREATER_THAN_OR_EQUAL
The constant for '>='.
See Also:
Constant Field Values

GROUP_BY

static final java.lang.String GROUP_BY
The constant for 'GROUP BY'.
See Also:
Constant Field Values

HAVING

static final java.lang.String HAVING
The constant for 'HAVING'.
See Also:
Constant Field Values

IN

static final java.lang.String IN
The constant for 'IN'.
See Also:
Constant Field Values

INDEX

static final java.lang.String INDEX
The constant for 'INDEX'.
See Also:
Constant Field Values

INNER

static final java.lang.String INNER
The constant for 'INNER'.
See Also:
Constant Field Values

INNER_JOIN

static final java.lang.String INNER_JOIN
The constant for 'INNER JOIN'.
See Also:
Constant Field Values

INNER_JOIN_FETCH

static final java.lang.String INNER_JOIN_FETCH
The constant for 'INNER JOIN FETCH'.
See Also:
Constant Field Values

IS

static final java.lang.String IS
The constant for 'IS'.
See Also:
Constant Field Values

IS_EMPTY

static final java.lang.String IS_EMPTY
The constant for 'IS EMPTY'.
See Also:
Constant Field Values

IS_NOT_EMPTY

static final java.lang.String IS_NOT_EMPTY
The constant for 'IS NOT EMPTY'.
See Also:
Constant Field Values

IS_NOT_NULL

static final java.lang.String IS_NOT_NULL
The constant for 'IS NOT NULL'.
See Also:
Constant Field Values

IS_NULL

static final java.lang.String IS_NULL
The constant for 'IS NULL'.
See Also:
Constant Field Values

JOIN

static final java.lang.String JOIN
The constant for 'JOIN'.
See Also:
Constant Field Values

JOIN_FETCH

static final java.lang.String JOIN_FETCH
The constant for 'JOIN FETCH'.
See Also:
Constant Field Values

KEY

static final java.lang.String KEY
The constant for 'KEY'.
See Also:
Constant Field Values

LEADING

static final java.lang.String LEADING
The constant for 'LEADING'.
See Also:
Constant Field Values

LEFT

static final java.lang.String LEFT
The constant for 'LEFT'.
See Also:
Constant Field Values

LEFT_JOIN

static final java.lang.String LEFT_JOIN
The constant for 'LEFT JOIN'.
See Also:
Constant Field Values

LEFT_JOIN_FETCH

static final java.lang.String LEFT_JOIN_FETCH
The constant for 'LEFT JOIN FETCH'.
See Also:
Constant Field Values

LEFT_OUTER_JOIN

static final java.lang.String LEFT_OUTER_JOIN
The constant for 'LEFT OUTER JOIN'.
See Also:
Constant Field Values

LEFT_OUTER_JOIN_FETCH

static final java.lang.String LEFT_OUTER_JOIN_FETCH
The constant for 'LEFT OUTER JOIN FETCH'.
See Also:
Constant Field Values

LENGTH

static final java.lang.String LENGTH
The constant for 'LENGTH'.
See Also:
Constant Field Values

LIKE

static final java.lang.String LIKE
The constant for 'LIKE'.
See Also:
Constant Field Values

LOCATE

static final java.lang.String LOCATE
The constant for 'LOCATE'.
See Also:
Constant Field Values

LOWER

static final java.lang.String LOWER
The constant for 'LOWER'.
See Also:
Constant Field Values

LOWER_THAN

static final java.lang.String LOWER_THAN
The constant for '<'.
See Also:
Constant Field Values

LOWER_THAN_OR_EQUAL

static final java.lang.String LOWER_THAN_OR_EQUAL
The constant for '<='.
See Also:
Constant Field Values

MAX

static final java.lang.String MAX
The constant for 'MAX'.
See Also:
Constant Field Values

MEMBER

static final java.lang.String MEMBER
The constant for 'MEMBER'.
See Also:
Constant Field Values

MEMBER_OF

static final java.lang.String MEMBER_OF
The constant for 'MEMBER OF'.
See Also:
Constant Field Values

MIN

static final java.lang.String MIN
The constant for 'MIN'.
See Also:
Constant Field Values

MINUS

static final java.lang.String MINUS
The constant for the minus sign '-'.
See Also:
Constant Field Values

MOD

static final java.lang.String MOD
The constant for 'MOD'.
See Also:
Constant Field Values

MULTIPLICATION

static final java.lang.String MULTIPLICATION
The constant for multiplication sign '*'.
See Also:
Constant Field Values

NAMED_PARAMETER

static final java.lang.String NAMED_PARAMETER
The constant for ':'.
See Also:
Constant Field Values

NEW

static final java.lang.String NEW
The constant for 'NEW'.
See Also:
Constant Field Values

NOT

static final java.lang.String NOT
The constant for 'NOT'.
See Also:
Constant Field Values

NOT_BETWEEN

static final java.lang.String NOT_BETWEEN
The constant for 'NOT BETWEEN'.
See Also:
Constant Field Values

NOT_EXISTS

static final java.lang.String NOT_EXISTS
The constant for 'NOT EXISTS'.
See Also:
Constant Field Values

NOT_IN

static final java.lang.String NOT_IN
The constant for 'NOT IN'.
See Also:
Constant Field Values

NOT_LIKE

static final java.lang.String NOT_LIKE
The constant for 'NOT LIKE'.
See Also:
Constant Field Values

NOT_MEMBER

static final java.lang.String NOT_MEMBER
The constant for 'NOT MEMBER'.
See Also:
Constant Field Values

NOT_MEMBER_OF

static final java.lang.String NOT_MEMBER_OF
The constant for 'NOT MEMBER OF'.
See Also:
Constant Field Values

NULL

static final java.lang.String NULL
The constant for 'NULL'.
See Also:
Constant Field Values

NULLIF

static final java.lang.String NULLIF
The constant for 'NULLIF'.
See Also:
Constant Field Values

OBJECT

static final java.lang.String OBJECT
The constant for 'OBJECT'.
See Also:
Constant Field Values

OF

static final java.lang.String OF
The constant for 'OF'.
See Also:
Constant Field Values

OR

static final java.lang.String OR
The constant for 'OR'.
See Also:
Constant Field Values

ORDER_BY

static final java.lang.String ORDER_BY
The constant for 'ORDER BY'.
See Also:
Constant Field Values

OUTER

static final java.lang.String OUTER
The constant for 'OUTER'.
See Also:
Constant Field Values

PLUS

static final java.lang.String PLUS
The constant for for the plus sign '+'.
See Also:
Constant Field Values

POSITION

static final java.lang.String POSITION
The constant for 'POSITION', which is an unused keyword.
See Also:
Constant Field Values

POSITIONAL_PARAMETER

static final java.lang.String POSITIONAL_PARAMETER
The constant for '?'.
See Also:
Constant Field Values

QUOTE

static final java.lang.String QUOTE
The constant for single quote.
See Also:
Constant Field Values

SELECT

static final java.lang.String SELECT
The constant for 'SELECT'.
See Also:
Constant Field Values

SET

static final java.lang.String SET
The constant for 'SET'.
See Also:
Constant Field Values

SIZE

static final java.lang.String SIZE
The constant for 'SIZE'.
See Also:
Constant Field Values

SOME

static final java.lang.String SOME
The constant for 'SOME'.
See Also:
Constant Field Values

SQRT

static final java.lang.String SQRT
The constant for 'SQRT'.
See Also:
Constant Field Values

SUBSTRING

static final java.lang.String SUBSTRING
The constant for 'SUBSTRING'.
See Also:
Constant Field Values

SUM

static final java.lang.String SUM
The constant for 'SUM'.
See Also:
Constant Field Values

THEN

static final java.lang.String THEN
The constant for 'THEN'.
See Also:
Constant Field Values

TRAILING

static final java.lang.String TRAILING
The constant for 'TRAILING'.
See Also:
Constant Field Values

TREAT

static final java.lang.String TREAT
The constant for 'TREAT'.
See Also:
Constant Field Values

TRIM

static final java.lang.String TRIM
The constant for 'TRIM'.
See Also:
Constant Field Values

TRUE

static final java.lang.String TRUE
The constant for 'TRUE'.
See Also:
Constant Field Values

TYPE

static final java.lang.String TYPE
The constant for 'TYPE'.
See Also:
Constant Field Values

UNKNOWN

static final java.lang.String UNKNOWN
The constant for 'UNKNOWN', which is an unused keyword.
See Also:
Constant Field Values

UPDATE

static final java.lang.String UPDATE
The constant for 'UPDATE'.
See Also:
Constant Field Values

UPPER

static final java.lang.String UPPER
The constant for 'UPPER'.
See Also:
Constant Field Values

VALUE

static final java.lang.String VALUE
The constant for 'VALUE'.
See Also:
Constant Field Values

WHEN

static final java.lang.String WHEN
The constant for the identifier 'WHEN'.
See Also:
Constant Field Values

WHERE

static final java.lang.String WHERE
The constant for 'WHERE'.
See Also:
Constant Field Values

Method Detail

accept

void accept(ExpressionVisitor visitor)
Visits this Expression by the given visitor.
Parameters:
visitor - The visitor to visit this object

acceptChildren

void acceptChildren(ExpressionVisitor visitor)
Visits the children of this Expression. This method can be used to optimize traversing the children since a new list is not created every time children() or getChildren() is called.

This does not traverse the Expression sub-hierarchy, use an subclass of AbstractTraverseChildrenVisitor in order to traverse the entire sub-hierarchy.

Parameters:
visitor - The visitor to visit the children of this object.

children

java.util.ListIterator<Expression> children()
Returns the children of this Expression.
Returns:
The children of this Expression or an empty list if this Expression does not have children

getChildren

Expression[] getChildren()
Returns the children of this Expression.
Returns:
The children of this Expression or an empty list if this Expression does not have children

getParent

Expression getParent()
Returns the parent of this Expression.
Returns:
The parent of this {@link Expression, which is never null except for the root of the tree

getRoot

JPQLExpression getRoot()
Retrieves the root node of the parsed tree hierarchy.
Returns:
The root of the Expression tree

isAncestor

boolean isAncestor(Expression expression)
Determines whether this Expression is a parent of the given Expression.
Parameters:
expression - The Expression to verify its paternity with this Expression
Returns:
true if this Expression is the same as the given Expression or one of its parent; false otherwise

toActualText

java.lang.String toActualText()
Generates a string representation of this Expression, which needs to include any characters that are considered virtual, i.e. that was parsed when the query is incomplete and is needed for functionality like content assist.
Returns:
The string representation of this Expression

toParsedText

java.lang.String toParsedText()
Returns a string representation of this Expression and its children. The expression should contain whitespace even if the beautified version would not have any. For instance, "SELECT e " should be returned where Expression#toText() would return "SELECT e".
Returns:
The string representation of this Expression

Skip navigation links

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