Top Description Constructors Methods
org.eclipse.persistence.jpa.jpql.tools

public Class EclipseLinkRefactoringTool

extends RefactoringTool
Class Inheritance
Imports
org.eclipse.persistence.jpa.jpql.tools.model.EclipseLinkActualJPQLQueryFormatter, .IJPQLQueryBuilder, .IJPQLQueryFormatter, org.eclipse.persistence.jpa.jpql.tools.spi.IManagedTypeProvider

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.

Author
Pascal Filion
Since
2.4
Version
2.4
See Also
DefaultRefactoringTool

Constructor Summary

AccessConstructor and Description
public
EclipseLinkRefactoringTool(IManagedTypeProvider
The external form of a provider that gives access to the JPA metadata
managedTypeProvider
,
IJPQLQueryBuilder
The builder that creates the StateObject representation of the JPQL query
jpqlQueryBuilder
,
CharSequence
The JPQL query to manipulate
jpqlQuery
)

Creates a new EclipseLinkRefactoringTool.

public
EclipseLinkRefactoringTool(IManagedTypeProvider
The external form of a provider that gives access to the JPA metadata
managedTypeProvider
,
IJPQLQueryBuilder
The builder that creates the StateObject representation of the JPQL query
jpqlQueryBuilder
,
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
,
String
The unique identifier of the JPQLQueryBNF that determines how to parse the JPQL fragment
jpqlQueryBNFId
)

Creates a new EclipseLinkRefactoringTool.

Method Summary

Modifier and TypeMethod and Description
protected IJPQLQueryFormatter
buildFormatter()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.RefactoringTool.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()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.RefactoringTool.buildJPQLQueryContext.

Creates a new JPQLQueryContext that can retrieve information from the declaration portion of the JPQL query.
Inherited from org.eclipse.persistence.jpa.jpql.tools.RefactoringTool:
buildClassNameRenamerbuildEntityNameRenamerbuildEnumConstantRenamerbuildFieldNameRenamerbuildResultVariableNameRenamerbuildStateObjectbuildVariableNameRenamergetFormattergetGrammargetJPQLQueryBuildergetStateObjectrenameClassNamerenameEntityNamerenameEnumConstantrenameFieldrenameFieldrenameFieldrenameResultVariablerenameVariablesetFormattertoActualText

Constructor Detail

EclipseLinkRefactoringToolback to summary
public EclipseLinkRefactoringTool(IManagedTypeProvider managedTypeProvider, IJPQLQueryBuilder jpqlQueryBuilder, CharSequence jpqlQuery)

Creates a new EclipseLinkRefactoringTool.

Parameters
managedTypeProvider:IManagedTypeProvider

The external form of a provider that gives access to the JPA metadata

jpqlQueryBuilder:IJPQLQueryBuilder

The builder that creates the StateObject representation of the JPQL query

jpqlQuery:CharSequence

The JPQL query to manipulate

EclipseLinkRefactoringToolback to summary
public EclipseLinkRefactoringTool(IManagedTypeProvider managedTypeProvider, IJPQLQueryBuilder jpqlQueryBuilder, CharSequence jpqlFragment, String jpqlQueryBNFId)

Creates a new EclipseLinkRefactoringTool.

Parameters
managedTypeProvider:IManagedTypeProvider

The external form of a provider that gives access to the JPA metadata

jpqlQueryBuilder:IJPQLQueryBuilder

The builder that creates the StateObject representation of the JPQL query

jpqlFragment:CharSequence

The JPQL query to manipulate or a single JPQL fragment, which is parsed using the JPQL query BNF identifier by the given ID

jpqlQueryBNFId:String

The unique identifier of the JPQLQueryBNF that determines how to parse the JPQL fragment

Method Detail

buildFormatterback to summary
protected IJPQLQueryFormatter buildFormatter()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.RefactoringTool.buildFormatter.

Doc from org.eclipse.persistence.jpa.jpql.tools.RefactoringTool.buildFormatter.

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

Returns:IJPQLQueryFormatter

A new concrete instance of IJPQLQueryFormatter

Annotations
@Override
buildJPQLQueryContextback to summary
protected JPQLQueryContext buildJPQLQueryContext()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.RefactoringTool.buildJPQLQueryContext.

Doc from org.eclipse.persistence.jpa.jpql.tools.RefactoringTool.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.

Returns:JPQLQueryContext

A new concrete instance of JPQLQueryContext

Annotations
@Override