public abstract class AbstractExpression extends java.lang.Object implements Expression
ExpressionFactory,
JPQLGrammar| Modifier and Type | Field and Description |
|---|---|
static char |
COMMA
The constant for ','.
|
static char |
DOT
The constant for '.'.
|
static char |
DOUBLE_QUOTE
The constant for '"'.
|
static char |
LEFT_CURLY_BRACKET
The constant for '{'.
|
static char |
LEFT_PARENTHESIS
The constant for '('.
|
static char |
NOT_DEFINED
The constant for a character that is not defined.
|
static char |
RIGHT_CURLY_BRACKET
The constant for '}'.
|
static char |
RIGHT_PARENTHESIS
The constant for ')'.
|
static char |
SINGLE_QUOTE
The constant for '''.
|
static char |
SPACE
The constant for ' '.
|
static char |
UNDERSCORE
The constant for '_'.
|
ABS, ALL, AND, ANY, AS, AS_OF, ASC, AVG, BETWEEN, BIT_LENGTH, BOTH, CASE, CAST, CHAR_LENGTH, CHARACTER_LENGTH, CLASS, COALESCE, COLUMN, CONCAT, CONNECT_BY, COUNT, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, DELETE, DELETE_FROM, DESC, DIFFERENT, DISTINCT, DIVISION, ELSE, EMPTY, END, ENTRY, EQUAL, ESCAPE, EXCEPT, EXISTS, EXTRACT, FALSE, FETCH, FIRST, FROM, FUNC, FUNCTION, GREATER_THAN, GREATER_THAN_OR_EQUAL, GROUP_BY, HAVING, IN, INDEX, INNER, INNER_JOIN, INNER_JOIN_FETCH, INTERSECT, IS, IS_EMPTY, IS_NOT_EMPTY, IS_NOT_NULL, IS_NULL, JOIN, JOIN_FETCH, KEY, LAST, LEADING, LEFT, LEFT_JOIN, LEFT_JOIN_FETCH, LEFT_OUTER_JOIN, LEFT_OUTER_JOIN_FETCH, LENGTH, LIKE, LOCATE, LOWER, LOWER_THAN, LOWER_THAN_OR_EQUAL, MAX, MEMBER, MEMBER_OF, MIN, MINUS, MOD, MULTIPLICATION, NAMED_PARAMETER, NEW, NOT, NOT_BETWEEN, NOT_EQUAL, NOT_EXISTS, NOT_IN, NOT_LIKE, NOT_MEMBER, NOT_MEMBER_OF, NULL, NULLIF, NULLS, NULLS_FIRST, NULLS_LAST, OBJECT, OF, ON, OPERATOR, OR, ORDER_BY, ORDER_SIBLINGS_BY, OUTER, PLUS, POSITION, POSITIONAL_PARAMETER, QUOTE, REGEXP, SCN, SELECT, SET, SIZE, SOME, SQL, SQRT, START_WITH, SUBSTRING, SUM, TABLE, THEN, TIMESTAMP, TRAILING, TREAT, TRIM, TRUE, TYPE, UNION, UNKNOWN, UPDATE, UPPER, VALUE, WHEN, WHERE| Modifier and Type | Method and Description |
|---|---|
ListIterable<Expression> |
children()
Returns the children of this
Expression. |
JPQLQueryBNF |
findQueryBNF(Expression expression)
Retrieves the
JPQLQueryBNF that represents the fragment of this Expression
that was used when parsing the given Expression. |
JPQLGrammar |
getGrammar()
Returns the
JPQLGrammar that defines how the JPQL query was parsed. |
JPAVersion |
getIdentifierVersion(java.lang.String identifier)
Retrieves the JPA version in which the identifier was first introduced.
|
int |
getLength()
Returns the length of the string representation of this
Expression, which is the
length of the text generated by Expression.toActualText(). |
int |
getOffset()
Returns the position of this
Expression within its parent hierarchy. |
AbstractExpression |
getParent()
Returns the parent of this
Expression. |
JPQLQueryBNF |
getQueryBNF(java.lang.String queryBNFID)
Retrieves the BNF object that was registered for the given unique identifier.
|
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. |
ListIterable<Expression> |
orderedChildren()
Returns the list representing this
Expression and its children. |
void |
populatePosition(QueryPosition queryPosition,
int position)
Retrieves the
Expression located at the given position using the actual query,
which may have extra whitespace. |
java.lang.String |
toActualText()
Generates a string representation of this
Expression, which needs to include any
characters that are considered virtual, i.e. |
java.lang.String |
toParsedText()
Returns a string representation of this
Expression and its children. |
java.lang.String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitaccept, acceptChildren, getQueryBNFpublic static final char COMMA
public static final char DOT
public static final char DOUBLE_QUOTE
public static final char LEFT_CURLY_BRACKET
public static final char LEFT_PARENTHESIS
public static final char NOT_DEFINED
public static final char RIGHT_CURLY_BRACKET
public static final char RIGHT_PARENTHESIS
public static final char SINGLE_QUOTE
public static final char SPACE
public static final char UNDERSCORE
public final ListIterable<Expression> children()
Expression.children in interface ExpressionExpression or an empty ListIterablepublic JPQLQueryBNF findQueryBNF(Expression expression)
JPQLQueryBNF that represents the fragment of this Expression
that was used when parsing the given Expression.findQueryBNF in interface Expressionexpression - The Expression that is a descendant of this oneJPQLQueryBNF that was used to parse the given expressionpublic JPQLGrammar getGrammar()
JPQLGrammar that defines how the JPQL query was parsed.getGrammar in interface ExpressionJPQLGrammar that was used to parse this Expressionpublic JPAVersion getIdentifierVersion(java.lang.String identifier)
public final int getLength()
Expression, which is the
length of the text generated by Expression.toActualText().getLength in interface ExpressionExpressionpublic final int getOffset()
Expression within its parent hierarchy.getOffset in interface Expressionpublic final AbstractExpression getParent()
Expression.getParent in interface ExpressionExpression, which is never null except for the
root of the treepublic JPQLQueryBNF getQueryBNF(java.lang.String queryBNFID)
queryBNFID - The unique identifier of the JPQLQueryBNF to retrieveJPQLQueryBNF representing a section of the grammarpublic final JPQLExpression getRoot()
getRoot in interface ExpressionExpression treepublic boolean isAncestor(Expression expression)
Expression is a parent of the given Expression.isAncestor in interface Expressionexpression - The Expression to verify its paternity with this Expressiontrue if this Expression is the same as the given Expression
or one of its parent; false otherwisepublic final ListIterable<Expression> orderedChildren()
Expression and its children.orderedChildren in interface ExpressionExpressions representing this Expressionpublic void populatePosition(QueryPosition queryPosition, int position)
Expression located at the given position using the actual query,
which may have extra whitespace.populatePosition in interface Expressionposition - The array has one element and is the position of the Expression to retrievepublic java.lang.String toActualText()
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.toActualText in interface ExpressionExpressionpublic java.lang.String toParsedText()
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.toParsedText() would return "SELECT e".toParsedText in interface ExpressionExpressionpublic final java.lang.String toString()
toString in class java.lang.ObjectEclipseLink 2.6.3, "build v20160428-59c81c5" API Reference