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
public abstract class AbstractPathResolver extends Resolver
ThisResolveris 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
- Author:
- Pascal Filion
- See Also:
CollectionValuedFieldResolver,StateFieldResolver
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPathResolver(Resolver parent, String path)Creates a newAbstractPathResolver.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ITypeDeclarationbuildTypeDeclaration()Resolves theITypeDeclarationof the property handled by thisResolver.IManagedTypegetManagedType()Returns theIManagedTypeassociated with the field handled by thisResolver.IMappinggetMapping()Returns theIMappingfor the wrapped field.StringgetPath()Returns the single path represented by thisResolver.protected abstract IManagedTyperesolveManagedType(IMapping mapping)Resolves this path'sIManagedTypeby using the givenIMapping.protected IMappingresolveMapping()Retrieves theIMappingfor the given property name.StringtoString()-
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 Detail
-
path
protected final String path
The name of the path for which its type will be retrieved.
-
-
Method Detail
-
buildTypeDeclaration
protected ITypeDeclaration 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
public IManagedType 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
public final IMapping getMapping()
Description copied from class:ResolverReturns theIMappingfor the wrapped field.- Overrides:
getMappingin classResolver- Returns:
- Either the
IMappingornullif none exists
-
getPath
public final String getPath()
Returns the single path represented by thisResolver.- Returns:
- The single path represented by this
Resolver
-
resolveManagedType
protected abstract IManagedType resolveManagedType(IMapping mapping)
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
protected IMapping resolveMapping()
Retrieves theIMappingfor the given property name.- Returns:
- Either the
IMappingornullif none exists
-
-