Top Description Fields Methods
org.eclipse.persistence.jpa.jpql.parser

public Interface Expression

Known Direct Implementers
org.eclipse.persistence.jpa.jpql.parser.AbstractExpression
Annotations
@SuppressWarnings:nls
Imports
org.eclipse.persistence.jpa.jpql.utility.iterable.ListIterable

This is the root interface of the parsed tree representation of a JPQL query. The way a JPQL query is parsed is based on the JPQL grammar used.

Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Author
Pascal Filion
See Also
JPQLGrammar

Field Summary

Modifier and TypeField and Description
public static final String
ABS

The constant for 'ABS'.

public static final String
ALL

The constant for 'ALL'.

public static final String
AND

The constant for 'AND'.

public static final String
ANY

The constant for 'ANY'.

public static final String
AS

The constant for 'AS'.

public static final String
AS_OF

The constant for 'AS OF'.

public static final String
ASC

The constant for 'ASC'.

public static final String
AVG

The constant for 'AVG'.

public static final String
BETWEEN

The constant for 'BETWEEN'.

public static final String
BIT_LENGTH

The constant for 'BIT_LENGTH', which is an unused keyword.

public static final String
BOTH

The constant for 'BOTH'.

public static final String
CASE

The constant for the identifier 'CASE'.

public static final String
CAST

The constant for the identifier 'CAST'.

public static final String
CEILING

The constant for the identifier 'CEILING'.

public static final String
CHAR_LENGTH

The constant for 'CHAR_LENGTH', which is an unused keyword.

public static final String
CHARACTER_LENGTH

The constant for 'CHARACTER_LENGTH', which is an unused keyword.

public static final String
CLASS

The constant for 'CLASS', which is an unused keyword.

public static final String
COALESCE

The constant for 'COALESCE'.

public static final String
COLUMN

The constant 'COLUMN', which is an EclipseLink specific identifier that was added in version 2.4.

public static final String
CONCAT

The constant for 'CONCAT'.

public static final String
CONNECT_BY

The constant for 'CONNECT BY'.

public static final String
COUNT

The constant for 'COUNT'.

public static final String
CURRENT_DATE

The constant for 'CURRENT_DATE'.

public static final String
CURRENT_TIME

The constant for 'CURRENT_DATE'.

public static final String
CURRENT_TIMESTAMP

The constant for 'CURRENT_TIMESTAMP'.

public static final String
DATE

The constant for 'DATE'.

public static final String
DATETIME

The constant for 'DATETIME'.

public static final String
DELETE

The constant for 'DELETE'.

public static final String
DELETE_FROM

The constant for 'DELETE FROM'.

public static final String
DESC

The constant for 'DESC'.

public static final String
DIFFERENT

The constant for '<>'.

public static final String
DISTINCT

The constant for 'DISTINCT'.

public static final String
DIVISION

The constant for the division sign '/'.

public static final String
ELSE

The constant for the identifier 'ELSE'.

public static final String
EMPTY

The constant for 'EMPTY'.

public static final String
END

The constant for the identifier 'END'.

public static final String
ENTRY

The constant for 'ENTRY'.

public static final String
EQUAL

The constant for '='.

public static final String
ESCAPE

The constant for 'ESCAPE'.

public static final String
EXCEPT

The constant for 'EXCEPT'.

public static final String
EXISTS

The constant for 'EXISTS'.

public static final String
EXP

The constant for 'EXP'.

public static final String
EXTRACT

The constant for 'EXTRACT'.

public static final String
FALSE

The constant for 'FALSE'.

public static final String
FETCH

A constant for 'FETCH'.

public static final String
FIRST

The constant for 'FIRST'.

public static final String
FLOOR

The constant for the identifier 'FLOOR'.

public static final String
FROM

The constant for 'FROM'.

public static final String
FUNC

The constant 'FUNC', which is an EclipseLink specific identifier that was added in version 2.1.

public static final String
FUNCTION

The constant 'FUNCTION', part of JPA 2.1.

public static final String
GREATER_THAN

The constant for '>'.

public static final String
GREATER_THAN_OR_EQUAL

The constant for '>='.

public static final String
GROUP_BY

The constant for 'GROUP BY'.

public static final String
HAVING

The constant for 'HAVING'.

public static final String
IN

The constant for 'IN'.

