EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql.model
Class JPQLQueryBuilderWrapper

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.model.JPQLQueryBuilderWrapper
All Implemented Interfaces:
IJPQLQueryBuilder
Direct Known Subclasses:
DefaultEclipseLinkJPQLQueryBuilder, DefaultJPQLQueryBuilder

public abstract class JPQLQueryBuilderWrapper
extends java.lang.Object
implements IJPQLQueryBuilder

This builder wraps another builder and simply delegates the calls to it.

Version:
2.4
Author:
Pascal Filion
Since:
2.4

Constructor Summary
protected JPQLQueryBuilderWrapper(IJPQLQueryBuilder delegate)
          Creates a new JPQLQueryBuilderWrapper.
 
Method Summary
 ICaseExpressionStateObjectBuilder buildCaseExpressionStateObjectBuilder(StateObject parent)
          Creates a builder that can create a CASE expression programmatically.
 JPQLQueryStateObject buildStateObject(IManagedTypeProvider provider, java.lang.CharSequence jpqlQuery, boolean tolerant)
          Creates a state model representation of a JPQL query that can be edited.
 JPQLQueryStateObject buildStateObject(IManagedTypeProvider provider, java.lang.CharSequence jpqlQuery, java.lang.String queryBNFId, boolean tolerant)
          Creates a state model representation of a JPQL query that can be edited.
 StateObject buildStateObject(StateObject parent, java.lang.CharSequence jpqlFragment, java.lang.String queryBNFId)
          Creates a StateObject representation of the given JPQL fragment.
 IConditionalExpressionStateObjectBuilder buildStateObjectBuilder(AbstractConditionalClauseStateObject stateObject)
          Creates a builder that can create a conditional expression programmatically.
 ISelectExpressionStateObjectBuilder buildStateObjectBuilder(SelectClauseStateObject stateObject)
          Creates a builder that can create a select expression programmatically.
 ISimpleSelectExpressionStateObjectBuilder buildStateObjectBuilder(SimpleSelectClauseStateObject stateObject)
          Creates a builder that can create a single select expression programmatically.
 INewValueStateObjectBuilder buildStateObjectBuilder(UpdateItemStateObject stateObject)
          Creates a builder that can create a new value expression programmatically.
protected  IJPQLQueryBuilder getDelegate()
          Returns the delegate builder that receives the calls from this one.
 JPQLGrammar getGrammar()
          Returns the JPQLGrammar that is associated with this builder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPQLQueryBuilderWrapper

protected JPQLQueryBuilderWrapper(IJPQLQueryBuilder delegate)
Creates a new JPQLQueryBuilderWrapper.

Parameters:
delegate - The delegate builder that receives the calls from this one
Throws:
java.lang.NullPointerException - If the given delegate is null
Method Detail

buildCaseExpressionStateObjectBuilder

public ICaseExpressionStateObjectBuilder buildCaseExpressionStateObjectBuilder(StateObject parent)
Creates a builder that can create a CASE expression programmatically. Once the expression is complete, ICaseExpressionStateObjectBuilder.buildStateObject() will return the result.

Specified by:
buildCaseExpressionStateObjectBuilder in interface IJPQLQueryBuilder
Parameters:
parent - The StateObject that will be the parent of the newly created model
Returns:
The builder of a CASE expression

buildStateObject

public JPQLQueryStateObject buildStateObject(IManagedTypeProvider provider,
                                             java.lang.CharSequence jpqlQuery,
                                             boolean tolerant)
Creates a state model representation of a JPQL query that can be edited.

Specified by:
buildStateObject in interface IJPQLQueryBuilder
Parameters:
provider - The provider of managed types
jpqlQuery - The JPQL query to parse into a StateObject model
tolerant - Determines if the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queries
Returns:
The root of the StateObject model that represents the edited form of the JPQL query

buildStateObject

public JPQLQueryStateObject buildStateObject(IManagedTypeProvider provider,
                                             java.lang.CharSequence jpqlQuery,
                                             java.lang.String queryBNFId,
                                             boolean tolerant)
Creates a state model representation of a JPQL query that can be edited.

Specified by:
buildStateObject in interface IJPQLQueryBuilder
Parameters:
provider - The provider of managed types
jpqlQuery - The JPQL query to parse into a StateObject model
queryBNFId - The unique identifier of the query BNF that will be used to parse the fragment
tolerant - Determines if the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queries
Returns:
The root of the StateObject model that represents the edited form of the JPQL query

buildStateObject

public StateObject buildStateObject(StateObject parent,
                                    java.lang.CharSequence jpqlFragment,
                                    java.lang.String queryBNFId)
Creates a StateObject representation of the given JPQL fragment. In order to properly parse the fragment, the given unique identifier of the parser.JPQLQueryBNF JPQLQueryBNF will determine how to parse it.

It is possible the given JPQL fragment has more than one expression, in this case, parsing should stop at the first comma (x, y) or space (x y) where x and y are two separate expressions.

Specified by:
buildStateObject in interface IJPQLQueryBuilder
Parameters:
parent - The StateObject that will be the parent of the newly created model
jpqlFragment - A portion of a JPQL query that will be parsed and the StateObject representation will be created
queryBNFId - The unique identifier of the query BNF that will be used to parse the fragment
Returns:
The StateObject representation of the given JPQL fragment

buildStateObjectBuilder

public IConditionalExpressionStateObjectBuilder buildStateObjectBuilder(AbstractConditionalClauseStateObject stateObject)
Creates a builder that can create a conditional expression programmatically. Once the expression is complete, IConditionalExpressionStateObjectBuilder.commit() will push the result onto the given state object.

Specified by:
buildStateObjectBuilder in interface IJPQLQueryBuilder
Parameters:
stateObject - The clause for which a conditional expression can be created
Returns:
The builder of a conditional expression

buildStateObjectBuilder

public ISelectExpressionStateObjectBuilder buildStateObjectBuilder(SelectClauseStateObject stateObject)
Creates a builder that can create a select expression programmatically. Once the expression is complete, ISelectExpressionStateObjectBuilder.commit() will push the result onto the given state object.

Specified by:
buildStateObjectBuilder in interface IJPQLQueryBuilder
Parameters:
stateObject - The clause for which one or many select expressions can be created
Returns:
The builder of a conditional expression

buildStateObjectBuilder

public ISimpleSelectExpressionStateObjectBuilder buildStateObjectBuilder(SimpleSelectClauseStateObject stateObject)
Creates a builder that can create a single select expression programmatically. Once the expression is complete, ISimpleSelectExpressionStateObjectBuilder.commit() will push the result onto the given state object.

Specified by:
buildStateObjectBuilder in interface IJPQLQueryBuilder
Parameters:
stateObject - The clause for which a select expression can be created
Returns:
The builder of a conditional expression

buildStateObjectBuilder

public INewValueStateObjectBuilder buildStateObjectBuilder(UpdateItemStateObject stateObject)
Creates a builder that can create a new value expression programmatically. Once the expression is complete, INewValueStateObjectBuilder.commit() will push the result onto the given state object.

Specified by:
buildStateObjectBuilder in interface IJPQLQueryBuilder
Parameters:
stateObject - The parent for which a new value expression can be created
Returns:
The builder of a new value expression

getDelegate

protected IJPQLQueryBuilder getDelegate()
Returns the delegate builder that receives the calls from this one.

Returns:
The wrapped builder

getGrammar

public JPQLGrammar getGrammar()
Returns the JPQLGrammar that is associated with this builder.

Specified by:
getGrammar in interface IJPQLQueryBuilder
Returns:
The JPQLGrammar that was used to parse the JPQL query or JPQL fragments

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference