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

public abstract Class JPQLQueryBuilderWrapper

extends Object
implements IJPQLQueryBuilder
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder
Known Direct Subclasses
org.eclipse.persistence.jpa.jpql.tools.model.DefaultEclipseLinkJPQLQueryBuilder, org.eclipse.persistence.jpa.jpql.tools.model.DefaultJPQLQueryBuilder
Annotations
@SuppressWarnings:nls
Imports
org.eclipse.persistence.jpa.jpql.Assert, org.eclipse.persistence.jpa.jpql.parser.JPQLGrammar, org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractConditionalClauseStateObject, .JPQLQueryStateObject, .SelectClauseStateObject, .SimpleSelectClauseStateObject, .StateObject, .UpdateItemStateObject, org.eclipse.persistence.jpa.jpql.tools.spi.IManagedTypeProvider

This builder wraps another builder and simply delegates the calls to it.
Author
Pascal Filion
Since
2.4
Version
2.4

Field Summary

Modifier and TypeField and Description
private final IJPQLQueryBuilder
delegate

The delegate builder that receives the calls from this one.

Constructor Summary

AccessConstructor and Description
protected
JPQLQueryBuilderWrapper(IJPQLQueryBuilder
The delegate builder that receives the calls from this one
delegate
)

Creates a new JPQLQueryBuilderWrapper.

Method Summary

