Class BasicRefactoringTool.EntityNameRenamer
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
-
- org.eclipse.persistence.jpa.jpql.parser.AbstractTraverseChildrenVisitor
-
- org.eclipse.persistence.jpa.jpql.tools.BasicRefactoringTool.AbstractRenamer
-
- org.eclipse.persistence.jpa.jpql.tools.BasicRefactoringTool.EntityNameRenamer
-
- All Implemented Interfaces:
ExpressionVisitor
- Enclosing class:
- BasicRefactoringTool
protected class BasicRefactoringTool.EntityNameRenamer extends BasicRefactoringTool.AbstractRenamer
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.-
Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.BasicRefactoringTool.AbstractRenamer
textEdits
-
-
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(AbstractSchemaName expression)
Visits theAbstractSchemaName
expression.void
visit(EntityTypeLiteral expression)
Visits theEntityTypeLiteral
expression.void
visit(IdentificationVariable expression)
Visits theIdentificationVariable
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
-
-
-
-
Method Detail
-
visit
public void visit(AbstractSchemaName expression)
Visits theAbstractSchemaName
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(EntityTypeLiteral expression)
Visits theEntityTypeLiteral
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(IdentificationVariable expression)
Visits theIdentificationVariable
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
-