public abstract class AbstractExpression extends StringExpression implements Expression
expression factories).ExpressionFactory,
StringExpression| 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, ASC, AVG, BETWEEN, BIT_LENGTH, BOTH, CASE, CHAR_LENGTH, CHARACTER_LENGTH, CLASS, COALESCE, CONCAT, COUNT, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, DELETE, DELETE_FROM, DESC, DIFFERENT, DISTINCT, DIVISION, ELSE, EMPTY, END, ENTRY, EQUAL, ESCAPE, EXISTS, FALSE, FETCH, FROM, FUNC, GREATER_THAN, GREATER_THAN_OR_EQUAL, GROUP_BY, HAVING, IN, INDEX, INNER, INNER_JOIN, INNER_JOIN_FETCH, IS, IS_EMPTY, IS_NOT_EMPTY, IS_NOT_NULL, IS_NULL, JOIN, JOIN_FETCH, KEY, 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_EXISTS, NOT_IN, NOT_LIKE, NOT_MEMBER, NOT_MEMBER_OF, NULL, NULLIF, OBJECT, OF, OR, ORDER_BY, OUTER, PLUS, POSITION, POSITIONAL_PARAMETER, QUOTE, SELECT, SET, SIZE, SOME, SQRT, SUBSTRING, SUM, THEN, TRAILING, TREAT, TRIM, TRUE, TYPE, UNKNOWN, UPDATE, UPPER, VALUE, WHEN, WHERE| Modifier and Type | Method and Description |
|---|---|
java.util.ListIterator<Expression> |
children()
Returns the children of this
Expression. |
JPQLQueryBNF |
findQueryBNF(AbstractExpression expression)
Retrieves the
JPQLQueryBNF that was used to parse the given Expression. |
Expression[] |
getChildren()
Returns the children of this
Expression. |
AbstractExpression |
getParent()
Returns the parent of this
Expression. |
abstract JPQLQueryBNF |
getQueryBNF()
Returns the BNF of this
Expression. |
JPQLExpression |
getRoot()
Retrieves the root node of the parsed tree hierarchy.
|
static IdentifierRole |
identifierRole(java.lang.String identifier)
Retrieves the role of the given identifier.
|
static java.util.Collection<java.lang.String> |
identifiers()
Returns the set of identifiers used by the Java Persistence query language.
|
static IJPAVersion |
identifierVersion(java.lang.String identifier)
Retrieves the JPA version in which the identifier was first introduced.
|
boolean |
isAncestor(Expression expression)
Determines whether this
Expression is a parent of the given Expression. |
static boolean |
isIdentifier(java.lang.String identifier)
Determines if the given word is a JPQL identifier.
|
boolean |
isVirtual()
Determines whether this identification variable is virtual, meaning it's not part of the query
but is required for proper navigability.
|
java.util.ListIterator<StringExpression> |
orderedChildren()
Creates a list representing this expression and its children.
|
static <T extends JPQLQueryBNF> |
queryBNF(java.lang.String queryBNFID)
Retrieves the BNF object that was registered for the given unique identifier.
|
java.lang.String |
toActualText()
Generates a string representation of this
StringExpression, which needs to include any
characters that are considered virtual, i.e. |
java.lang.String |
toParsedText()
Returns a string representation of this
StringExpression and its children. |
java.lang.String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitaccept, acceptChildrenpublic 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 static IdentifierRole identifierRole(java.lang.String identifier)
identifier - The identifier for which its role is requestedpublic static java.util.Collection<java.lang.String> identifiers()
public static IJPAVersion identifierVersion(java.lang.String identifier)
public static boolean isIdentifier(java.lang.String identifier)
word - The word to testtrue if the word is an identifier, false otherwisepublic static <T extends JPQLQueryBNF> T queryBNF(java.lang.String queryBNFID)
queryBNFID - The unique identifier of the JPQLQueryBNF to retrieveJPQLQueryBNF representing a section of the grammarpublic final java.util.ListIterator<Expression> children()
Expression.children in interface ExpressionExpression or an empty list if this Expression
does not have childrenpublic JPQLQueryBNF findQueryBNF(AbstractExpression expression)
JPQLQueryBNF that was used to parse the given Expression.expression - The expression for which its BNF is neededJPQLQueryBNF that was used to parse the given expressionpublic final Expression[] getChildren()
Expression.getChildren in interface ExpressionExpression or an empty list if this Expression
does not have childrenpublic final AbstractExpression getParent()
Expression.getParent in interface Expressionnull except for the
root of the treepublic abstract JPQLQueryBNF getQueryBNF()
Expression.JPQLQueryBNF, which represents the grammar of this Expressionpublic 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 boolean isVirtual()
true if this identification variable was virtually created to fully
qualify path expression; false if it was parsedpublic final java.util.ListIterator<StringExpression> orderedChildren()
#addChildrenTo(Collection) is called.orderedChildren in class StringExpressionStringExpressions representing this Expressionpublic java.lang.String toActualText()
StringExpression, 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 ExpressiontoActualText in class StringExpressionStringExpressionpublic java.lang.String toParsedText()
StringExpression 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".toParsedText in interface ExpressiontoParsedText in class StringExpressionStringExpressionpublic final java.lang.String toString()
toString in class java.lang.ObjectEclipseLink 2.3.2, "build v20111125-r10461" API Reference