EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql
Class EclipseLinkJPQLQueryHelper

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.AbstractJPQLQueryHelper
      extended by org.eclipse.persistence.jpa.jpql.EclipseLinkJPQLQueryHelper

public class EclipseLinkJPQLQueryHelper
extends AbstractJPQLQueryHelper

This helper can perform the following operations over a JPQL query:

This helper should be used when the JPQL query is written using the JPQL grammar defined in the Java Persistence functional specification 2.1 and it contains the additional support provided by EclipseLink.

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
Author:
Pascal Filion
Since:
2.4

Constructor Summary
EclipseLinkJPQLQueryHelper(JPQLGrammar jpqlGrammar)
          Creates a new EclipseLinkJPQLQueryHelper.
EclipseLinkJPQLQueryHelper(JPQLQueryContext queryContext)
          Creates a new EclipseLinkJPQLQueryHelper.
 
Method Summary
 BasicRefactoringTool buildBasicRefactoringTool()
          
protected  AbstractContentAssistVisitor buildContentAssistVisitor(JPQLQueryContext queryContext)
          Creates the concrete instance of the content assist visitor that will give the possible choices based on the position of the cursor within the JPQL query.
protected  EclipseLinkGrammarValidator buildGrammarValidator(JPQLQueryContext queryContext)
          Creates the concrete instance of the validator that will grammatically validate the JPQL query.
protected  JPQLQueryContext buildJPQLQueryContext(JPQLGrammar jpqlGrammar)
          Creates a context that will be used to store and retrieve information about the JPQL query.
protected  IJPQLQueryBuilder buildQueryBuilder()
          Creates the right IJPQLQueryBuilder based on the JPQL grammar.
 RefactoringTool buildRefactoringTool()
          Creates the concrete instance of the tool that can refactor the content of a JPQL query.
protected  EclipseLinkSemanticValidator buildSemanticValidator(JPQLQueryContext queryContext)
          Creates the concrete instance of the validator that will semantically validate the JPQL query.
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.AbstractJPQLQueryHelper
buildContentAssistProposals, buildNumericTypeComparator, dispose, getContentAssistVisitor, getGrammar, getGrammarValidator, getJPQLExpression, getParameterType, getParsedJPQLQuery, getProvider, getQuery, getQueryContext, getResultType, getSemanticValidator, getType, getTypeHelper, getTypeRepository, setJPQLExpression, setQuery, validate, validate, validateGrammar, validateGrammar, validateSemantic, validateSemantic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EclipseLinkJPQLQueryHelper

public EclipseLinkJPQLQueryHelper(JPQLGrammar jpqlGrammar)
Creates a new EclipseLinkJPQLQueryHelper.

Parameters:
jpqlGrammar - The JPQLGrammar that will determine how to parse JPQL queries

EclipseLinkJPQLQueryHelper

public EclipseLinkJPQLQueryHelper(JPQLQueryContext queryContext)
Creates a new EclipseLinkJPQLQueryHelper.

Parameters:
queryContext - The context used to query information about the JPQL query
Method Detail

buildBasicRefactoringTool

public BasicRefactoringTool buildBasicRefactoringTool()


buildContentAssistVisitor

protected AbstractContentAssistVisitor buildContentAssistVisitor(JPQLQueryContext queryContext)
Creates the concrete instance of the content assist visitor that will give the possible choices based on the position of the cursor within the JPQL query.

Specified by:
buildContentAssistVisitor in class AbstractJPQLQueryHelper
Parameters:
queryContext - The context used to query information about the JPQL query
Returns:
A new concrete instance of AbstractContentAssistVisitor

buildGrammarValidator

protected EclipseLinkGrammarValidator buildGrammarValidator(JPQLQueryContext queryContext)
Creates the concrete instance of the validator that will grammatically validate the JPQL query.

Specified by:
buildGrammarValidator in class AbstractJPQLQueryHelper
Parameters:
queryContext - The context used to query information about the JPQL query
Returns:
A new concrete instance of AbstractGrammarValidator

buildJPQLQueryContext

protected JPQLQueryContext buildJPQLQueryContext(JPQLGrammar jpqlGrammar)
Creates a context that will be used to store and retrieve information about the JPQL query.

Specified by:
buildJPQLQueryContext in class AbstractJPQLQueryHelper
Parameters:
jpqlGrammar - The JPQL grammar that is required for dictating how the JPQL query will be parsed. It is also used by validation and by the content assist
Returns:
A new JPQLQueryContext

buildQueryBuilder

protected IJPQLQueryBuilder buildQueryBuilder()
Creates the right IJPQLQueryBuilder based on the JPQL grammar.

Returns:
A new concrete instance of IJPQLQueryBuilder

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 (eclipse.persistence.jpa.jpql.model.query.StateObject StateObject and simply outputs the result of the refactoring operations, i.e. the updated JPQL query).

Specified by:
buildRefactoringTool in class AbstractJPQLQueryHelper
Returns:
The concrete instance of RefactoringTool
See Also:
#buildSimpleRefactoringTool

buildSemanticValidator

protected EclipseLinkSemanticValidator buildSemanticValidator(JPQLQueryContext queryContext)
Creates the concrete instance of the validator that will semantically validate the JPQL query.

Specified by:
buildSemanticValidator in class AbstractJPQLQueryHelper
Parameters:
queryContext - The context used to query information about the JPQL query
Returns:
A new concrete instance of AbstractSemanticValidator

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference