|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) E28847-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
org.eclipse.persistence.jpa.internal.jpql.parser.StringExpression
org.eclipse.persistence.jpa.internal.jpql.parser.AbstractExpression
org.eclipse.persistence.jpa.internal.jpql.parser.AbstractEncapsulatedExpression
public abstract class AbstractEncapsulatedExpression
This expression handles parsing the identifier followed by an expression encapsulated within parenthesis.
expression ::= <identifier>(expression)
Field Summary | |
---|---|
private boolean |
hasLeftParenthesis Flag used to determine if the closing parenthesis is present in the query. |
private boolean |
hasRightParenthesis Flag used to determine if the opening parenthesis is present in the query. |
private boolean |
hasSpaceAfterIdentifier Special flag used to separate the identifier with the encapsulated expression when the left parenthesis is missing. |
Fields inherited from class org.eclipse.persistence.jpa.internal.jpql.parser.AbstractExpression |
---|
COMMA, DOT, DOUBLE_QUOTE, LEFT_CURLY_BRACKET, LEFT_PARENTHESIS, NOT_DEFINED, RIGHT_CURLY_BRACKET, RIGHT_PARENTHESIS, SINGLE_QUOTE, SPACE, UNDERSCORE |
Constructor Summary | |
---|---|
AbstractEncapsulatedExpression(AbstractExpression parent) Creates a new AbstractEncapsulatedExpression . |
Method Summary | |
---|---|
(package private) void |
addOrderedChildrenTo(java.util.List<StringExpression> children) Adds the StringExpressions representing this Expression . |
(package private) abstract void |
addOrderedEncapsulatedExpressionTo(java.util.List<StringExpression> children) Adds the StringExpressions representing the encapsulated Expression . |
(package private) boolean |
areLogicalIdentifiersSupported() |
java.lang.String |
getIdentifier() Returns the JPQL identifier of this expression. |
abstract boolean |
hasEncapsulatedExpression() Determines whether something was parsed after the left parenthesis. |
boolean |
hasLeftParenthesis() Determines whether the open parenthesis was parsed or not. |
boolean |
hasRightParenthesis() Determines whether the close parenthesis was parsed or not. |
(package private) boolean |
isParsingComplete(WordParser wordParser, java.lang.String word, Expression expression) Determines whether the parsing is complete based on what is left in the given text. |
(package private) void |
parse(WordParser wordParser, boolean tolerant) Parses the query by starting at the current position, which is part of the given WordParser . |
(package private) abstract void |
parseEncapsulatedExpression(WordParser wordParser, boolean tolerant) Parses the encapsulated expression by starting at the current position, which is part of the given WordParser . |
(package private) abstract java.lang.String |
parseIdentifier(WordParser wordParser) Parses the identifier of this expression. |
(package private) void |
toParsedText(java.lang.StringBuilder writer, boolean includeVirtual) Generates a string representation of this Expression . |
(package private) abstract void |
toParsedTextEncapsulatedExpression(java.lang.StringBuilder writer, boolean includeVirtual) Generates a string representation of the encapsulated Expression . |
Methods inherited from class org.eclipse.persistence.jpa.internal.jpql.parser.AbstractExpression |
---|
addChildrenTo, buildExpressionFromFallingBack, buildNullExpression, buildStringExpression, buildStringExpression, buildUnknownExpression, children, expressionFactory, expressionFactoryForIdentifier, findQueryBNF, getChildren, getJPAVersion, getParent, getQueryBNF, getRoot, getText, handleAggregate, identifierRole, identifiers, identifiers, identifierVersion, isAncestor, isIdentifier, isNull, isTolerant, isUnknown, isVirtual, orderedChildren, parse, parseSingleExpression, populatePosition, queryBNF, readdLeadingSpaces, rebuildActualText, rebuildParsedText, setParent, setText, shouldParseWithFactoryFirst, shouldSkipLiteral, toActualText, toParsedText, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.persistence.jpa.internal.jpql.parser.Expression |
---|
accept, acceptChildren |
Field Detail |
---|
private boolean hasLeftParenthesis
private boolean hasRightParenthesis
private boolean hasSpaceAfterIdentifier
Constructor Detail |
---|
AbstractEncapsulatedExpression(AbstractExpression parent)
AbstractEncapsulatedExpression
.
parent
- The parent of this expressionMethod Detail |
---|
final void addOrderedChildrenTo(java.util.List<StringExpression> children)
StringExpressions
representing this Expression
.addOrderedChildrenTo
in class AbstractExpression
children
- The list used to store the string representation of this Expression
abstract void addOrderedEncapsulatedExpressionTo(java.util.List<StringExpression> children)
StringExpressions
representing the encapsulated Expression
.children
- The list used to store the string representation of the encapsulated Expression
boolean areLogicalIdentifiersSupported()
public final java.lang.String getIdentifier()
public abstract boolean hasEncapsulatedExpression()
true
if something was parsed; false
otherwisepublic final boolean hasLeftParenthesis()
true
if the open parenthesis was present in the string version of the query; false
otherwisepublic final boolean hasRightParenthesis()
true
if the close parenthesis was present in the string version of the query; false
otherwiseboolean isParsingComplete(WordParser wordParser, java.lang.String word, Expression expression)
isParsingComplete
in class AbstractExpression
wordParser
- The text to parse based on the current position of the cursorword
- The word that was retrieved from the given text, which is the first word in the textexpression
- The Expression
that has already been parsedtrue
if the text no longer can't be parsed by the current expression; false
if more can be parsedfinal void parse(WordParser wordParser, boolean tolerant)
WordParser
.parse
in class AbstractExpression
wordParser
- The text to parse based on the current position of the cursortolerant
- Determines whether the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queriesabstract void parseEncapsulatedExpression(WordParser wordParser, boolean tolerant)
WordParser
.wordParser
- The text to parse based on the current position of the cursortolerant
- Determines whether the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queriesabstract java.lang.String parseIdentifier(WordParser wordParser)
text
- The text to parse, which starts with the identifierfinal void toParsedText(java.lang.StringBuilder writer, boolean includeVirtual)
Expression
.toParsedText
in class AbstractExpression
writer
- The buffer used to append this Expression
's string representationincludeVirtual
- Determines whether 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 assistabstract void toParsedTextEncapsulatedExpression(java.lang.StringBuilder writer, boolean includeVirtual)
Expression
.writer
- The buffer used to append the encapsulated Expression
's string representationincludeVirtual
- Determines whether 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
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |