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
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractPathResolver
(Resolver parent, String path) Creates a newAbstractPathResolver
. -
Method Summary
Modifier and TypeMethodDescriptionprotected ITypeDeclaration
Resolves theITypeDeclaration
of the property handled by thisResolver
.Returns theIManagedType
associated with the field handled by thisResolver
.final IMapping
Returns theIMapping
for the wrapped field.final String
getPath()
Returns the single path represented by thisResolver
.protected abstract IManagedType
resolveManagedType
(IMapping mapping) Resolves this path'sIManagedType
by using the givenIMapping
.protected IMapping
Retrieves theIMapping
for 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 nevernull
path
- The name of the path
-
-
Method Details
-
buildTypeDeclaration
Description copied from class:Resolver
Resolves theITypeDeclaration
of the property handled by thisResolver
.- Specified by:
buildTypeDeclaration
in classResolver
- Returns:
- Either the
ITypeDeclaration
that was resolved by thisResolver
or theITypeDeclaration
forIType.UNRESOLVABLE_TYPE
if it could not be resolved
-
getManagedType
Description copied from class:Resolver
Returns theIManagedType
associated with the field handled by thisResolver
. If thisResolver
does not handle a field that has aIManagedType
, thennull
should be returned.For example: "
SELECT e FROM Employee e
", theResolver
for e would be returning theIManagedType
for Employee.- Overrides:
getManagedType
in classResolver
- Returns:
- Either the
IManagedType
, if it could be resolved;null
otherwise
-
getMapping
Description copied from class:Resolver
Returns theIMapping
for the wrapped field.- Overrides:
getMapping
in classResolver
- Returns:
- Either the
IMapping
ornull
if none exists
-
getPath
Returns the single path represented by thisResolver
.- Returns:
- The single path represented by this
Resolver
-
resolveManagedType
Resolves this path'sIManagedType
by using the givenIMapping
.- Parameters:
mapping
- TheIMapping
, which is nevernull
, is used to calculate theIManagedType
- Returns:
- The
IManagedType
for the givenIMapping
, if it has one;null
if the type is a primitive
-
resolveMapping
Retrieves theIMapping
for the given property name.- Returns:
- Either the
IMapping
ornull
if none exists
-
toString
-