EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

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

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
      extended by org.eclipse.persistence.jpa.jpql.parser.AbstractTraverseChildrenVisitor
          extended by org.eclipse.persistence.jpa.jpql.BasicRefactoringTool.AbstractRenamer
              extended by org.eclipse.persistence.jpa.jpql.BasicRefactoringTool.ResultVariableNameRenamer
All Implemented Interfaces:
ExpressionVisitor
Enclosing class:
BasicRefactoringTool

protected class BasicRefactoringTool.ResultVariableNameRenamer
extends BasicRefactoringTool.AbstractRenamer

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.
 
Fields inherited from class org.eclipse.persistence.jpa.jpql.BasicRefactoringTool.AbstractRenamer
textEdits
 
Constructor Summary
BasicRefactoringTool.ResultVariableNameRenamer(java.lang.String oldVariableName, java.lang.String newVariableName)
          Creates a new ResultVariableNameRenamer.
 
Method Summary
 void visit(IdentificationVariable expression)
          Visits the IdentificationVariable expression.
 void visit(ResultVariable expression)
          Visits the ResultVariable expression.
 void visit(SelectStatement expression)
          Visits the SelectStatement expression.
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.BasicRefactoringTool.AbstractRenamer
addTextEdit, addTextEdit, buildTextEdit, reposition
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.parser.AbstractTraverseChildrenVisitor
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, 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

BasicRefactoringTool.ResultVariableNameRenamer

public BasicRefactoringTool.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(IdentificationVariable expression)
Visits the IdentificationVariable expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(ResultVariable expression)
Visits the ResultVariable expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(SelectStatement expression)
Visits the SelectStatement expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference