|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) E28847-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
org.eclipse.persistence.jpa.internal.jpql.parser.ExpressionRegistry
final class ExpressionRegistry
This registry initializes the singleton instances of various API required for parsing a JPQL query. It supports version 1.0 and 2.0 of the JPQL language as well as the EclipseLink's extension over the language.
| Field Summary | |
|---|---|
private java.util.Map<java.lang.String,ExpressionFactory> |
expressionFactoriesThe map of ExpressionFactories that have been registered and required for parsing a JPQL query, they are mapped with their unique identifier. |
private java.util.Map<java.lang.String,IdentifierRole> |
identifiersThe set of the JPQL identifiers defined by the grammar. |
private java.util.Map<java.lang.String,IJPAVersion> |
identifiersVersionsThis table specify in which JPA version the identifiers was introduced. |
private java.util.Map<java.lang.String,JPQLQueryBNF> |
queryBNFsThe JPQLQueryBNF unique identifiers mapped to the only instance of the BNF rule. |
| Constructor Summary | |
|---|---|
ExpressionRegistry()Creates the only instance of ExpressionRegistry. |
|
| Method Summary | ||
|---|---|---|
(package private) ExpressionFactory |
expressionFactory(java.lang.String expressionFactoryId)Retrieves the registered ExpressionFactory that was registered for the given unique identifier. |
|
(package private) ExpressionFactory |
expressionFactoryForIdentifier(java.lang.String identifier)Retrieves the ExpressionFactory that is responsible for creating the Expression object that represents the given JPQL identifier. |
|
(package private) IdentifierRole |
identifierRole(java.lang.String identifier)Retrieves the role of the given identifier. |
|
(package private) java.util.Collection<java.lang.String> |
identifiers()Returns the JPQL identifiers defined for JPQL version 1.0 and 2.0. |
|
(package private) java.lang.Iterable<java.lang.String> |
identifiers(java.lang.String queryBNFId)Retrieves the identifiers that are supported by the given BNF. |
|
(package private) IJPAVersion |
identifierVersion(java.lang.String identifier)Retrieves the JPA version in which the identifier was first introduced. |
|
private void |
initialize()Instantiates the only instance of various API used by the parser. |
|
private void |
initializeBNFs()Creates a map where the key is a unique ID and the value is an JPQLQueryBNF representing a portion of the JPQL grammar. |
|
private void |
initializeExpressionFactories()Creates a map where the key is an identifier and the value is an ExpressionFactory responsible to create the actual Expression. |
|
private void |
initializeIdentifiers()Creates the list of JPQL identifiers, which cannot be used as identification variables. |
|
(package private) boolean |
isIdentifier(java.lang.String word)Determines if the given word is a JPQL identifier. |
|
(package private)
|
queryBNF(java.lang.String queryBNFID)Retrieves the BNF object that was registered for the given unique identifier. |
|
private void |
registerBNF(JPQLQueryBNF queryBNF)Registers the given ExpressionFactory by storing it for all its identifiers. |
|
private void |
registerFactory(ExpressionFactory expressionFactory)Registers the given ExpressionFactory by storing it for all its identifiers. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.Map<java.lang.String,ExpressionFactory> expressionFactories
ExpressionFactories that have been registered and required for parsing a JPQL query, they are mapped with their unique identifier.private java.util.Map<java.lang.String,IdentifierRole> identifiers
private java.util.Map<java.lang.String,IJPAVersion> identifiersVersions
private java.util.Map<java.lang.String,JPQLQueryBNF> queryBNFs
JPQLQueryBNF unique identifiers mapped to the only instance of the BNF rule.| Constructor Detail |
|---|
ExpressionRegistry()
ExpressionRegistry.| Method Detail |
|---|
ExpressionFactory expressionFactory(java.lang.String expressionFactoryId)
ExpressionFactory that was registered for the given unique identifier.expressionFactoryId - The unique identifier of the ExpressionFactory to retrieveExpressionFactory mapped with the given unique identifierExpressionFactory expressionFactoryForIdentifier(java.lang.String identifier)
ExpressionFactory that is responsible for creating the Expression object that represents the given JPQL identifier.identifier - The JPQL identifier for which its factory is searchedExpressionFactory that creates the Expression or null if none was foundIdentifierRole identifierRole(java.lang.String identifier)
identifier - The identifier for which its role is requestedjava.util.Collection<java.lang.String> identifiers()
java.lang.Iterable<java.lang.String> identifiers(java.lang.String queryBNFId)
queryBNFId - The unique identifier of the BNF for which the supported identifiers are requestedIJPAVersion identifierVersion(java.lang.String identifier)
private void initialize()
private void initializeBNFs()
JPQLQueryBNF representing a portion of the JPQL grammar.private void initializeExpressionFactories()
ExpressionFactory responsible to create the actual Expression.private void initializeIdentifiers()
boolean isIdentifier(java.lang.String word)
word - The word to test if it's a JPQL identifiertrue if the word is an identifier, false otherwise<T extends JPQLQueryBNF> T queryBNF(java.lang.String queryBNFID)
queryBNFID - The unique identifier of the JPQLQueryBNF to retrieveJPQLQueryBNF representing a section of the grammarprivate void registerBNF(JPQLQueryBNF queryBNF)
ExpressionFactory by storing it for all its identifiers.expressionFactory - The ExpressionFactory to storeprivate void registerFactory(ExpressionFactory expressionFactory)
ExpressionFactory by storing it for all its identifiers.expressionFactory - The ExpressionFactory to store
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||