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

public final Class SizeExpression

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

The SIZE function returns an integer value, the number of elements of the collection. If the collection is empty, the SIZE function evaluates to zero.
BNF: expression ::= SIZE(collection_valued_path_expression)
Author
Pascal Filion
Since
2.3
Version
2.5

Constructor Summary

AccessConstructor and Description
public
SizeExpression(AbstractExpression
The parent of this expression
parent
)

Creates a new SizeExpression.

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.
public String
public JPQLQueryBNF
protected AbstractExpression
parse(WordParser
The text to parse based on the current position of the cursor
wordParser
,
String
The unique identifier of the JPQLQueryBNF that is used to determine how to parse the text at the current cursor position within the JPQL query
queryBNFId
,
boolean
Determines whether the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queries
tolerant
)

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

Parses the given text by using the specified BNF.
Inherited from org.eclipse.persistence.jpa.jpql.parser.AbstractSingleEncapsulatedExpression:
acceptChildrenaddChildrenToaddOrderedEncapsulatedExpressionTofindQueryBNFgetExpressionhasEncapsulatedExpressionhasExpressionparseEncapsulatedExpressionremoveEncapsulatedExpressionsetExpressiontoParsedTextEncapsulatedExpression

Constructor Detail

SizeExpressionback to summary
public SizeExpression(AbstractExpression parent)

Creates a new SizeExpression.

Parameters
parent:AbstractExpression

The parent of this expression

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
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
parseback to summary
protected AbstractExpression parse(WordParser wordParser, String queryBNFId, boolean tolerant)

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

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

Parses the given text by using the specified BNF.

Parameters
wordParser:WordParser

The text to parse based on the current position of the cursor

queryBNFId:String

The unique identifier of the JPQLQueryBNF that is used to determine how to parse the text at the current cursor position within the JPQL query

tolerant:boolean

Determines whether the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queries

Returns:AbstractExpression

The Expression representing the given sub-query

Annotations
@Override