public abstract class AbstractPathResolver extends Resolver
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).CollectionValuedFieldResolver
,
StateFieldResolver
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
path
The name of the path for which its type will be retrieved.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractPathResolver(Resolver parent,
java.lang.String path)
Creates a new
AbstractPathResolver . |
Modifier and Type | Method and Description |
---|---|
protected ITypeDeclaration |
buildTypeDeclaration()
Resolves the
ITypeDeclaration of the property handled by this Resolver . |
IManagedType |
getManagedType()
Returns the
IManagedType associated with the field handled by this Resolver . |
IMapping |
getMapping()
Returns the
IMapping for the wrapped field. |
java.lang.String |
getPath()
Returns the single path represented by this
Resolver . |
protected abstract IManagedType |
resolveManagedType(IMapping mapping)
Resolves this path's
IManagedType by using the given IMapping . |
protected IMapping |
resolveMapping()
Retrieves the
IMapping for the given property name. |
java.lang.String |
toString() |
addChild, buildType, checkParent, getChild, getParent, getParentManagedType, getParentMapping, getParentType, getParentTypeDeclaration, getProvider, getQuery, getType, getType, getType, getTypeDeclaration, getTypeHelper, getTypeRepository, isNullAllowed, setNullAllowed
protected final java.lang.String path
protected ITypeDeclaration buildTypeDeclaration()
ITypeDeclaration
of the property handled by this Resolver
.buildTypeDeclaration
in class Resolver
ITypeDeclaration
that was resolved by this Resolver
or the
ITypeDeclaration
for IType.UNRESOLVABLE_TYPE
if it could not be resolvedpublic IManagedType getManagedType()
IManagedType
associated with the field handled by this Resolver
.
If this Resolver
does not handle a field that has a IManagedType
, then
null
should be returned.
For example: "SELECT e FROM Employee e
", the Resolver
for
e would be returning the IManagedType
for Employee.
getManagedType
in class Resolver
IManagedType
, if it could be resolved; null
otherwisepublic final IMapping getMapping()
IMapping
for the wrapped field.getMapping
in class Resolver
IMapping
or null
if none existspublic final java.lang.String getPath()
Resolver
.Resolver
protected abstract IManagedType resolveManagedType(IMapping mapping)
IManagedType
by using the given IMapping
.mapping
- The IMapping
, which is never null
, is used to calculate
the IManagedType
IManagedType
for the given IMapping
, if it has one; null
if the type is a primitiveprotected IMapping resolveMapping()
IMapping
for the given property name.IMapping
or null
if none existspublic java.lang.String toString()
toString
in class java.lang.Object