Class VirtualJPQLQueryBNF
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.parser.JPQLQueryBNF
-
- org.eclipse.persistence.jpa.jpql.parser.VirtualJPQLQueryBNF
-
public final class VirtualJPQLQueryBNF extends JPQLQueryBNF
ThisJPQLQueryBNF
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
JPQLQueryBNF.getId()
.Once this BNF is no longer needed,
dispose()
needs to be called.- Version:
- 2.4
- Author:
- Pascal Filion
- Since:
- 2.4
-
-
Constructor Summary
Constructors Constructor Description VirtualJPQLQueryBNF(JPQLGrammar jpqlGrammar)
Creates a newVirtualJPQLQueryBNF
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Disposes this "virtual" query BNF.void
registerFactory(java.lang.String expressionFactoryId)
Registers a unique identifier that will be used to create theExpression
representing this BNF rule.void
registerQueryBNF(java.lang.String queryBNFId)
Registers the unique identifier of the BNF rule as a child of this BNF rule.-
Methods inherited from class org.eclipse.persistence.jpa.jpql.parser.JPQLQueryBNF
children, getExpressionFactory, getExpressionFactoryIds, getExpressionRegistry, getFallbackBNFId, getFallbackExpressionFactoryId, getId, getIdentifiers, handleAggregate, handleCollection, handlesNestedArray, handleSubExpression, hasChild, hasIdentifier, initialize, isCompound, nonCompoundChildren, registerChild, registerExpressionFactory, setCompound, setFallbackBNFId, setFallbackExpressionFactoryId, setHandleAggregate, setHandleCollection, setHandleNestedArray, setHandleSubExpression, toString, toString
-
-
-
-
Constructor Detail
-
VirtualJPQLQueryBNF
public VirtualJPQLQueryBNF(JPQLGrammar jpqlGrammar)
Creates a newVirtualJPQLQueryBNF
.- Parameters:
jpqlGrammar
- TheJPQLGrammar
to integrate this virtual query BNF- Throws:
java.lang.NullPointerException
- If the givenJPQLGrammar
isnull
-
-
Method Detail
-
dispose
public void dispose()
Disposes this "virtual" query BNF.
-
registerFactory
public void registerFactory(java.lang.String expressionFactoryId)
Registers a unique identifier that will be used to create theExpression
representing this BNF rule.- Parameters:
expressionFactoryId
- The unique identifier that is responsible to create theExpression
for this BNF rule
-
registerQueryBNF
public void registerQueryBNF(java.lang.String queryBNFId)
Registers the unique identifier of the BNF rule as a child of this BNF rule.- Parameters:
queryBNFId
- The unique identifier of the BNF rule- Throws:
java.lang.NullPointerException
- ThequeryBNFId
cannot benull
-
-