New to EclipseLink 2.1.
join_treat ::= TREAT(collection_valued_path_expression AS entity_type_literal)
Example: SELECT e FROM Employee e JOIN TREAT(e.projects AS LargeProject) lp WHERE lp.budget = value
| Modifier and Type | Field and Description |
|---|---|
| private String | asIdentifier
The actual AS identifier found in the string representation of the JPQL query. |
| private AbstractExpression | collectionValuedPathExpression
The |
| private AbstractExpression | entityType
The entity type used to downcast the type of the elements in the collection. |
| private boolean | hasSpaceAfterAs
Determines whether a whitespace was parsed after AS. |
| private boolean | hasSpaceAfterCollectionValuedPathExpression
Determines whether a whitespace was parsed after the collection-valued path expression. |
| private int | parameterIndex
Determines which child expression is been currently parsed. |
| Access | Constructor and Description |
|---|---|
| public | TreatExpression(AbstractExpression
The parent of this expression parent)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(ExpressionVisitor
The visitor)ExpressionVisitor to visit this objectImplements org. Expression by the given visitor.
|
| public void | acceptChildren(ExpressionVisitor
The visitor)visitor to visit the children of this object.Implements org. Expression.
|
| protected void | addChildrenTo(Collection<Expression>
The collection used to store the children children)Overrides org. AbstractExpression to the given collection.
|
| protected void | addOrderedEncapsulatedExpressionTo(List<Expression>
The list used to store the string representation of the encapsulated children)ExpressionImplements abstract org. Expressions representing the encapsulated Expression.
|
| public final JPQLQueryBNF | findQueryBNF(Expression
The expression)Expression that is a descendant of this oneOverrides org. Implements org. JPQLQueryBNF that represents the fragment of this Expression
that was used when parsing the given Expression.
|
| public String | Returns: The AS identifier that was actually parsed, or an empty string if it was not parsedReturns the actual AS identifier found in the string representation of the JPQL query, which has the actual case that was used. |
| public Expression | Returns: The expression that represents the collection-valued path expressionReturns the |
| public Expression | Returns: The expression representing the entity typeReturns the |
| public JPQLQueryBNF | getQueryBNF()
Implements org. Expression.
|
| public boolean | Returns: true if the identifier AS was parsed; false otherwiseDetermines whether the identifier AS was parsed. |
| public boolean | Returns: true if the collection-valued path expression was parsed;
false if nothing was parsedDetermines whether the collection-valued path expression of the query was parsed. |
| public boolean | hasEncapsulatedExpression()
Implements abstract org. |
| public boolean | Returns: true if the entity type was parsed; false if nothing was
parsedDetermines whether the entity type was parsed. |
| public boolean | Returns: true if there was a whitespace after AS; false
otherwiseDetermines whether a whitespace was parsed after AS. |
| public boolean | Returns: true if a whitespace was parsed after the collection-valued path
expression; false otherwiseDetermines whether a whitespace was parsed after the collection-valued path expression. |
| protected boolean | isParsingComplete(WordParser
The text to parse based on the current position of the cursor wordParser, String The word that was retrieved from the given text, which is the first word in the text word, Expression The expression)Expression that has already been parsedOverrides org. |
| protected void | parseEncapsulatedExpression(WordParser
The text to parse based on the current position of the cursor wordParser, int The number of whitespace characters that were parsed after '(' whitespaceCount, boolean Determines whether the parsing system should be tolerant, meaning if it should
try to parse invalid or incomplete queries tolerant)Implements abstract org. WordParser.
|
| protected void | removeEncapsulatedExpression()
Implements abstract org. Expression that was parsed, it should not be part of this one.
|
| protected void | toParsedTextEncapsulatedExpression(StringBuilder
The buffer used to append the encapsulated writer, boolean Expression's string
representationDetermines 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 actual)Implements abstract org. Expression.
|
| asIdentifier | back to summary |
|---|---|
| private String asIdentifier The actual AS identifier found in the string representation of the JPQL query. | |
| collectionValuedPathExpression | back to summary |
|---|---|
| private AbstractExpression collectionValuedPathExpression The | |
| entityType | back to summary |
|---|---|
| private AbstractExpression entityType The entity type used to downcast the type of the elements in the collection. | |
| hasSpaceAfterAs | back to summary |
|---|---|
| private boolean hasSpaceAfterAs Determines whether a whitespace was parsed after AS. | |
| hasSpaceAfterCollectionValuedPathExpression | back to summary |
|---|---|
| private boolean hasSpaceAfterCollectionValuedPathExpression Determines whether a whitespace was parsed after the collection-valued path expression. | |
| parameterIndex | back to summary |
|---|---|
| private int parameterIndex Determines which child expression is been currently parsed. | |
| TreatExpression | back to summary |
|---|---|
| public TreatExpression(AbstractExpression parent) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(ExpressionVisitor visitor) Implements org. Doc from org. Visits this
| |
| acceptChildren | back to summary |
|---|---|
| public void acceptChildren(ExpressionVisitor visitor) Implements org. Doc from org. Visits the children of this
This does not traverse the
| |
| addChildrenTo | back to summary |
|---|---|
| protected void addChildrenTo(Collection<Expression> children) Overrides org. Doc from org. Adds the children of this
| |
| addOrderedEncapsulatedExpressionTo | back to summary |
|---|---|
| protected void addOrderedEncapsulatedExpressionTo(List<Expression> children) Implements abstract org. Adds the
| |
| findQueryBNF | back to summary |
|---|---|
| public final JPQLQueryBNF findQueryBNF(Expression expression) Overrides org. Implements org. Doc from org. Retrieves the
| |
| getActualAsIdentifier | back to summary |
|---|---|
| public String getActualAsIdentifier() Returns the actual AS identifier found in the string representation of the JPQL query, which has the actual case that was used.
| |
| getCollectionValuedPathExpression | back to summary |
|---|---|
| public Expression getCollectionValuedPathExpression() Returns the
| |
| getEntityType | back to summary |
|---|---|
| public Expression getEntityType() Returns the
| |
| getQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF getQueryBNF() Implements org. Doc from org. Returns the BNF of this
| |
| hasAs | back to summary |
|---|---|
| public boolean hasAs() Determines whether the identifier AS was parsed.
| |
| hasCollectionValuedPathExpression | back to summary |
|---|---|
| public boolean hasCollectionValuedPathExpression() Determines whether the collection-valued path expression of the query was parsed.
| |
| hasEncapsulatedExpression | back to summary |
|---|---|
| public boolean hasEncapsulatedExpression() Implements abstract org. Doc from org. Determines whether something was parsed after the left parenthesis.
| |
| hasEntityType | back to summary |
|---|---|
| public boolean hasEntityType() Determines whether the entity type was parsed.
| |
| hasSpaceAfterAs | back to summary |
|---|---|
| public boolean hasSpaceAfterAs() Determines whether a whitespace was parsed after AS.
| |
| hasSpaceAfterCollectionValuedPathExpression | back to summary |
|---|---|
| public boolean hasSpaceAfterCollectionValuedPathExpression() Determines whether a whitespace was parsed after the collection-valued path expression.
| |
| isParsingComplete | back to summary |
|---|---|
| protected boolean isParsingComplete(WordParser wordParser, String word, Expression expression) Overrides org. Doc from org. Determines whether the parsing is complete based on what is left in the given text. The text is never empty.
| |
| parseEncapsulatedExpression | back to summary |
|---|---|
| protected void parseEncapsulatedExpression(WordParser wordParser, int whitespaceCount, boolean tolerant) Implements abstract org. Doc from org. Parses the encapsulated expression by starting at the current position, which is part of the
given
| |
| removeEncapsulatedExpression | back to summary |
|---|---|
| protected void removeEncapsulatedExpression() Implements abstract org. Doc from org. Removes the encapsulated
| |
| toParsedTextEncapsulatedExpression | back to summary |
|---|---|
| protected void toParsedTextEncapsulatedExpression(StringBuilder writer, boolean actual) Implements abstract org. Generates a string representation of the encapsulated
| |