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

public final Class ResultVariableFactory

extends ExpressionFactory
Class Inheritance
Annotations
@SuppressWarnings:nls
Imports
org.eclipse.persistence.jpa.jpql.WordParser

This ResultVariableFactory creates a new ResultVariable when the portion of the query to parse starts with or without AS.
Author
Pascal Filion
Since
2.3
Version
2.5
See Also
ResultVariable

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
ResultVariableFactory.SelectClauseVisitor

This visitor determines whether the result variable should set the parsed expression as the select expression or not.

Field Summary

Modifier and TypeField and Description
public static final String
ID

The unique identifier of this ResultVariableFactory.

private ResultVariableFactory.SelectClauseVisitor
selectClauseVisitor

Caches the visitor that determines if the parent Expression is the top-level SELECT clause.

Constructor Summary

AccessConstructor and Description
public
ResultVariableFactory()

Creates a new ResultVariableFactory.

Method Summary

Modifier and TypeMethod and Description
protected AbstractExpression
buildExpression(AbstractExpression parent, WordParser
The text to parse based on the current position of the cursor
wordParser
,
String
The current word being parsed
word
,
JPQLQueryBNF
The BNF grammar that was used to identifier this factory to be capable to parse a portion of the query
queryBNF
,
AbstractExpression
During the parsing, it is possible the first part of an expression was parsed which needs to be used as a sub-expression of the newly created expression
expression
,
boolean tolerant)

Implements abstract org.eclipse.persistence.jpa.jpql.parser.ExpressionFactory.buildExpression.

Creates a new Expression.
private ResultVariableFactory.SelectClauseVisitor
Inherited from org.eclipse.persistence.jpa.jpql.parser.ExpressionFactory:
addIdentifieraddIdentifierscompareToequalsgetExpressionRegistrygetIdhashCodeidentifierssetExpressionRegistrytoString

Field Detail

IDback to summary
public static final String ID

The unique identifier of this ResultVariableFactory.

selectClauseVisitorback to summary
private ResultVariableFactory.SelectClauseVisitor selectClauseVisitor

Caches the visitor that determines if the parent Expression is the top-level SELECT clause.

Constructor Detail

ResultVariableFactoryback to summary
public ResultVariableFactory()

Creates a new ResultVariableFactory.

Method Detail

buildExpressionback to summary
protected AbstractExpression buildExpression(AbstractExpression parent, WordParser wordParser, String word, JPQLQueryBNF queryBNF, AbstractExpression expression, boolean tolerant)

Implements abstract org.eclipse.persistence.jpa.jpql.parser.ExpressionFactory.buildExpression.

Doc from org.eclipse.persistence.jpa.jpql.parser.ExpressionFactory.buildExpression.

Creates a new Expression.

Parameters
parent:AbstractExpression

The parent AbstractExpression

wordParser:WordParser

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

word:String

The current word being parsed

queryBNF:JPQLQueryBNF

The BNF grammar that was used to identifier this factory to be capable to parse a portion of the query

expression:AbstractExpression

During the parsing, it is possible the first part of an expression was parsed which needs to be used as a sub-expression of the newly created expression

Returns:AbstractExpression

A new AbstractExpression representing the portion or the totality of the text held by WordParser starting at the cursor position

Annotations
@Override
selectClauseVisitorback to summary
private ResultVariableFactory.SelectClauseVisitor selectClauseVisitor()
org.eclipse.persistence.jpa.jpql.parser back to summary

private Class ResultVariableFactory.SelectClauseVisitor

extends AbstractExpressionVisitor
Class Inheritance

This visitor determines whether the result variable should set the parsed expression as the select expression or not. The allowed locations are:

Field Summary

Modifier and TypeField and Description
pack-priv boolean
supported

Indicates if the result variable should have already parsed expression as its select expression.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
Inherited from org.eclipse.persistence.jpa.jpql.parser.AbstractExpressionVisitor:
visitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisitvisit

Field Detail

supportedback to summary
pack-priv boolean supported

Indicates if the result variable should have already parsed expression as its select expression.

Constructor Detail

SelectClauseVisitorback to summary
private SelectClauseVisitor()

Method Detail

visitback to summary
public void visit(JPQLExpression expression)

Overrides org.eclipse.persistence.jpa.jpql.parser.AbstractExpressionVisitor.visit.

Implements org.eclipse.persistence.jpa.jpql.parser.ExpressionVisitor.visit.

Doc from org.eclipse.persistence.jpa.jpql.parser.ExpressionVisitor.visit.

Visits the JPQLExpression expression.

Parameters
expression:JPQLExpression

The Expression to visit

Annotations
@Override
visitback to summary
public void visit(SelectClause expression)

Overrides org.eclipse.persistence.jpa.jpql.parser.AbstractExpressionVisitor.visit.

Implements org.eclipse.persistence.jpa.jpql.parser.ExpressionVisitor.visit.

Doc from org.eclipse.persistence.jpa.jpql.parser.ExpressionVisitor.visit.

Visits the SelectClause expression.

Parameters
expression:SelectClause

The Expression to visit

Annotations
@Override
visitback to summary
public void visit(SimpleSelectClause expression)

Overrides org.eclipse.persistence.jpa.jpql.parser.AbstractExpressionVisitor.visit.

Implements org.eclipse.persistence.jpa.jpql.parser.ExpressionVisitor.visit.

Doc from org.eclipse.persistence.jpa.jpql.parser.ExpressionVisitor.visit.

Visits the SimpleSelectClause expression.

Parameters
expression:SimpleSelectClause

The Expression to visit

Annotations
@Override