protected static class RefactoringTool.ResultVariableNameRenamer extends AbstractTraverseChildrenVisitor
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
newVariableName
The new name of the result variable.
|
protected java.lang.String |
oldVariableName
The current result variable name.
|
protected boolean |
renameIdentificationVariable
Makes sure an identification variable is renamed only when it's used by an order by item.
|
Constructor and Description |
---|
ResultVariableNameRenamer(java.lang.String oldVariableName,
java.lang.String newVariableName)
Creates a new
ResultVariableNameRenamer . |
Modifier and Type | Method and Description |
---|---|
void |
visit(IdentificationVariableStateObject stateObject)
Visits the given
IdentificationVariableStateObject . |
void |
visit(JPQLQueryStateObject stateObject)
Visits the given
JPQLQueryStateObject . |
void |
visit(OrderByItemStateObject stateObject)
Visits the given
OrderByItemStateObject . |
void |
visit(ResultVariableStateObject stateObject)
Visits the given
ResultVariableStateObject . |
void |
visit(SelectStatementStateObject stateObject)
Visits the given
SelectStatementStateObject . |
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
protected final java.lang.String newVariableName
protected final java.lang.String oldVariableName
protected boolean renameIdentificationVariable
public ResultVariableNameRenamer(java.lang.String oldVariableName, java.lang.String newVariableName)
ResultVariableNameRenamer
.oldVariableName
- The current result variable namenewVariableName
- The new name of the result variablepublic void visit(IdentificationVariableStateObject stateObject)
IdentificationVariableStateObject
.visit
in interface StateObjectVisitor
visit
in class AnonymousStateObjectVisitor
stateObject
- The IdentificationVariableStateObject
to visitpublic void visit(JPQLQueryStateObject stateObject)
JPQLQueryStateObject
.visit
in interface StateObjectVisitor
visit
in class AnonymousStateObjectVisitor
stateObject
- The JPQLQueryStateObject
to visitpublic void visit(OrderByItemStateObject stateObject)
OrderByItemStateObject
.visit
in interface StateObjectVisitor
visit
in class AnonymousStateObjectVisitor
stateObject
- The OrderByItemStateObject
to visitpublic void visit(ResultVariableStateObject stateObject)
ResultVariableStateObject
.visit
in interface StateObjectVisitor
visit
in class AnonymousStateObjectVisitor
stateObject
- The ResultVariableStateObject
to visitpublic void visit(SelectStatementStateObject stateObject)
SelectStatementStateObject
.visit
in interface StateObjectVisitor
visit
in class AnonymousStateObjectVisitor
stateObject
- The SelectStatementStateObject
to visit