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

public final Class SubExpression

extends AbstractSingleEncapsulatedExpression
Class Inheritance
Imports
org.eclipse.persistence.jpa.jpql.ExpressionTools

This expression wraps a sub-expression within parenthesis.
BNF: expression ::= (sub_expression)
Author
Pascal Filion
Since
2.3
Version
2.5

Field Summary

Modifier and TypeField and Description
private JPQLQueryBNF
queryBNF

The JPQLQueryBNF coming from the parent that is used to parse the next portion of the query.

Constructor Summary

AccessConstructor and Description
public
SubExpression(AbstractExpression
The parent of this expression
parent
,
JPQLQueryBNF
The BNF coming from the parent that is used to parse the next portion of the query
queryBNF
)

Creates a new SubExpression.

Method Summary

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

Implements org.eclipse.persistence.jpa.jpql.parser.Expression.accept.

Visits this Expression by the given visitor.
protected boolean
public JPQLQueryBNF
findQueryBNF(Expression
The Expression that is a descendant of this one
expression
)

Overrides org.eclipse.persistence.jpa.jpql.parser.AbstractSingleEncapsulatedExpression.findQueryBNF.

Implements org.eclipse.persistence.jpa.jpql.parser.Expression.findQueryBNF.

Retrieves the JPQLQueryBNF that represents the fragment of this Expression that was used when parsing the given Expression.
public String
public JPQLQueryBNF
protected boolean
handleCollection(JPQLQueryBNF
The JPQLQueryBNF used to determine if the parsing should handle collection of sub-expressions
queryBNF
)

Overrides org.eclipse.persistence.jpa.jpql.parser.AbstractExpression.handleCollection.

Determines whether the given JPQLQueryBNF handles a collection of sub-expressions that are separated by commas.
Inherited from org.eclipse.persistence.jpa.jpql.parser.AbstractSingleEncapsulatedExpression:
acceptChildrenaddChildrenToaddOrderedEncapsulatedExpressionTogetExpressionhasEncapsulatedExpressionhasExpressionparseEncapsulatedExpressionremoveEncapsulatedExpressionsetExpressiontoParsedTextEncapsulatedExpression

Field Detail

queryBNFback to summary
private JPQLQueryBNF queryBNF

The JPQLQueryBNF coming from the parent that is used to parse the next portion of the query.

Constructor Detail

SubExpressionback to summary
public SubExpression(AbstractExpression parent, JPQLQueryBNF queryBNF)

Creates a new SubExpression.

Parameters
parent:AbstractExpression

The parent of this expression

queryBNF:JPQLQueryBNF

The BNF coming from the parent that is used to parse the next portion of the query

Method Detail

acceptback to summary
public void accept(ExpressionVisitor visitor)

Implements org.eclipse.persistence.jpa.jpql.parser.Expression.accept.

Doc from org.eclipse.persistence.jpa.jpql.parser.Expression.accept.

Visits this Expression by the given visitor.

Parameters
visitor:ExpressionVisitor

The ExpressionVisitor to visit this object

Annotations
@Override
areLogicalIdentifiersSupportedback to summary
protected boolean areLogicalIdentifiersSupported()

Overrides org.eclipse.persistence.jpa.jpql.parser.AbstractEncapsulatedExpression.areLogicalIdentifiersSupported.

Annotations
@Override
findQueryBNFback to summary
public JPQLQueryBNF findQueryBNF(Expression expression)

Overrides org.eclipse.persistence.jpa.jpql.parser.AbstractSingleEncapsulatedExpression.findQueryBNF.

Implements org.eclipse.persistence.jpa.jpql.parser.Expression.findQueryBNF.

Doc from org.eclipse.persistence.jpa.jpql.parser.Expression.findQueryBNF.

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

Parameters
expression:Expression

The Expression that is a descendant of this one

Returns:JPQLQueryBNF

The JPQLQueryBNF that was used to parse the given expression

Annotations
@Override
getEncapsulatedExpressionQueryBNFIdback to summary
public String getEncapsulatedExpressionQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.parser.AbstractSingleEncapsulatedExpression.getEncapsulatedExpressionQueryBNFId.

Doc from org.eclipse.persistence.jpa.jpql.parser.AbstractSingleEncapsulatedExpression.getEncapsulatedExpressionQueryBNFId.

Returns the BNF used to parse the encapsulated expression.

Returns:String

The BNF used to parse the encapsulated expression

Annotations
@Override
getQueryBNFback to summary
public JPQLQueryBNF getQueryBNF()

Implements org.eclipse.persistence.jpa.jpql.parser.Expression.getQueryBNF.

Doc from org.eclipse.persistence.jpa.jpql.parser.Expression.getQueryBNF.

Returns the BNF of this Expression.

Returns:JPQLQueryBNF

The JPQLQueryBNF, which represents the grammar of this Expression

Annotations
@Override
handleCollectionback to summary
protected boolean handleCollection(JPQLQueryBNF queryBNF)

Overrides org.eclipse.persistence.jpa.jpql.parser.AbstractExpression.handleCollection.

Doc from org.eclipse.persistence.jpa.jpql.parser.AbstractExpression.handleCollection.

Determines whether the given JPQLQueryBNF handles a collection of sub-expressions that are separated by commas.

Parameters
queryBNF:JPQLQueryBNF

The JPQLQueryBNF used to determine if the parsing should handle collection of sub-expressions

Returns:boolean

true if the sub-expression to parse might have several sub-expressions separated by commas; false otherwise

Annotations
@Override