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
Modifier and TypeFieldDescriptionprotected final IManagedTypeProvider
The external form of a provider that gives access to the JPA metadata.protected final String
The new name of the attribute.protected final String
The current name of the attribute to rename.protected final String
The fully qualified name of the type that got one of its attributes renamed. -
Constructor Summary
ConstructorDescriptionFieldNameRenamer
(IManagedTypeProvider managedTypeProvider, String typeName, String oldFieldName, String newFieldName) Creates a newAttributeNameRenamer
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
rename
(AbstractPathExpressionStateObject stateObject) Performs the rename on the path expression.void
visit
(CollectionValuedPathExpressionStateObject stateObject) Visits the givenCollectionValuedPathExpressionStateObject
.void
visit
(StateFieldPathExpressionStateObject stateObject) Visits the givenStateFieldPathExpressionStateObject
.Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractTraverseChildrenVisitor
visit
Methods 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
- TheAbstractPathExpressionStateObject
being visited, which may have to have its path renamed
-
visit
Description copied from interface:StateObjectVisitor
Visits the givenCollectionValuedPathExpressionStateObject
.- Specified by:
visit
in interfaceStateObjectVisitor
- Overrides:
visit
in classAnonymousStateObjectVisitor
- Parameters:
stateObject
- TheCollectionValuedPathExpressionStateObject
to visit
-
visit
Description copied from interface:StateObjectVisitor
Visits the givenStateFieldPathExpressionStateObject
.- Specified by:
visit
in interfaceStateObjectVisitor
- Overrides:
visit
in classAnonymousStateObjectVisitor
- Parameters:
stateObject
- TheStateFieldPathExpressionStateObject
to visit
-