Top Description Fields Constructors Methods
org.eclipse.persistence.jpa.jpql.tools.resolver

public Class IdentificationVariableResolver

extends Resolver
Class Inheritance
Annotations
@SuppressWarnings:nls
Imports
org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType, .IMapping, .IType, .ITypeDeclaration

This Resolver is responsible to resolve the type of an identification variable.
Author
Pascal Filion
Since
2.3
Version
2.5

Field Summary

Modifier and TypeField and Description
private final String
variableName

The name of the identification variable, which is never null nor an empty string.

Constructor Summary

AccessConstructor and Description
public
IdentificationVariableResolver(Resolver
The parent Resolver, which is never null
parent
,
String
The name of the identification variable, which should never be null and it should not be an empty string
variableName
)

Creates a new IdentificationVariableResolver.

Method Summary

Modifier and TypeMethod and Description
public IType
buildType()

Overrides org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.buildType.

Resolves the IType of the property handled by this Resolver.
public ITypeDeclaration
public IManagedType
getManagedType()

Overrides org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.getManagedType.

Returns the IManagedType associated with the field handled by this Resolver.
public IMapping
public String

Returns:

The identification variable handled by this Resolver
getVariableName
()

Returns the identification variable handled by this Resolver.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver:
addChildcheckParentgetChildgetParentgetParentManagedTypegetParentMappinggetParentTypegetParentTypeDeclarationgetProvidergetQuerygetTypegetTypegetTypegetTypeDeclarationgetTypeHelpergetTypeRepositoryisNullAllowedsetNullAllowed

Field Detail

variableNameback to summary
private final String variableName

The name of the identification variable, which is never null nor an empty string.

Constructor Detail

IdentificationVariableResolverback to summary
public IdentificationVariableResolver(Resolver parent, String variableName)

Creates a new IdentificationVariableResolver.

Parameters
parent:Resolver

The parent Resolver, which is never null

variableName:String

The name of the identification variable, which should never be null and it should not be an empty string

Method Detail

buildTypeback to summary
public IType buildType()

Overrides org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.buildType.

Doc from org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.buildType.

Resolves the IType of the property handled by this Resolver.

Returns:IType

Either the IType that was resolved by this Resolver or the IType for IType#UNRESOLVABLE_TYPE if it could not be resolved

Annotations
@Override
buildTypeDeclarationback to summary
public ITypeDeclaration buildTypeDeclaration()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.buildTypeDeclaration.

Doc from org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.buildTypeDeclaration.

Resolves the ITypeDeclaration of the property handled by this Resolver.

Returns:ITypeDeclaration

Either the ITypeDeclaration that was resolved by this Resolver or the ITypeDeclaration for IType#UNRESOLVABLE_TYPE if it could not be resolved

Annotations
@Override
getManagedTypeback to summary
public IManagedType getManagedType()

Overrides org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.getManagedType.

Doc from org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.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.

Returns:IManagedType

Either the IManagedType, if it could be resolved; null otherwise

Annotations
@Override
getMappingback to summary
public IMapping getMapping()

Overrides org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.getMapping.

Doc from org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.getMapping.

Returns the IMapping for the wrapped field.

Returns:IMapping

Either the IMapping or null if none exists

Annotations
@Override
getVariableNameback to summary
public String getVariableName()

Returns the identification variable handled by this Resolver.

Returns:String

The identification variable handled by this Resolver

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override