query but
rather gather the changes in RefactoringDelta and it is the responsibility of the invoker
to the actual change.
Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
DefaultBasicRefactoringTool, EclipseLinkBasicRefactoringTool
| Modifier and Type | Class and Description |
|---|---|
| protected abstract class | BasicRefactoringTool.AbstractRenamer
The abstract class that all refactoring classes should extend, it automatically provides the
MultiTextEdit
that will hold the |
| protected class | BasicRefactoringTool.AttributeNameRenamer
This visitor renames any segment of a path expression. |
| protected class | BasicRefactoringTool.ClassNameRenamer
This visitor renames a fully qualified class name. |
| protected class | BasicRefactoringTool.EntityNameRenamer
This visitor renames an entity name. |
| protected class | BasicRefactoringTool.EnumConstantRenamer
This visitor renames an enum constant. |
| protected static class | BasicRefactoringTool.JavaQuery
A simple implementation of |
| protected class | BasicRefactoringTool.ResultVariableNameRenamer
This visitor renames all the result variables found in the JPQL query. |
| protected class | BasicRefactoringTool.VariableNameRenamer
This visitor renames all the identification variables found in the JPQL query. |
| Modifier and Type | Field and Description |
|---|---|
| private DefaultRefactoringDelta | delta
Keeps track of the changes made to the JPQL query. |
| private JPQLExpression | jpqlExpression
The parsed tree representation of the JPQL query. |
| private JPQLGrammar | jpqlGrammar
The |
| private JPQLQueryContext | queryContext
The context used to query information about the JPQL query. |
| Access | Constructor and Description |
|---|---|
| protected | BasicRefactoringTool(CharSequence
The JPQL query to manipulate jpqlQuery, JPQLGrammar The jpqlGrammar, IManagedTypeProvider JPQLGrammar that was used to parse the JPQL queryThe external form of a provider that gives access to the JPA metadata managedTypeProvider)Creates a new |
| protected | BasicRefactoringTool(CharSequence
The JPQL query to manipulate or a single JPQL fragment, which is parsed
using the JPQL query BNF identifier by the given ID jpqlFragment, JPQLGrammar The jpqlGrammar, IManagedTypeProvider JPQLGrammar that was used to parse the JPQL fragmentThe external form of a provider that gives access to the JPA metadata managedTypeProvider, String The unique identifier of the jpqlQueryBNFId)JPQLQueryBNF that determines how to parse the JPQL fragmentCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| protected BasicRefactoringTool. | Returns: A newAttributeNameRenamerThe fully qualified name of the type that got one of its attributes renamed typeName, String The current name of the attribute to rename oldAttributeName, String The new name of the attribute newAttributeName)Creates the visitor that will traverse the representation of the JPQL query and will rename a type's attribute name. |
| protected BasicRefactoringTool. | Returns: A newClassNameRenamerThe current name of the class to rename oldClassName, String The new name of the class newClassName)Creates the visitor that will traverse the representation of the JPQL query and will rename the fully qualified class name. |
| protected BasicRefactoringTool. | Returns: A newEntityNameRenamerThe current name of the entity to rename oldEntityName, String The new name of the entity newEntityName)Creates the visitor that will traverse the representation of the JPQL query and will rename the entity name. |
| protected BasicRefactoringTool. | Returns: A newEnumConstantRenamerThe new name of the enum constant oldClassName, String The current name of the enum constant to rename newClassName)Creates the visitor that will traverse the representation of the JPQL query and will rename the enum constant. |
| protected abstract JPQLQueryContext | Returns: A new concrete instance ofJPQLQueryContextCreates a new |
| protected BasicRefactoringTool. | Returns: A newResultVariableNameRenamerThe current result variable name oldVariableName, String The new name of the result variable newVariableName)Creates the visitor that will traverse the representation of the JPQL query and will rename a result variable. |
| protected BasicRefactoringTool. | Returns: A newVariableNameRenamerThe current identification variable name oldVariableName, String The new name of the identification variable newVariableName)Creates the visitor that will traverse the representation of the JPQL query and will rename an identification variable. |
| public RefactoringDelta | Returns: An object containing the refactoring eventsReturns the delta of the changes made to the JPQL query. |
| public JPQLExpression | Returns: The root of the parsed treeReturns the parsed tree representation of the JPQL query. |
| public JPQLGrammar | Returns: TheJPQLGrammar that was used to parse the JPQL query or JPQL fragmentsReturns the |
| public JPQLQueryContext | Returns: TheJPQLQueryContext holding onto the JPQL query and the cached informationReturns the |
| public boolean | hasChanges()
Determines whether some refactoring operations found changes to be made in the JPQL query. |
| public void | renameAttribute(Class<?>
The Java class from which the change originate type, String The current name of the attribute to rename oldAttributeName, String The new name of the attribute newAttributeName)Renames the attribute (persistent field or persistent property) from the given type. |
| public void | renameAttribute(IType
The type, String IType from which the change originateThe current name of the attribute to rename oldAttributeName, String The new name of the attribute newAttributeName)Renames the attribute (persistent field or persistent property) from the given type. |
| public void | renameAttribute(String
The fully qualified name of the type that got one of its attributes renamed typeName, String The current name of the attribute to rename oldAttributeName, String The new name of the attribute newAttributeName)Renames the attribute (persistent field or persistent property) from the given type. |
| public void | renameClassName(String
The current fully qualified class name of the class to rename oldClassName, String The new fully qualified class name newClassName)Renames a fully qualified class name. |
| public void | renameEntityName(String
The current name of the entity to rename oldEntityName, String The new name of the entity newEntityName)Renames a given entity name. |
| public void | renameEnumConstant(String
The current fully qualified name of the enum constant to rename oldEnumConstant, String The new fully qualified name of the enum constant newEnumConstant)Renames an enum constant, which has to be fully qualified. |
| public void | renameResultVariable(String
The current identification variable name oldVariableName, String The new name of the identification variable newVariableName)Renames a result variable name. |
| public void | renameVariable(String
The current identification variable name oldVariableName, String The new name of the identification variable newVariableName)Renames a variable name. |
| public String | toActualText()
Implements abstract org. |