Class RefactoringTool.VariableNameRenamer
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.tools.model.query.AnonymousStateObjectVisitor
-
- org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractTraverseChildrenVisitor
-
- org.eclipse.persistence.jpa.jpql.tools.RefactoringTool.VariableNameRenamer
-
- All Implemented Interfaces:
StateObjectVisitor
- Enclosing class:
- RefactoringTool
protected static class RefactoringTool.VariableNameRenamer extends AbstractTraverseChildrenVisitor
This visitor renames all the identification variables found in the JPQL query.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
newVariableName
The new name of the identification variable.protected java.lang.String
oldVariableName
The current identification variable name.
-
Constructor Summary
Constructors Constructor Description VariableNameRenamer(java.lang.String oldVariableName, java.lang.String newVariableName)
Creates a newVariableNameRenamer
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visit(CollectionValuedPathExpressionStateObject stateObject)
Visits the givenCollectionValuedPathExpressionStateObject
.void
visit(IdentificationVariableStateObject stateObject)
Visits the givenIdentificationVariableStateObject
.void
visit(StateFieldPathExpressionStateObject stateObject)
Visits the givenStateFieldPathExpressionStateObject
.-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractTraverseChildrenVisitor
visit
-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AnonymousStateObjectVisitor
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, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
-
-
-
Constructor Detail
-
VariableNameRenamer
public VariableNameRenamer(java.lang.String oldVariableName, java.lang.String newVariableName)
Creates a newVariableNameRenamer
.- Parameters:
oldVariableName
- The current identification variable namenewVariableName
- The new name of the identification variable
-
-
Method Detail
-
visit
public void visit(CollectionValuedPathExpressionStateObject stateObject)
Visits the givenCollectionValuedPathExpressionStateObject
.- Specified by:
visit
in interfaceStateObjectVisitor
- Overrides:
visit
in classAnonymousStateObjectVisitor
- Parameters:
stateObject
- TheCollectionValuedPathExpressionStateObject
to visit
-
visit
public void visit(IdentificationVariableStateObject stateObject)
Visits the givenIdentificationVariableStateObject
.- Specified by:
visit
in interfaceStateObjectVisitor
- Overrides:
visit
in classAnonymousStateObjectVisitor
- Parameters:
stateObject
- TheIdentificationVariableStateObject
to visit
-
visit
public void visit(StateFieldPathExpressionStateObject stateObject)
Visits the givenStateFieldPathExpressionStateObject
.- Specified by:
visit
in interfaceStateObjectVisitor
- Overrides:
visit
in classAnonymousStateObjectVisitor
- Parameters:
stateObject
- TheStateFieldPathExpressionStateObject
to visit
-
-