public abstract class AbstractJPQLGrammar extends java.lang.Object implements JPQLGrammar
JPQLGrammar
. The grammar defines how a JPQL query is parsed,
which is based on the BNF defined for that grammar.
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.Modifier and Type | Method and Description |
---|---|
void |
addChildBNF(java.lang.String queryBNFId,
java.lang.String childQueryBNFId)
Adds to the given query BNF a child BNF.
|
void |
addChildFactory(java.lang.String queryBNFId,
java.lang.String childExpressionFactoryId)
Adds to the given unique identifier of an
ExpressionFactory to the given query BNF. |
void |
addIdentifier(java.lang.String expressionFactoryId,
java.lang.String identifier)
Adds the given JPQL identifier to this factory.
|
void |
addIdentifiers(java.lang.String expressionFactoryId,
java.lang.String... identifiers)
Adds the given JPQL identifiers to this factory.
|
JPQLGrammar |
getBaseGrammar()
Creates the base
JPQLGrammar this one extends. |
ExpressionRegistry |
getExpressionRegistry()
Returns the registry containing the
JPQLQueryBNFs and the ExpressionFactories that are used
to properly parse a JPQL query. |
void |
setFallbackBNFId(java.lang.String queryBNFId,
java.lang.String fallbackBNFId)
When parsing the query and no
JPQLQueryBNFs can help to parse the query,
then it will fall back on the given one. |
void |
setFallbackExpressionFactoryId(java.lang.String queryBNFId,
java.lang.String fallbackExpressionFactoryId)
Sets the unique identifier of the
ExpressionFactory to use when the fall back BNF
ID is not null . |
void |
setHandleSubExpression(java.lang.String queryBNFId,
boolean handleSubExpression) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getJPAVersion, getProviderVersion
public void addChildBNF(java.lang.String queryBNFId, java.lang.String childQueryBNFId)
queryBNFId
- The unique identifier of the parent BNF to add a child BNFchildQueryBNFId
- The unique identifier of the child to add to the parent BNFpublic void addChildFactory(java.lang.String queryBNFId, java.lang.String childExpressionFactoryId)
ExpressionFactory
to the given query BNF.queryBNFId
- The unique identifier of the parent BNFchildExpressionFactoryId
- The unique identifier of the ExpressionFactory
to add
to the given query BNFpublic void addIdentifier(java.lang.String expressionFactoryId, java.lang.String identifier)
expressionFactoryId
- The unique identifier of the ExpressionFactory
to add more
JPQL identifiersidentifier
- The JPQL identifier this factory will parsepublic void addIdentifiers(java.lang.String expressionFactoryId, java.lang.String... identifiers)
expressionFactoryId
- The unique identifier of the ExpressionFactory
to add more
JPQL identifiersidentifiers
- The JPQL identifiers this factory will parsepublic JPQLGrammar getBaseGrammar()
JPQLGrammar
this one extends.JPQLGrammar
or null
if this is the base grammarpublic ExpressionRegistry getExpressionRegistry()
JPQLQueryBNFs
and the ExpressionFactories
that are used
to properly parse a JPQL query.getExpressionRegistry
in interface JPQLGrammar
public void setFallbackBNFId(java.lang.String queryBNFId, java.lang.String fallbackBNFId)
JPQLQueryBNFs
can help to parse the query,
then it will fall back on the given one.queryBNFId
- The unique identifier of the BNF to modify its fallback BNF unique identifierfallbackBNFId
- The unique identifier of the JPQLQueryBNF
to use in the last resortpublic void setHandleSubExpression(java.lang.String queryBNFId, boolean handleSubExpression)
public void setFallbackExpressionFactoryId(java.lang.String queryBNFId, java.lang.String fallbackExpressionFactoryId)
ExpressionFactory
to use when the fall back BNF
ID is not null
. This will be used to parse a portion of the query when the
registered expression factories
cannot parse it.
Note: This method is only called if JPQLQueryBNF.
getFallbackBNFId()
does not return null
.
queryBNFId
- The unique identifier of the BNF to modify its fallback expression factory
unique identifierEclipseLink 2.4.2, "build v20130514-5956486" API Reference