Class RefactoringTool.FieldNameRenamer
java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.model.query.AnonymousStateObjectVisitor
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractTraverseChildrenVisitor
org.eclipse.persistence.jpa.jpql.tools.RefactoringTool.FieldNameRenamer
- All Implemented Interfaces:
StateObjectVisitor
- Enclosing class:
RefactoringTool
This visitor renames any segment of a path expression.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final IManagedTypeProviderThe external form of a provider that gives access to the JPA metadata.protected final StringThe new name of the attribute.protected final StringThe current name of the attribute to rename.protected final StringThe fully qualified name of the type that got one of its attributes renamed. -
Constructor Summary
ConstructorsConstructorDescriptionFieldNameRenamer(IManagedTypeProvider managedTypeProvider, String typeName, String oldFieldName, String newFieldName) Creates a newAttributeNameRenamer. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidrename(AbstractPathExpressionStateObject stateObject) Performs the rename on the path expression.voidvisit(CollectionValuedPathExpressionStateObject stateObject) Visits the givenCollectionValuedPathExpressionStateObject.voidvisit(StateFieldPathExpressionStateObject stateObject) Visits the givenStateFieldPathExpressionStateObject.Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractTraverseChildrenVisitor
visitMethods inherited from class org.eclipse.persistence.jpa.jpql.tools.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
-
Field Details
-
managedTypeProvider
The external form of a provider that gives access to the JPA metadata. -
newFieldName
The new name of the attribute. -
oldFieldName
The current name of the attribute to rename. -
typeName
The fully qualified name of the type that got one of its attributes renamed.
-
-
Constructor Details
-
FieldNameRenamer
public FieldNameRenamer(IManagedTypeProvider managedTypeProvider, String typeName, String oldFieldName, String newFieldName) Creates a newAttributeNameRenamer.- Parameters:
typeName- The fully qualified name of the type that got one of its attributes renamedoldFieldName- The current name of the attribute to renamenewFieldName- The new name of the attribute
-
-
Method Details
-
rename
Performs the rename on the path expression.- Parameters:
stateObject- TheAbstractPathExpressionStateObjectbeing visited, which may have to have its path renamed
-
visit
Description copied from interface:StateObjectVisitorVisits the givenCollectionValuedPathExpressionStateObject.- Specified by:
visitin interfaceStateObjectVisitor- Overrides:
visitin classAnonymousStateObjectVisitor- Parameters:
stateObject- TheCollectionValuedPathExpressionStateObjectto visit
-
visit
Description copied from interface:StateObjectVisitorVisits the givenStateFieldPathExpressionStateObject.- Specified by:
visitin interfaceStateObjectVisitor- Overrides:
visitin classAnonymousStateObjectVisitor- Parameters:
stateObject- TheStateFieldPathExpressionStateObjectto visit
-