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

pack-priv final Class EclipseLinkSemanticValidatorHelper

extends Object
implements SemanticValidatorHelper
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper
Imports
java.lang.reflect.Constructor, .Type, java.util.ArrayList, .List, .Map, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.jpa.jpql.ExpressionTools, .ITypeHelper, .JPQLQueryDeclaration, .SemanticValidatorHelper, org.eclipse.persistence.jpa.jpql.parser.Expression, .IdentificationVariable, .JPQLGrammar, .SimpleSelectStatement, org.eclipse.persistence.mappings.DatabaseMapping, org.eclipse.persistence.mappings.querykeys.QueryKey

The EclipseLink implementation of SemanticValidatorHelper, which directly accesses EclipseLink objects without using Hermes SPI.
Author
Pascal Filion
Since
2.4
Version
2.5

Field Summary

Modifier and TypeField and Description
private final JPQLQueryContext
queryContext

The context used to query information about the JPQL query.

Constructor Summary

AccessConstructor and Description
pack-priv
EclipseLinkSemanticValidatorHelper(JPQLQueryContext
The context used to query information about the JPQL query
queryContext
)

Creates a new EclipseLinkSemanticValidatorHelper.

Method Summary

Modifier and TypeMethod and Description
private void
addIdentificationVariable(IdentificationVariable identificationVariable, Map<String, List<IdentificationVariable>> identificationVariables)

