AbstractSemanticValidator in order to retrieve JPA information.
This helper allows third party adopter to write an instance of this helper that directly access
the JPA information without having to implement Hermes SPI, which can improve performance.
GenericSemanticValidatorHelper is a default implementation that uses Hermes SPI.
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 |
|---|---|
| public void | collectAllDeclarationIdentificationVariables(Map<String, List<IdentificationVariable>>
The identificationVariables)Map used to store the variablesCollects the identification variables that are defined in the |
| public void | collectLocalDeclarationIdentificationVariables(Map<String, List<IdentificationVariable>>
The identificationVariables)Map used to store the variablesCollects the identification variables that are defined in the |
| public void | disposeSubqueryContext()
Disposes this context, which is the current context being used by a subquery. |
| public String[] | Returns: The list of entity namesReturns the name of the all entities that are present in the context of a persistence unit. |
| public List | Returns: The list ofJPQLQueryDeclaration of the current query that was parsed and from
the parent queriesReturns the ordered list of |
| public Object[] | Returns: The declared constructorsReturns the constructors for the given type. |
| public List | Returns: The list ofJPQLQueryDeclaration of the current query that was parsedReturns the ordered list of |
| public Object | Returns: The embeddable for the given type if it's representing an embeddable;null
otherwiseThe Java type of the embeddable to retrieve type)Retrieves the embeddable with the given type. |
| public Object | Returns: The entity with the given name;null otherwiseThe abstract schema name of the entity to retrieve entityName)Retrieves the entity with the given entity name. |
| public String[] | Returns: The list of constant namesThe type)Enum typeReturns the constant names for the given |
| public JPQLGrammar | Returns: TheJPQLGrammar that was used to parse the JPQL queryReturns the |
| public Object | |
| public Object | Returns: Either the mapping ornull if it could not be foundThe managed type that has a mapping with the given name managedType, String The name of the mapping to retrieve name)Returns the mapping with the given name. |
| public Object | Returns: The type of the given mappingThe mapping object mapping)Returns the type of the given mapping object. |
| public Object[] | Returns: The list of parameter types or an empty listThe constructor to return its parameter types constructor)Returns the list of type declarations representing the given constructor's parameter types. |
| public Object | Returns: The managed type referenced by the given relationship mappingThe relationship mapping relationshipMapping)Returns the reference managed type from the given relationship mapping. |
| public Object | getType(Expression
The expression)Expression to resolveReturns the type by resolving the given |
| public Object | |
| public Object | |
| public Object | Returns: Either the type declaration that was resolved for the givenExpressionThe expression)Expression to resolveReturns the type declaration for the given |
| public ITypeHelper | Returns: A helper containing a collection of methods related to class metadataReturns the helper that gives access to the most common class metadata. |
| public String | Returns: The name of the class represented by this oneThe type to retrieve its name type)Returns the fully qualified class name of the given type. |
| public boolean | Returns: true if type 1 is an instance of the type 2; false otherwiseThe type to check if it is an instance of type 2 type1, Object The type used to determine if the class represented by type 1 is an instance
of with one type2)Determines whether type 1 is an instance of type 2. |
| public boolean | Returns: true if the given identification variable maps a collection-valued field
defined in a JOIN or IN expression; false if it's not
defined or it's mapping an abstract schema nameThe identification variable to check for what it maps variableName)Determines whether the given identification variable is defining a join or a collection member declaration expressions. |
| public boolean | Returns: true if the given mapping is a collection mapping; false
otherwiseThe mapping object to verify if it represents a collection mapping mapping)Determines whether the given mapping is a collection type mapping. |
| public boolean | Returns: true if the given mapping is an embeddable mapping; false
otherwiseThe mapping object to verify if it represents an embeddable mapping mapping)Determines whether the given mapping is an embeddable type mapping. |
| public boolean | |
| public boolean | Returns: true if it can be used in a ordering comparison expression; false
if it can'tThe expression)IdentificationVariable that is mapped to either an entity, a
singled-object value field, a collection-valued object fieldDetermines whether an identification variable can be used in a comparison expression when the operator is either '<', '<=', '>', '>='. |
| public boolean | Returns: true if the given managed type can be located; false if it
could not be foundDetermines whether the given managed type actually exists. |
| public boolean | Returns: true if the given mapping is a property mapping; false otherwiseThe mapping object to verify if it represents a property mapping mapping)Determines whether the given mapping is a property type mapping. |
| public boolean | Returns: true if the given mapping is a relationship mapping; false otherwiseThe mapping object to verify if it represents a relationship mapping mapping)Determines whether the given mapping is a relationship type mapping. |
| public boolean | Returns: true if the given variable is defined as a result variable;
false otherwiseThe variable to check if it's a result variable variableName)Determines if the given variable is a result variable. |
| public boolean | Returns: true if the given attribute is a transient mapping; false otherwiseThe mapping object to verify if it represents a transient attribute mapping)Determines whether the given mapping is a transient attribute. |
| public boolean | Returns: true if type declaration 1 is an instance of the type declaration 2;
false otherwiseThe type declaration to check if it is an instance of type declaration 2 typeDeclaration1, Object The type used to determine if the class represented by type
declaration 1 is an instance of with one typeDeclaration2)Determines whether type declaration 1 is an instance of type declaration 2. |
| public boolean | Returns: true if the actual class exists; false otherwiseDetermines whether the given type actually exists. |
| public void | newSubqueryContext(SimpleSelectStatement
The parsed tree representation of the subquery that will become the current query expression)Changes the state of this helper to use the given subquery. |
| public Object | Returns: Either the mapping ornull if none existsThe expression)Expression representing a state field path expression or a
collection-valued path expressionReturns the mapping for the field represented by the given |
| public Object | Returns: The persistence field with the given name ornull if it could not be foundThe identification variable that is defined in the identificationVariable, String FROM
clause of the query (which can be in the current subquery) or in one of the parent queries.The name of the persistent field to retrieve name)Returns the mapping that should be a persistence field from the entity defined by the given identification variable. |
| collectAllDeclarationIdentificationVariables | back to summary |
|---|---|
| public void collectAllDeclarationIdentificationVariables(Map<String, List<IdentificationVariable>> identificationVariables) Collects the identification variables that are defined in the
| |
| collectLocalDeclarationIdentificationVariables | back to summary |
|---|---|
| public void collectLocalDeclarationIdentificationVariables(Map<String, List<IdentificationVariable>> identificationVariables) Collects the identification variables that are defined in the
| |
| disposeSubqueryContext | back to summary |
|---|---|
| public void disposeSubqueryContext() Disposes this context, which is the current context being used by a subquery. Once it is disposed, any information retrieved will be for the subquery's parent query. | |
| entityNames | back to summary |
|---|---|
| public String[] entityNames() Returns the name of the all entities that are present in the context of a persistence unit.
| |
| getAllDeclarations | back to summary |
|---|---|
| public List Returns the ordered list of
| |
| getConstructors | back to summary |
|---|---|
| public Object[] getConstructors(Object type) Returns the constructors for the given type. All public, protected, default (package) access, and private constructors should be included.
If it was going through Hermes SPI, the type of the argument would be
| |
| getDeclarations | back to summary |
|---|---|
| public List Returns the ordered list of
| |
| getEmbeddable | back to summary |
|---|---|
| public Object getEmbeddable(Object type) Retrieves the embeddable with the given type. | |
| getEntityNamed | back to summary |
|---|---|
| public Object getEntityNamed(String entityName) Retrieves the entity with the given entity name. | |
| getEnumConstants | back to summary |
|---|---|
| public String[] getEnumConstants(Object type) Returns the constant names for the given
If it was going through Hermes SPI, the type of the argument would be
| |
| getGrammar | back to summary |
|---|---|
| public JPQLGrammar getGrammar() Returns the
| |
| getManagedType | back to summary |
|---|---|
| public Object getManagedType(Expression expression) Returns the managed type by resolving the given
If it was going through Hermes SPI, the return type would be
| |
| getMappingNamed | back to summary |
|---|---|
| public Object getMappingNamed(Object managedType, String name) Returns the mapping with the given name.
If it was going through Hermes SPI, the type of the argument would be
| |
| getMappingType | back to summary |
|---|---|
| public Object getMappingType(Object mapping) Returns the type of the given mapping object.
If it was going through Hermes SPI, the type of the argument would be | |
| getMethodParameterTypeDeclarations | back to summary |
|---|---|
| public Object[] getMethodParameterTypeDeclarations(Object constructor) Returns the list of type declarations representing the given constructor's parameter types. If this is the default constructor, then an empty array should be returned.
If it was going through Hermes SPI, the type of the argument would be | |
| getReferenceManagedType | back to summary |
|---|---|
| public Object getReferenceManagedType(Object relationshipMapping) Returns the reference managed type from the given relationship mapping.
If it was going through Hermes SPI, the type of the argument would be | |
| getType | back to summary |
|---|---|
| public Object getType(Expression expression) Returns the type by resolving the given
If it was going through Hermes SPI, the return type would be
| |
| getType | back to summary |
|---|---|
| public Object getType(Object typeDeclaration) Returns the type defined for the Java member.
If it was going through Hermes SPI, the type of the argument would be
| |
| getType | back to summary |
|---|---|
| public Object getType(String typeName) Retrieves the class with the given fully qualified name.
If it was going through Hermes SPI, an | |
| getTypeDeclaration | back to summary |
|---|---|
| public Object getTypeDeclaration(Expression expression) Returns the type declaration for the given
If it was going through Hermes SPI, the type of the argument would be
| |
| getTypeHelper | back to summary |
|---|---|
| public ITypeHelper getTypeHelper() Returns the helper that gives access to the most common class metadata.
| |
| getTypeName | back to summary |
|---|---|
| public String getTypeName(Object type) Returns the fully qualified class name of the given type.
If it was going through Hermes SPI, the type of the argument would be
| |
| isAssignableTo | back to summary |
|---|---|
| public boolean isAssignableTo(Object type1, Object type2) Determines whether type 1 is an instance of type 2.
If it was going through Hermes SPI, the type of the arguments would be
| |
| isCollectionIdentificationVariable | back to summary |
|---|---|
| public boolean isCollectionIdentificationVariable(String variableName) Determines whether the given identification variable is defining a join or a collection member declaration expressions.
| |
| isCollectionMapping | back to summary |
|---|---|
| public boolean isCollectionMapping(Object mapping) Determines whether the given mapping is a collection type mapping.
If it was going through Hermes SPI, the type of the arguments would be
| |
| isEmbeddableMapping | back to summary |
|---|---|
| public boolean isEmbeddableMapping(Object mapping) Determines whether the given mapping is an embeddable type mapping.
If it was going through Hermes SPI, the type of the arguments would be
| |
| isEnumType | back to summary |
|---|---|
| public boolean isEnumType(Object type) Determines whether the given type represents an
If it was going through Hermes SPI, the type of the argument would be
| |
| isIdentificationVariableValidInComparison | back to summary |
|---|---|
| public boolean isIdentificationVariableValidInComparison(IdentificationVariable expression) Determines whether an identification variable can be used in a comparison expression when the operator is either '<', '<=', '>', '>='.
| |
| isManagedTypeResolvable | back to summary |
|---|---|
| public boolean isManagedTypeResolvable(Object managedType) Determines whether the given managed type actually exists.
If it was going through Hermes SPI, the type of the argument would be
| |
| isPropertyMapping | back to summary |
|---|---|
| public boolean isPropertyMapping(Object mapping) Determines whether the given mapping is a property type mapping.
If it was going through Hermes SPI, the type of the arguments would be
| |
| isRelationshipMapping | back to summary |
|---|---|
| public boolean isRelationshipMapping(Object mapping) Determines whether the given mapping is a relationship type mapping.
If it was going through Hermes SPI, the type of the arguments would be
| |
| isResultVariable | back to summary |
|---|---|
| public boolean isResultVariable(String variableName) Determines if the given variable is a result variable.
| |
| isTransient | back to summary |
|---|---|
| public boolean isTransient(Object mapping) Determines whether the given mapping is a transient attribute.
If it was going through Hermes SPI, the type of the arguments would be
| |
| isTypeDeclarationAssignableTo | back to summary |
|---|---|
| public boolean isTypeDeclarationAssignableTo(Object typeDeclaration1, Object typeDeclaration2) Determines whether type declaration 1 is an instance of type declaration 2.
If it was going through Hermes SPI, the type of the arguments would be
| |
| isTypeResolvable | back to summary |
|---|---|
| public boolean isTypeResolvable(Object type) Determines whether the given type actually exists.
If it was going through Hermes SPI, the type of the argument would be
| |
| newSubqueryContext | back to summary |
|---|---|
| public void newSubqueryContext(SimpleSelectStatement expression) Changes the state of this helper to use the given subquery.
| |
| resolveMapping | back to summary |
|---|---|
| public Object resolveMapping(Expression expression) Returns the mapping for the field represented by the given
If it was going through Hermes SPI, the return type would be
| |
| resolveMapping | back to summary |
|---|---|
| public Object resolveMapping(String identificationVariable, String name) Returns the mapping that should be a persistence field from the entity defined by the given identification variable.
If it was going through Hermes SPI, the return type would be
| |