Class EclipseLinkJPQLQueryHelper
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.tools.AbstractJPQLQueryHelper
-
- org.eclipse.persistence.jpa.jpql.tools.EclipseLinkJPQLQueryHelper
-
public class EclipseLinkJPQLQueryHelper extends AbstractJPQLQueryHelper
This helper can perform the following operations over a JPQL query:- Calculates the result type of a query:
AbstractJPQLQueryHelper.getResultType(); - Calculates the type of an input parameter:
AbstractJPQLQueryHelper.getParameterType(String). - Calculates the possible choices to complete the query from a given
position (used for content assist):
AbstractJPQLQueryHelper.buildContentAssistProposals(int). - Validates the query by introspecting it grammatically and semantically:
- Refactoring support:
buildBasicRefactoringTool()provides support for generating the delta of the refactoring operation through a collection ofTextEditobjects.buildRefactoringTool()provides support for refactoring the JPQL query through the editableStateObjectand once all refactoring operations have been executed, theIJPQLQueryFormatterwill generate a new string representation of the JPQL query.
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.
- Since:
- 2.4
- Version:
- 2.5
- Author:
- Pascal Filion
- Calculates the result type of a query:
-
-
Constructor Summary
Constructors Constructor Description EclipseLinkJPQLQueryHelper(JPQLGrammar jpqlGrammar)Creates a newEclipseLinkJPQLQueryHelper.EclipseLinkJPQLQueryHelper(JPQLQueryContext queryContext)Creates a newEclipseLinkJPQLQueryHelper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BasicRefactoringToolbuildBasicRefactoringTool()Creates the concrete instance of the tool that can refactor the content of a JPQL query.RefactoringToolbuildRefactoringTool()Creates the concrete instance of the tool that can refactor the content of a JPQL query.-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.AbstractJPQLQueryHelper
buildContentAssistProposals, buildContentAssistProposals, dispose, getGrammar, getJPQLExpression, getParameterType, getParsedJPQLQuery, getProvider, getQuery, getQueryContext, getResultType, getType, getTypeHelper, getTypeRepository, setJPQLExpression, setQuery, validate, validate, validateGrammar, validateGrammar, validateSemantic, validateSemantic
-
-
-
-
Constructor Detail
-
EclipseLinkJPQLQueryHelper
public EclipseLinkJPQLQueryHelper(JPQLGrammar jpqlGrammar)
Creates a newEclipseLinkJPQLQueryHelper.- Parameters:
jpqlGrammar- TheJPQLGrammarthat will determine how to parse JPQL queries
-
EclipseLinkJPQLQueryHelper
public EclipseLinkJPQLQueryHelper(JPQLQueryContext queryContext)
Creates a newEclipseLinkJPQLQueryHelper.- Parameters:
queryContext- The context used to query information about the JPQL query
-
-
Method Detail
-
buildBasicRefactoringTool
public BasicRefactoringTool buildBasicRefactoringTool()
Creates the concrete instance of the tool that can refactor the content of a JPQL query. This version simply provides the delta of the refactoring operations.- Specified by:
buildBasicRefactoringToolin classAbstractJPQLQueryHelper- Returns:
- The concrete instance of
RefactoringTool - See Also:
AbstractJPQLQueryHelper.buildRefactoringTool()
-
buildRefactoringTool
public RefactoringTool buildRefactoringTool()
Creates the concrete instance of the tool that can refactor the content of a JPQL query. This version provides a way to manipulate the editable version of the JPQL query (StateObjectand simply outputs the result of the refactoring operations, i.e. the updated JPQL query).- Specified by:
buildRefactoringToolin classAbstractJPQLQueryHelper- Returns:
- The concrete instance of
RefactoringTool - See Also:
AbstractJPQLQueryHelper.buildBasicRefactoringTool()
-
-