public void
collectAllDeclarationIdentificationVariables(Map<String, List<IdentificationVariable>>
The Map used to store the variables
identificationVariables
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.collectAllDeclarationIdentificationVariables.

Collects the identification variables that are defined in the FROM clause of the current query and from the parent queries.
private void
public void
collectLocalDeclarationIdentificationVariables(Map<String, List<IdentificationVariable>>
The Map used to store the variables
identificationVariables
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.collectLocalDeclarationIdentificationVariables.

Collects the identification variables that are defined in the FROM clause of the current query.
public void
disposeSubqueryContext()

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.disposeSubqueryContext.

Disposes this context, which is the current context being used by a subquery.
public String[]
entityNames()

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.entityNames.

Returns the name of the all entities that are present in the context of a persistence unit.
public List<JPQLQueryDeclaration>
getAllDeclarations()

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getAllDeclarations.

Returns the ordered list of JPQLQueryDeclaration, which contain the information contained in the query's FROM clause.
public Object[]
getConstructors(Object type)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getConstructors.

Returns the constructors for the given type.
public List<? extends JPQLQueryDeclaration>
getDeclarations()

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getDeclarations.

Returns the ordered list of JPQLQueryDeclaration, which contain the information contained in the query's FROM clause.
public ClassDescriptor
getEmbeddable(Object
The Java type of the embeddable to retrieve
type
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getEmbeddable.

Retrieves the embeddable with the given type.
public ClassDescriptor
getEntityNamed(String
The abstract schema name of the entity to retrieve
entityName
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getEntityNamed.

Retrieves the entity with the given entity name.
public String[]
getEnumConstants(Object
The Enum type
type
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getEnumConstants.

Returns the constant names for the given Enum type.
public JPQLGrammar
getGrammar()

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getGrammar.

Returns the JPQLGrammar that defines how the JPQL query was parsed.
public Object
getManagedType(Expression expression)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getManagedType.

Returns the managed type by resolving the given Expression.
public Object
getMappingNamed(Object
The managed type that has a mapping with the given name
entity
,
String
The name of the mapping to retrieve
name
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getMappingNamed.

Returns the mapping with the given name.
public Class<?>
getMappingType(Object
The mapping object
mapping
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getMappingType.

Returns the type of the given mapping object.
public Type[]
getMethodParameterTypeDeclarations(Object
The constructor to return its parameter types
constructor
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getMethodParameterTypeDeclarations.

Returns the list of type declarations representing the given constructor's parameter types.
public Object
getReferenceManagedType(Object
The relationship mapping
mapping
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getReferenceManagedType.

Returns the reference managed type from the given relationship mapping.
public Class<?>
getType(Expression
The Expression to resolve
expression
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getType.

Returns the type by resolving the given Expression.
public Object
getType(Object typeDeclaration)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getType.

Returns the type defined for the Java member.
public Class<?>
getType(String
The fully qualified name of the class to retrieve
className
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getType.

Retrieves the class with the given fully qualified name.
public Object
getTypeDeclaration(Expression
The Expression to resolve
expression
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getTypeDeclaration.

Returns the type declaration for the given Expression's type.
public ITypeHelper
getTypeHelper()

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getTypeHelper.

Returns the helper that gives access to the most common class metadata.
public String
getTypeName(Object
The type to retrieve its name
type
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.getTypeName.

Returns the fully qualified class name of the given type.
public boolean
isAssignableTo(Object
The 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
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.isAssignableTo.

Determines whether type 1 is an instance of type 2.
public boolean
isCollectionIdentificationVariable(String
The identification variable to check for what it maps
variableName
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.isCollectionIdentificationVariable.

Determines whether the given identification variable is defining a join or a collection member declaration expressions.
public boolean
isCollectionMapping(Object
The mapping object to verify if it represents a collection mapping
mapping
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.isCollectionMapping.

Determines whether the given mapping is a collection type mapping.
public boolean
isEmbeddableMapping(Object
The mapping object to verify if it represents an embeddable mapping
mapping
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.isEmbeddableMapping.

Determines whether the given mapping is an embeddable type mapping.
public boolean
isEnumType(Object type)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.isEnumType.

Determines whether the given type represents an Enum.
public boolean
isIdentificationVariableValidInComparison(IdentificationVariable
The IdentificationVariable that is mapped to either an entity, a singled-object value field, a collection-valued object field
expression
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.isIdentificationVariableValidInComparison.

Determines whether an identification variable can be used in a comparison expression when the operator is either '<', '<=', '>', '>='.
public boolean
isManagedTypeResolvable(Object managedType)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.isManagedTypeResolvable.

Determines whether the given managed type actually exists.
public boolean
isPropertyMapping(Object
The mapping object to verify if it represents a property mapping
mapping
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.isPropertyMapping.

Determines whether the given mapping is a property type mapping.
public boolean
isRelationshipMapping(Object
The mapping object to verify if it represents a relationship mapping
mapping
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.isRelationshipMapping.

Determines whether the given mapping is a relationship type mapping.
public boolean
isResultVariable(String
The variable to check if it's a result variable
variableName
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.isResultVariable.

Determines if the given variable is a result variable.
public boolean
isTransient(Object
The mapping object to verify if it represents a transient attribute
mapping
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.isTransient.

Determines whether the given mapping is a transient attribute.
public boolean
isTypeDeclarationAssignableTo(Object
The 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
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.isTypeDeclarationAssignableTo.

Determines whether type declaration 1 is an instance of type declaration 2.
public boolean
isTypeResolvable(Object type)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.isTypeResolvable.

Determines whether the given type actually exists.
public void
newSubqueryContext(SimpleSelectStatement
The parsed tree representation of the subquery that will become the current query
expression
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.newSubqueryContext.

Changes the state of this helper to use the given subquery.
public Object
resolveMapping(Expression
The Expression representing a state field path expression or a collection-valued path expression
expression
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.resolveMapping.

Returns the mapping for the field represented by the given Expression.
public Object
resolveMapping(String
The identification variable that is defined in the FROM clause of the query (which can be in the current subquery) or in one of the parent queries.
variableName
,
String
The name of the persistent field to retrieve
name
)

Implements org.eclipse.persistence.jpa.jpql.SemanticValidatorHelper.resolveMapping.

Returns the mapping that should be a persistence field from the entity defined by the given identification variable.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait