EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql
Class RefactoringTool.ResultVariableNameRenamer

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.model.query.AnonymousStateObjectVisitor
      extended by org.eclipse.persistence.jpa.jpql.model.query.AbstractTraverseChildrenVisitor
          extended by org.eclipse.persistence.jpa.jpql.RefactoringTool.ResultVariableNameRenamer
All Implemented Interfaces:
StateObjectVisitor
Enclosing class:
RefactoringTool

protected static class RefactoringTool.ResultVariableNameRenamer
extends AbstractTraverseChildrenVisitor

This visitor renames all the result variables found in the JPQL query.


Field Summary
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 Summary
RefactoringTool.ResultVariableNameRenamer(java.lang.String oldVariableName, java.lang.String newVariableName)
          Creates a new ResultVariableNameRenamer.
 
Method Summary
 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.
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.model.query.AbstractTraverseChildrenVisitor
visit
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

newVariableName

protected final java.lang.String newVariableName
The new name of the result variable.


oldVariableName

protected final java.lang.String oldVariableName
The current result variable name.


renameIdentificationVariable

protected boolean renameIdentificationVariable
Makes sure an identification variable is renamed only when it's used by an order by item.

Constructor Detail

RefactoringTool.ResultVariableNameRenamer

public RefactoringTool.ResultVariableNameRenamer(java.lang.String oldVariableName,
                                                 java.lang.String newVariableName)
Creates a new ResultVariableNameRenamer.

Parameters:
oldVariableName - The current result variable name
newVariableName - The new name of the result variable
Method Detail

visit

public void visit(IdentificationVariableStateObject stateObject)
Visits the given IdentificationVariableStateObject.

Specified by:
visit in interface StateObjectVisitor
Overrides:
visit in class AnonymousStateObjectVisitor
Parameters:
stateObject - The IdentificationVariableStateObject to visit

visit

public void visit(JPQLQueryStateObject stateObject)
Visits the given JPQLQueryStateObject.

Specified by:
visit in interface StateObjectVisitor
Overrides:
visit in class AnonymousStateObjectVisitor
Parameters:
stateObject - The JPQLQueryStateObject to visit

visit

public void visit(OrderByItemStateObject stateObject)
Visits the given OrderByItemStateObject.

Specified by:
visit in interface StateObjectVisitor
Overrides:
visit in class AnonymousStateObjectVisitor
Parameters:
stateObject - The OrderByItemStateObject to visit

visit

public void visit(ResultVariableStateObject stateObject)
Visits the given ResultVariableStateObject.

Specified by:
visit in interface StateObjectVisitor
Overrides:
visit in class AnonymousStateObjectVisitor
Parameters:
stateObject - The ResultVariableStateObject to visit

visit

public void visit(SelectStatementStateObject stateObject)
Visits the given SelectStatementStateObject.

Specified by:
visit in interface StateObjectVisitor
Overrides:
visit in class AnonymousStateObjectVisitor
Parameters:
stateObject - The SelectStatementStateObject to visit

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference