Class AbstractPathResolver
java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver
org.eclipse.persistence.jpa.jpql.tools.resolver.AbstractPathResolver
- Direct Known Subclasses:
CollectionValuedFieldResolver,StateFieldResolver
This
Resolver is responsible to resolve a single path of a path expression (state field
path expression, singled valued object field, or a collection-valued path expression).- Since:
- 2.3
- Version:
- 2.5
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPathResolver(Resolver parent, String path) Creates a newAbstractPathResolver. -
Method Summary
Modifier and TypeMethodDescriptionprotected ITypeDeclarationResolves theITypeDeclarationof the property handled by thisResolver.Returns theIManagedTypeassociated with the field handled by thisResolver.final IMappingReturns theIMappingfor the wrapped field.final StringgetPath()Returns the single path represented by thisResolver.protected abstract IManagedTyperesolveManagedType(IMapping mapping) Resolves this path'sIManagedTypeby using the givenIMapping.protected IMappingRetrieves theIMappingfor the given property name.toString()Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver
addChild, buildType, checkParent, getChild, getParent, getParentManagedType, getParentMapping, getParentType, getParentTypeDeclaration, getProvider, getQuery, getType, getType, getType, getTypeDeclaration, getTypeHelper, getTypeRepository, isNullAllowed, setNullAllowed
-
Field Details
-
path
The name of the path for which its type will be retrieved.
-
-
Constructor Details
-
AbstractPathResolver
Creates a newAbstractPathResolver.- Parameters:
parent- The parentResolver, which is nevernullpath- The name of the path
-
-
Method Details
-
buildTypeDeclaration
Description copied from class:ResolverResolves theITypeDeclarationof the property handled by thisResolver.- Specified by:
buildTypeDeclarationin classResolver- Returns:
- Either the
ITypeDeclarationthat was resolved by thisResolveror theITypeDeclarationforIType.UNRESOLVABLE_TYPEif it could not be resolved
-
getManagedType
Description copied from class:ResolverReturns theIManagedTypeassociated with the field handled by thisResolver. If thisResolverdoes not handle a field that has aIManagedType, thennullshould be returned.For example: "
SELECT e FROM Employee e", theResolverfor e would be returning theIManagedTypefor Employee.- Overrides:
getManagedTypein classResolver- Returns:
- Either the
IManagedType, if it could be resolved;nullotherwise
-
getMapping
Description copied from class:ResolverReturns theIMappingfor the wrapped field.- Overrides:
getMappingin classResolver- Returns:
- Either the
IMappingornullif none exists
-
getPath
Returns the single path represented by thisResolver.- Returns:
- The single path represented by this
Resolver
-
resolveManagedType
Resolves this path'sIManagedTypeby using the givenIMapping.- Parameters:
mapping- TheIMapping, which is nevernull, is used to calculate theIManagedType- Returns:
- The
IManagedTypefor the givenIMapping, if it has one;nullif the type is a primitive
-
resolveMapping
Retrieves theIMappingfor the given property name.- Returns:
- Either the
IMappingornullif none exists
-
toString
-