Modifier and TypeMethod and Description
public ICaseExpressionStateObjectBuilder
buildCaseExpressionStateObjectBuilder(StateObject
The StateObject that will be the parent of the newly created model
parent
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildCaseExpressionStateObjectBuilder.

Creates a builder that can create a CASE expression programmatically.
public JPQLQueryStateObject
buildStateObject(IManagedTypeProvider
The provider of managed types
provider
,
CharSequence
The JPQL query to parse into a StateObject model
jpqlQuery
,
boolean
Determines if the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queries
tolerant
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObject.

Creates a state model representation of a JPQL query that can be edited.
public JPQLQueryStateObject
buildStateObject(IManagedTypeProvider
The provider of managed types
provider
,
CharSequence
The JPQL query to parse into a StateObject model
jpqlQuery
,
String
The unique identifier of the query BNF that will be used to parse the fragment
queryBNFId
,
boolean
Determines if the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queries
tolerant
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObject.

Creates a state model representation of a JPQL query that can be edited.
public StateObject
buildStateObject(StateObject
The StateObject that will be the parent of the newly created model
parent
,
CharSequence
A portion of a JPQL query that will be parsed and the StateObject representation will be created
jpqlFragment
,
String
The unique identifier of the query BNF that will be used to parse the fragment
queryBNFId
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObject.

Creates a StateObject representation of the given JPQL fragment.
public IConditionalExpressionStateObjectBuilder
buildStateObjectBuilder(AbstractConditionalClauseStateObject
The clause for which a conditional expression can be created
stateObject
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObjectBuilder.

Creates a builder that can create a conditional expression programmatically.
public ISelectExpressionStateObjectBuilder
buildStateObjectBuilder(SelectClauseStateObject
The clause for which one or many select expressions can be created
stateObject
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObjectBuilder.

Creates a builder that can create a select expression programmatically.
public ISimpleSelectExpressionStateObjectBuilder
buildStateObjectBuilder(SimpleSelectClauseStateObject
The clause for which a select expression can be created
stateObject
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObjectBuilder.

Creates a builder that can create a single select expression programmatically.
public INewValueStateObjectBuilder
buildStateObjectBuilder(UpdateItemStateObject
The parent for which a new value expression can be created
stateObject
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObjectBuilder.

Creates a builder that can create a new value expression programmatically.
protected IJPQLQueryBuilder

Returns:

The wrapped builder
getDelegate
()

Returns the delegate builder that receives the calls from this one.

public JPQLGrammar
getGrammar()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.getGrammar.

Returns the JPQLGrammar that is associated with this builder.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final IJPQLQueryBuilder delegate

The delegate builder that receives the calls from this one.

Constructor Detail

JPQLQueryBuilderWrapperback to summary
protected JPQLQueryBuilderWrapper(IJPQLQueryBuilder delegate)

Creates a new JPQLQueryBuilderWrapper.

Parameters
delegate:IJPQLQueryBuilder

The delegate builder that receives the calls from this one

Exceptions
NullPointerException:
If the given delegate is null

Method Detail

buildCaseExpressionStateObjectBuilderback to summary
public ICaseExpressionStateObjectBuilder buildCaseExpressionStateObjectBuilder(StateObject parent)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildCaseExpressionStateObjectBuilder.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildCaseExpressionStateObjectBuilder.

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

Parameters
parent:StateObject

The StateObject that will be the parent of the newly created model

Returns:ICaseExpressionStateObjectBuilder

The builder of a CASE expression

Annotations
@Override
buildStateObjectback to summary
public JPQLQueryStateObject buildStateObject(IManagedTypeProvider provider, CharSequence jpqlQuery, boolean tolerant)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObject.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObject.

Creates a state model representation of a JPQL query that can be edited.

Parameters
provider:IManagedTypeProvider

The provider of managed types

jpqlQuery:CharSequence

The JPQL query to parse into a StateObject model

tolerant:boolean

Determines if the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queries

Returns:JPQLQueryStateObject

The root of the StateObject model that represents the edited form of the JPQL query

Annotations
@Override
buildStateObjectback to summary
public JPQLQueryStateObject buildStateObject(IManagedTypeProvider provider, CharSequence jpqlQuery, String queryBNFId, boolean tolerant)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObject.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObject.

Creates a state model representation of a JPQL query that can be edited.

Parameters
provider:IManagedTypeProvider

The provider of managed types

jpqlQuery:CharSequence

The JPQL query to parse into a StateObject model

queryBNFId:String

The unique identifier of the query BNF that will be used to parse the fragment

tolerant:boolean

Determines if the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queries

Returns:JPQLQueryStateObject

The root of the StateObject model that represents the edited form of the JPQL query

Annotations
@Override
buildStateObjectback to summary
public StateObject buildStateObject(StateObject parent, CharSequence jpqlFragment, String queryBNFId)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObject.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObject.

Creates a StateObject representation of the given JPQL fragment. In order to properly parse the fragment, the given unique identifier of the 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.

Parameters
parent:StateObject

The StateObject that will be the parent of the newly created model

jpqlFragment:CharSequence

A portion of a JPQL query that will be parsed and the StateObject representation will be created

queryBNFId:String

The unique identifier of the query BNF that will be used to parse the fragment

Returns:StateObject

The StateObject representation of the given JPQL fragment

Annotations
@Override
buildStateObjectBuilderback to summary
public IConditionalExpressionStateObjectBuilder buildStateObjectBuilder(AbstractConditionalClauseStateObject stateObject)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObjectBuilder.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObjectBuilder.

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.

Parameters
stateObject:AbstractConditionalClauseStateObject

The clause for which a conditional expression can be created

Returns:IConditionalExpressionStateObjectBuilder

The builder of a conditional expression

Annotations
@Override
buildStateObjectBuilderback to summary
public ISelectExpressionStateObjectBuilder buildStateObjectBuilder(SelectClauseStateObject stateObject)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObjectBuilder.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObjectBuilder.

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.

Parameters
stateObject:SelectClauseStateObject

The clause for which one or many select expressions can be created

Returns:ISelectExpressionStateObjectBuilder

The builder of a conditional expression

Annotations
@Override
buildStateObjectBuilderback to summary
public ISimpleSelectExpressionStateObjectBuilder buildStateObjectBuilder(SimpleSelectClauseStateObject stateObject)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObjectBuilder.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObjectBuilder.

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.

Parameters
stateObject:SimpleSelectClauseStateObject

The clause for which a select expression can be created

Returns:ISimpleSelectExpressionStateObjectBuilder

The builder of a conditional expression

Annotations
@Override
buildStateObjectBuilderback to summary
public INewValueStateObjectBuilder buildStateObjectBuilder(UpdateItemStateObject stateObject)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObjectBuilder.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.buildStateObjectBuilder.

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.

Parameters
stateObject:UpdateItemStateObject

The parent for which a new value expression can be created

Returns:INewValueStateObjectBuilder

The builder of a new value expression

Annotations
@Override
getDelegateback to summary
protected IJPQLQueryBuilder getDelegate()

Returns the delegate builder that receives the calls from this one.

Returns:IJPQLQueryBuilder

The wrapped builder

getGrammarback to summary
public JPQLGrammar getGrammar()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.getGrammar.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryBuilder.getGrammar.

Returns the JPQLGrammar that is associated with this builder.

Returns:JPQLGrammar

The JPQLGrammar that was used to parse the JPQL query or JPQL fragments

Annotations
@Override