public static final String
INDEX

The constant for 'INDEX'.

public static final String
INNER

The constant for 'INNER'.

public static final String
INNER_JOIN

The constant for 'INNER JOIN'.

public static final String
INNER_JOIN_FETCH

The constant for 'INNER JOIN FETCH'.

public static final String
INTERSECT

The constant for 'INTERSECT'.

public static final String
IS

The constant for 'IS'.

public static final String
IS_EMPTY

The constant for 'IS EMPTY'.

public static final String
IS_NOT_EMPTY

The constant for 'IS NOT EMPTY'.

public static final String
IS_NOT_NULL

The constant for 'IS NOT NULL'.

public static final String
IS_NULL

The constant for 'IS NULL'.

public static final String
JOIN

The constant for 'JOIN'.

public static final String
JOIN_FETCH

The constant for 'JOIN FETCH'.

public static final String
KEY

The constant for 'KEY'.

public static final String
LAST

The constant for 'LAST'.

public static final String
LEADING

The constant for 'LEADING'.

public static final String
LEFT

The constant for 'LEFT'.

public static final String
LEFT_JOIN

The constant for 'LEFT JOIN'.

public static final String
LEFT_JOIN_FETCH

The constant for 'LEFT JOIN FETCH'.

public static final String
LEFT_OUTER_JOIN

The constant for 'LEFT OUTER JOIN'.

public static final String
LEFT_OUTER_JOIN_FETCH

The constant for 'LEFT OUTER JOIN FETCH'.

public static final String
LENGTH

The constant for 'LENGTH'.

public static final String
LIKE

The constant for 'LIKE'.

public static final String
LN

The constant for 'LN'.

public static final String
LOCAL

The constant for 'LOCAL'.

public static final String
LOCATE

The constant for 'LOCATE'.

public static final String
LOWER

The constant for 'LOWER'.

public static final String
LOWER_THAN

The constant for '<'.

public static final String
LOWER_THAN_OR_EQUAL

The constant for '<='.

public static final String
MAX

The constant for 'MAX'.

public static final String
MEMBER

The constant for 'MEMBER'.

public static final String
MEMBER_OF

The constant for 'MEMBER OF'.

public static final String
MIN

The constant for 'MIN'.

public static final String
MINUS

The constant for the minus sign '-'.

public static final String
MOD

The constant for 'MOD'.

public static final String
MULTIPLICATION

The constant for multiplication sign '*'.

public static final String
NAMED_PARAMETER

The constant for ':'.

public static final String
NEW

The constant for 'NEW'.

public static final String
NOT

The constant for 'NOT'.

public static final String
NOT_BETWEEN

The constant for 'NOT BETWEEN'.

public static final String
NOT_EQUAL

The constant for '!='.

public static final String
NOT_EXISTS

The constant for 'NOT EXISTS'.

public static final String
NOT_IN

The constant for 'NOT IN'.

public static final String
NOT_LIKE

The constant for 'NOT LIKE'.

public static final String
NOT_MEMBER

The constant for 'NOT MEMBER'.

public static final String
NOT_MEMBER_OF

The constant for 'NOT MEMBER OF'.

public static final String
NULL

The constant for 'NULL'.

public static final String
NULLIF

The constant for 'NULLIF'.

public static final String
NULLS

The constant for 'NULLS'.

public static final String
NULLS_FIRST

The constant for 'NULLS FIRST'.

public static final String
NULLS_LAST

The constant for 'NULLS LAST'.

public static final String
OBJECT

The constant for 'OBJECT'.

public static final String
OF

The constant for 'OF'.

public static final String
ON

The constant for 'ON', which is an EclipseLink specific identifier that was added in version 2.4.

public static final String
OPERATOR

The constant 'OPERATOR', which is an EclipseLink specific identifier that was added in version 2.4.

public static final String
OR

The constant for 'OR'.

public static final String
ORDER_BY

The constant for 'ORDER BY'.

public static final String
ORDER_SIBLINGS_BY

The constant for 'ORDER SIBLINGS BY'.

public static final String
OUTER

The constant for 'OUTER'.

public static final String
PLUS

The constant for for the plus sign '+'.

public static final String
POSITION

The constant for 'POSITION', which is an unused keyword.

public static final String
POSITIONAL_PARAMETER

The constant for '?'.

