EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql
Class EclipseLinkRefactoringTool

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.AbstractRefactoringTool
      extended by org.eclipse.persistence.jpa.jpql.RefactoringTool
          extended by org.eclipse.persistence.jpa.jpql.EclipseLinkRefactoringTool

public class EclipseLinkRefactoringTool
extends RefactoringTool

This refactoring tool add support for EclipseLink specific extension over the default implementation of JPQL defined in the Java Persistence functional specification.

Provided functionality:

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.

Version:
2.4
See Also:
DefaultRefactoringTool
Author:
Pascal Filion
Since:
2.4

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.persistence.jpa.jpql.RefactoringTool
RefactoringTool.ClassNameRenamer, RefactoringTool.EntityNameRenamer, RefactoringTool.EnumConstantRenamer, RefactoringTool.FieldNameRenamer, RefactoringTool.ResultVariableNameRenamer, RefactoringTool.StateObjectUpdater<T extends StateObject>, RefactoringTool.VariableNameRenamer
 
Constructor Summary
EclipseLinkRefactoringTool(IManagedTypeProvider managedTypeProvider, IJPQLQueryBuilder jpqlQueryBuilder, java.lang.CharSequence jpqlQuery)
          Creates a new EclipseLinkRefactoringTool.
EclipseLinkRefactoringTool(IManagedTypeProvider managedTypeProvider, IJPQLQueryBuilder jpqlQueryBuilder, java.lang.CharSequence jpqlFragment, java.lang.String jpqlQueryBNFId)
          Creates a new EclipseLinkRefactoringTool.
 
Method Summary
protected  IJPQLQueryFormatter buildFormatter()
          Creates a new formatter that will convert the StateObject representation of the JPQL query, once the refactoring occurred into a string.
protected  JPQLQueryContext buildJPQLQueryContext()
          Creates a new JPQLQueryContext that can retrieve information from the declaration portion of the JPQL query.
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.RefactoringTool
buildClassNameRenamer, buildEntityNameRenamer, buildEnumConstantRenamer, buildFieldNameRenamer, buildResultVariableNameRenamer, buildStateObject, buildVariableNameRenamer, getFormatter, getGrammar, getJPQLQueryBuilder, getStateObject, renameClassName, renameEntityName, renameEnumConstant, renameField, renameField, renameField, renameResultVariable, renameVariable, setFormatter, toActualText
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.AbstractRefactoringTool
getJPQLFragment, getJPQLQueryBNFId, getManagedTypeProvider, isTolerant, setTolerant
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EclipseLinkRefactoringTool

public EclipseLinkRefactoringTool(IManagedTypeProvider managedTypeProvider,
                                  IJPQLQueryBuilder jpqlQueryBuilder,
                                  java.lang.CharSequence jpqlQuery)
Creates a new EclipseLinkRefactoringTool.

Parameters:
managedTypeProvider - The external form of a provider that gives access to the JPA metadata
jpqlQueryBuilder - The builder that creates the model.query.StateObject StateObject representation of the JPQL query
jpqlQuery - The JPQL query to manipulate

EclipseLinkRefactoringTool

public EclipseLinkRefactoringTool(IManagedTypeProvider managedTypeProvider,
                                  IJPQLQueryBuilder jpqlQueryBuilder,
                                  java.lang.CharSequence jpqlFragment,
                                  java.lang.String jpqlQueryBNFId)
Creates a new EclipseLinkRefactoringTool.

Parameters:
managedTypeProvider - The external form of a provider that gives access to the JPA metadata
jpqlQueryBuilder - The builder that creates the model.query.StateObject StateObject representation of the JPQL query
jpqlFragment - The JPQL query to manipulate or a single JPQL fragment, which is parsed using the JPQL query BNF identifier by the given ID
jpqlQueryBNFId - The unique identifier of the parser.JPQLQueryBNF JPQLQueryBNF that determines how to parse the JPQL fragment
Method Detail

buildFormatter

protected IJPQLQueryFormatter buildFormatter()
Creates a new formatter that will convert the StateObject representation of the JPQL query, once the refactoring occurred into a string.

Specified by:
buildFormatter in class RefactoringTool
Returns:
A new concrete instance of IJPQLQueryFormatter

buildJPQLQueryContext

protected JPQLQueryContext buildJPQLQueryContext()
Creates a new JPQLQueryContext that can retrieve information from the declaration portion of the JPQL query.

NOTE: This is temporary because the StateObject API does not have that knowledge yet.

Specified by:
buildJPQLQueryContext in class RefactoringTool
Returns:
A new concrete instance of JPQLQueryContext

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference