EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql
Class AbstractPathResolver

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.Resolver
      extended by org.eclipse.persistence.jpa.jpql.AbstractPathResolver
Direct Known Subclasses:
CollectionValuedFieldResolver, StateFieldResolver

public abstract class AbstractPathResolver
extends Resolver

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).

Version:
2.4.1
See Also:
CollectionValuedFieldResolver, StateFieldResolver
Author:
Pascal Filion
Since:
2.3

Field Summary
protected  java.lang.String path
          The name of the path for which its type will be retrieved.
 
Constructor Summary
protected AbstractPathResolver(Resolver parent, java.lang.String path)
          Creates a new AbstractPathResolver.
 
Method Summary
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()
          
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.Resolver
accept, addChild, buildType, checkParent, getChild, getParent, getParentManagedType, getParentMapping, getParentType, getParentTypeDeclaration, getProvider, getQuery, getType, getType, getType, getTypeDeclaration, getTypeHelper, getTypeRepository, isNullAllowed, setNullAllowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

path

protected final java.lang.String path
The name of the path for which its type will be retrieved.

Constructor Detail

AbstractPathResolver

protected AbstractPathResolver(Resolver parent,
                               java.lang.String path)
Creates a new AbstractPathResolver.

Parameters:
parent - The parent Resolver, which is never null
path - The name of the path
Method Detail

buildTypeDeclaration

protected ITypeDeclaration buildTypeDeclaration()
Resolves the ITypeDeclaration of the property handled by this Resolver.

Specified by:
buildTypeDeclaration in class Resolver
Returns:
Either the ITypeDeclaration that was resolved by this Resolver or the ITypeDeclaration for IType.UNRESOLVABLE_TYPE if it could not be resolved

getManagedType

public IManagedType getManagedType()
Returns the 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.

Overrides:
getManagedType in class Resolver
Returns:
Either the IManagedType, if it could be resolved; null otherwise

getMapping

public final IMapping getMapping()
Returns the IMapping for the wrapped field.

Overrides:
getMapping in class Resolver
Returns:
Either the IMapping or null if none exists

getPath

public final java.lang.String getPath()
Returns the single path represented by this Resolver.

Returns:
The single path represented by this Resolver

resolveManagedType

protected abstract IManagedType resolveManagedType(IMapping mapping)
Resolves this path's IManagedType by using the given IMapping.

Parameters:
mapping - The IMapping, which is never null, is used to calculate the IManagedType
Returns:
The IManagedType for the given IMapping, if it has one; null if the type is a primitive

resolveMapping

protected IMapping resolveMapping()
Retrieves the IMapping for the given property name.

Returns:
Either the IMapping or null if none exists

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference