EclipseLink 2.5.0, build 'v20130425-368d603' API Reference

org.eclipse.persistence.jpa.jpql.tools
Class BasicRefactoringTool.AttributeNameRenamer

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.tools.BasicRefactoringTool.AbstractRenamer
              extended by org.eclipse.persistence.jpa.jpql.tools.BasicRefactoringTool.AttributeNameRenamer
All Implemented Interfaces:
ExpressionVisitor
Enclosing class:
BasicRefactoringTool

protected class BasicRefactoringTool.AttributeNameRenamer
extends BasicRefactoringTool.AbstractRenamer

This visitor renames any segment of a path expression.


Field Summary
protected  java.lang.String newAttributeName
          The new name of the attribute.
protected  java.lang.String oldAttributeName
          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.tools.BasicRefactoringTool.AbstractRenamer
textEdits
 
Constructor Summary
BasicRefactoringTool.AttributeNameRenamer(JPQLQueryContext queryContext, java.lang.String typeName, java.lang.String oldAttributeName, java.lang.String newAttributeName)
          Creates a new AttributeNameRenamer.
 
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.tools.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

newAttributeName

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


oldAttributeName

protected final java.lang.String oldAttributeName
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.AttributeNameRenamer

public BasicRefactoringTool.AttributeNameRenamer(JPQLQueryContext queryContext,
                                                 java.lang.String typeName,
                                                 java.lang.String oldAttributeName,
                                                 java.lang.String newAttributeName)
Creates a new AttributeNameRenamer.

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
oldAttributeName - The current name of the attribute to rename
newAttributeName - 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.5.0, build 'v20130425-368d603' API Reference