public static final String
POWER

The constant for 'POWER'.

public static final String
QUOTE

The constant for single quote.

public static final String
REGEXP

The constant for 'REGEXP'.

public static final String
ROUND

The constant for 'ROUND'.

public static final String
SCN

The constant for 'SCN'.

public static final String
SELECT

The constant for 'SELECT'.

public static final String
SET

The constant for 'SET'.

public static final String
SIGN

The constant for 'SIGN'.

public static final String
SIZE

The constant for 'SIZE'.

public static final String
SOME

The constant for 'SOME'.

public static final String
SQL

The constant 'SQL', which is an EclipseLink specific identifier that was added in version 2.4.

public static final String
SQRT

The constant for 'SQRT'.

public static final String
START_WITH

The constant for 'WHERE'.

public static final String
SUBSTRING

The constant for 'SUBSTRING'.

public static final String
SUM

The constant for 'SUM'.

public static final String
TABLE

The constant for 'TABLE'.

public static final String
THEN

The constant for 'THEN'.

public static final String
TIME

The constant for 'TIME'.

public static final String
TIMESTAMP

The constant for 'TIMESTAMP'.

public static final String
TRAILING

The constant for 'TRAILING'.

public static final String
TREAT

The constant for 'TREAT', which is an EclipseLink specific identifier that was added in version 2.1.

public static final String
TRIM

The constant for 'TRIM'.

public static final String
TRUE

The constant for 'TRUE'.

public static final String
TYPE

The constant for 'TYPE'.

public static final String
UNION

The constant for 'UNION'.

public static final String
UNKNOWN

The constant for 'UNKNOWN', which is an unused keyword.

public static final String
UPDATE

The constant for 'UPDATE'.

public static final String
UPPER

The constant for 'UPPER'.

public static final String
VALUE

The constant for 'VALUE'.

public static final String
WHEN

The constant for the identifier 'WHEN'.

public static final String
WHERE

The constant for 'WHERE'.

Method Summary

Modifier and TypeMethod and Description
public void
accept(ExpressionVisitor
The ExpressionVisitor to visit this object
visitor
)

Visits this Expression by the given visitor.

public void
acceptChildren(ExpressionVisitor
The visitor to visit the children of this object.
visitor
)

Visits the children of this Expression.

public ListIterable<Expression>

Returns:

The children of this Expression or an empty ListIterable
children
()

Returns the children of this Expression.

public JPQLQueryBNF

Returns:

The JPQLQueryBNF that was used to parse the given expression
findQueryBNF
(Expression
The Expression that is a descendant of this one
expression
)

Retrieves the JPQLQueryBNF that represents the fragment of this Expression that was used when parsing the given Expression.

public JPQLGrammar

Returns:

The JPQLGrammar that was used to parse this Expression
getGrammar
()

Returns the JPQLGrammar that defines how the JPQL query was parsed.

public int

Returns:

The length of the string representation of this Expression
getLength
()

Returns the length of the string representation of this Expression, which is the length of the text generated by toActualText().

public int

Returns:

The length of the string representation of what is coming before this object
getOffset
()

Returns the position of this Expression within its parent hierarchy.

public Expression

Returns:

The parent of this Expression, which is never null except for the root of the tree
getParent
()

Returns the parent of this Expression.

public JPQLQueryBNF

Returns:

The JPQLQueryBNF, which represents the grammar of this Expression
getQueryBNF
()

Returns the BNF of this Expression.

public JPQLExpression

Returns:

The root of the Expression tree
getRoot
()

Retrieves the root node of the parsed tree hierarchy.

public boolean

Returns:

true if this Expression is the same as the given Expression or one of its parent; false otherwise
isAncestor
(Expression
The Expression to verify its paternity with this Expression
expression
)

Determines whether this Expression is a parent of the given Expression.

public ListIterable<Expression>

Returns:

The Expressions representing this Expression
orderedChildren
()

Returns the list representing this Expression and its children.

public void
populatePosition(QueryPosition queryPosition, int
The array has one element and is the position of the Expression to retrieve
position
)

Retrieves the Expression located at the given position using the actual query, which may have extra whitespace.

public String

Returns:

The string representation of this Expression
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.

public String

Returns:

The string representation of this Expression
toParsedText
()

Returns a string representation of this Expression and its children.