Class RefactoringTool.EntityNameRenamer
- 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.EntityNameRenamer
-
- All Implemented Interfaces:
StateObjectVisitor
- Enclosing class:
- RefactoringTool
protected static class RefactoringTool.EntityNameRenamer extends AbstractTraverseChildrenVisitor
This visitor renames an entity name. There are three possibleStateObjects
that can represent an entity name:-
AbstractSchemaNameStateObject
: Employee in
SELECT e
FROM Employee e
-
EntityTypeLiteralStateObject
: Exempt in
SELECT CASE TYPE(e) WHEN Exempt THEN 'Exempt'
ELSE 'NONE'
END
FROM Employee e
-
IdentificationVariableStateObject
: Exempt in
SELECT e
FROM Employee e
WHERE TYPE(e) <> Exempt
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
newEntityName
The current name of the entity to rename.protected java.lang.String
oldEntityName
The new name of the entity.
-
Constructor Summary
Constructors Constructor Description EntityNameRenamer(java.lang.String oldEntityName, java.lang.String newEntityName)
Creates a newEntityNameRenamer
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visit(AbstractSchemaNameStateObject stateObject)
Visits the givenAbstractSchemaNameStateObject
.void
visit(EntityTypeLiteralStateObject stateObject)
Visits the givenEntityTypeLiteralStateObject
.void
visit(IdentificationVariableStateObject stateObject)
Visits the givenIdentificationVariableStateObject
.void
visit(TreatExpressionStateObject stateObject)
Visits the givenTreatExpressionStateObject
.-
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
-
-
-
-
Method Detail
-
visit
public void visit(AbstractSchemaNameStateObject stateObject)
Visits the givenAbstractSchemaNameStateObject
.- Specified by:
visit
in interfaceStateObjectVisitor
- Overrides:
visit
in classAnonymousStateObjectVisitor
- Parameters:
stateObject
- TheAbstractSchemaNameStateObject
to visit
-
visit
public void visit(EntityTypeLiteralStateObject stateObject)
Visits the givenEntityTypeLiteralStateObject
.- Specified by:
visit
in interfaceStateObjectVisitor
- Overrides:
visit
in classAnonymousStateObjectVisitor
- Parameters:
stateObject
- TheEntityTypeLiteralStateObject
to visit
-
visit
public void visit(IdentificationVariableStateObject stateObject)
Visits the givenIdentificationVariableStateObject
.- Specified by:
visit
in interfaceStateObjectVisitor
- Overrides:
visit
in classAnonymousStateObjectVisitor
- Parameters:
stateObject
- TheIdentificationVariableStateObject
to visit
-
visit
public void visit(TreatExpressionStateObject stateObject)
Visits the givenTreatExpressionStateObject
.- Specified by:
visit
in interfaceStateObjectVisitor
- Overrides:
visit
in classAnonymousStateObjectVisitor
- Parameters:
stateObject
- TheTreatExpressionStateObject
to visit
-
-