EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

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

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.FieldNameRenamer
All Implemented Interfaces:
ExpressionVisitor
Enclosing class:
BasicRefactoringTool

protected class BasicRefactoringTool.FieldNameRenamer
extends BasicRefactoringTool.AbstractRenamer

This visitor renames any segment of a path expression.


Field Summary
protected  java.lang.String newFieldName
          The new name of the attribute.
protected  java.lang.String oldFieldName
          The current name of the attribute to rename.
protected  java.lang.String typeName
          The fully qualified name of the type that got one of its attributes renamed.
 
Fields inherited from class org.eclipse.persistence.jpa.jpql.BasicRefactoringTool.AbstractRenamer
textEdits
 
Constructor Summary
BasicRefactoringTool.FieldNameRenamer(JPQLQueryContext queryContext, java.lang.String typeName, java.lang.String oldFieldName, java.lang.String newFieldName)
          Creates a new FieldNameRenamer.
 
Method Summary
protected  void rename(AbstractPathExpression expression)
          Performs the rename on the path expression.
 void visit(CollectionValuedPathExpression expression)
          Visits the CollectionValuedPathExpression expression.
 void visit(StateFieldPathExpression expression)
          Visits the StateFieldPathExpression 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, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

newFieldName

protected final java.lang.String newFieldName
The new name of the attribute.


oldFieldName

protected final java.lang.String oldFieldName
The current name of the attribute to rename.


typeName

protected final java.lang.String typeName
The fully qualified name of the type that got one of its attributes renamed.

Constructor Detail

BasicRefactoringTool.FieldNameRenamer

public BasicRefactoringTool.FieldNameRenamer(JPQLQueryContext queryContext,
                                             java.lang.String typeName,
                                             java.lang.String oldFieldName,
                                             java.lang.String newFieldName)
Creates a new FieldNameRenamer.

Parameters:
queryContext - The context used to query information about the JPQL query
typeName - The fully qualified name of the type that got one of its attributes renamed
oldFieldName - The current name of the attribute to rename
newFieldName - The new name of the attribute
Method Detail

rename

protected void rename(AbstractPathExpression expression)
Performs the rename on the path expression.

Parameters:
expression - The AbstractPathExpression being visited, which may have to have its path renamed

visit

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

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

visit

public void visit(StateFieldPathExpression expression)
Visits the StateFieldPathExpression 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