EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

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

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

protected static class RefactoringTool.FieldNameRenamer
extends AbstractTraverseChildrenVisitor

This visitor renames any segment of a path expression.


Field Summary
protected  IManagedTypeProvider managedTypeProvider
          The external form of a provider that gives access to the JPA metadata.
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.
 
Constructor Summary
RefactoringTool.FieldNameRenamer(IManagedTypeProvider managedTypeProvider, java.lang.String typeName, java.lang.String oldFieldName, java.lang.String newFieldName)
          Creates a new FieldNameRenamer.
 
Method Summary
protected  void rename(AbstractPathExpressionStateObject stateObject)
          Performs the rename on the path expression.
 void visit(CollectionValuedPathExpressionStateObject stateObject)
          Visits the given CollectionValuedPathExpressionStateObject.
 void visit(StateFieldPathExpressionStateObject stateObject)
          Visits the given StateFieldPathExpressionStateObject.
 
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, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

managedTypeProvider

protected final IManagedTypeProvider managedTypeProvider
The external form of a provider that gives access to the JPA metadata.


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

RefactoringTool.FieldNameRenamer

public RefactoringTool.FieldNameRenamer(IManagedTypeProvider managedTypeProvider,
                                        java.lang.String typeName,
                                        java.lang.String oldFieldName,
                                        java.lang.String newFieldName)
Creates a new FieldNameRenamer.

Parameters:
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(AbstractPathExpressionStateObject stateObject)
Performs the rename on the path expression.

Parameters:
stateObject - The AbstractPathExpressionStateObject being visited, which may have to have its path renamed

visit

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

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

visit

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

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

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference