Top Description Fields Constructors Methods
org.eclipse.persistence.jpa.jpql.parser

public final Class VirtualJPQLQueryBNF

extends JPQLQueryBNF
Class Inheritance
Imports
java.util.Random

This JPQLQueryBNF can be used as a virtual BNF, which can wrap another BNF or BNFs and modify the default behavior.

The unique identifier for this BNF is automatically generated and can be retrieved with VirtualJPQLQueryBNF#getId().

Once this BNF is no longer needed, dispose() needs to be called.

Author
Pascal Filion
Since
2.4
Version
2.4

Field Summary

Modifier and TypeField and Description
private static final Random
r

Constructor Summary

AccessConstructor and Description
public
VirtualJPQLQueryBNF(JPQLGrammar
The JPQLGrammar to integrate this virtual query BNF
jpqlGrammar
)

Creates a new VirtualJPQLQueryBNF.

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Disposes this "virtual" query BNF.

private void
initialize(JPQLGrammar jpqlGrammar)

public void
registerFactory(String
The unique identifier that is responsible to create the Expression for this BNF rule
expressionFactoryId
)

Registers a unique identifier that will be used to create the Expression representing this BNF rule.

public void
registerQueryBNF(String
The unique identifier of the BNF rule
queryBNFId
)

Registers the unique identifier of the BNF rule as a child of this BNF rule.

Inherited from org.eclipse.persistence.jpa.jpql.parser.JPQLQueryBNF:
childrengetExpressionFactorygetExpressionFactoryIdsgetExpressionRegistrygetFallbackBNFIdgetFallbackExpressionFactoryIdgetIdgetIdentifiershandleAggregatehandleCollectionhandlesNestedArrayhandleSubExpressionhasChildhasIdentifierinitializeisCompoundnonCompoundChildrenregisterChildregisterExpressionFactorysetCompoundsetExpressionRegistrysetFallbackBNFIdsetFallbackExpressionFactoryIdsetHandleAggregatesetHandleCollectionsetHandleNestedArraysetHandleSubExpressiontoStringtoString

Field Detail

rback to summary
private static final Random r

Constructor Detail

VirtualJPQLQueryBNFback to summary
public VirtualJPQLQueryBNF(JPQLGrammar jpqlGrammar)

Creates a new VirtualJPQLQueryBNF.

Parameters
jpqlGrammar:JPQLGrammar

The JPQLGrammar to integrate this virtual query BNF

Exceptions
NullPointerException:
If the given JPQLGrammar is null

Method Detail

disposeback to summary
public void dispose()

Disposes this "virtual" query BNF.

initializeback to summary
private void initialize(JPQLGrammar jpqlGrammar)
registerFactoryback to summary
public void registerFactory(String expressionFactoryId)

Registers a unique identifier that will be used to create the Expression representing this BNF rule.

Parameters
expressionFactoryId:String

The unique identifier that is responsible to create the Expression for this BNF rule

registerQueryBNFback to summary
public void registerQueryBNF(String queryBNFId)

Registers the unique identifier of the BNF rule as a child of this BNF rule.

Parameters
queryBNFId:String

The unique identifier of the BNF rule

Exceptions
NullPointerException:
The queryBNFId cannot be null