Package org.eclipse.persistence.jpa.jpql
Class BaseDeclarationIdentificationVariableFinder
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
-
- org.eclipse.persistence.jpa.jpql.parser.AbstractTraverseParentVisitor
-
- org.eclipse.persistence.jpa.jpql.BaseDeclarationIdentificationVariableFinder
-
- All Implemented Interfaces:
ExpressionVisitor
public class BaseDeclarationIdentificationVariableFinder extends AbstractTraverseParentVisitor
This visitor traverses the parsed tree and retrieves theIdentificationVariable
defined in the base range variable declaration for the top-level statement if and only if the query is aDELETE
orUPDATE
query.- Version:
- 2.5
- Author:
- Pascal Filion
- Since:
- 2.5
-
-
Field Summary
Fields Modifier and Type Field Description IdentificationVariable
expression
TheIdentificationVariable
used to define the abstract schema name from either the UPDATE or DELETE clause.protected boolean
traverse
Determines if theRangeVariableDeclaration
should traverse its identification variable expression or simply visit the parent hierarchy.
-
Constructor Summary
Constructors Constructor Description BaseDeclarationIdentificationVariableFinder()
Creates a newBaseDeclarationIdentificationVariableFinder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visit(BadExpression expression)
Visits theBadExpression
expression.void
visit(CollectionExpression expression)
Visits theCollectionExpression
expression.void
visit(DeleteClause expression)
Visits theDeleteClause
expression.void
visit(DeleteStatement expression)
Visits theDeleteStatement
expression.void
visit(FromClause expression)
Visits theFromClause
expression.void
visit(IdentificationVariable expression)
Visits theIdentificationVariable
expression.void
visit(IdentificationVariableDeclaration expression)
Visits theIdentificationVariableDeclaration
expression.void
visit(JPQLExpression expression)
Visits theJPQLExpression
expression.void
visit(NullExpression expression)
Visits theNullExpression
expression.void
visit(RangeVariableDeclaration expression)
Visits theRangeVariableDeclaration
expression.void
visit(SelectStatement expression)
Visits theSelectStatement
expression.void
visit(UnknownExpression expression)
Visits theUnknownExpression
expression.void
visit(UpdateClause expression)
Visits theUpdateClause
expression.void
visit(UpdateStatement expression)
Visits theUpdateStatement
expression.-
Methods inherited from class org.eclipse.persistence.jpa.jpql.parser.AbstractTraverseParentVisitor
visit
-
Methods inherited from class org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
-
-
-
Field Detail
-
expression
public IdentificationVariable expression
TheIdentificationVariable
used to define the abstract schema name from either the UPDATE or DELETE clause.
-
traverse
protected boolean traverse
Determines if theRangeVariableDeclaration
should traverse its identification variable expression or simply visit the parent hierarchy.
-
-
Method Detail
-
visit
public void visit(BadExpression expression)
Visits theBadExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(CollectionExpression expression)
Visits theCollectionExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(DeleteClause expression)
Visits theDeleteClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(DeleteStatement expression)
Visits theDeleteStatement
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(FromClause expression)
Visits theFromClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(IdentificationVariable expression)
Visits theIdentificationVariable
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(IdentificationVariableDeclaration expression)
Visits theIdentificationVariableDeclaration
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(JPQLExpression expression)
Visits theJPQLExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractTraverseParentVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(NullExpression expression)
Visits theNullExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(RangeVariableDeclaration expression)
Visits theRangeVariableDeclaration
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(SelectStatement expression)
Visits theSelectStatement
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(UnknownExpression expression)
Visits theUnknownExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheUnknownExpression
to visit
-
visit
public void visit(UpdateClause expression)
Visits theUpdateClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheUpdateClause
to visit
-
visit
public void visit(UpdateStatement expression)
Visits theUpdateStatement
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheUpdateStatement
to visit
-
-