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

public Class CollectionValuedFieldResolver

extends AbstractPathResolver
Class Inheritance
Imports
org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType, .IManagedTypeProvider, .IManagedTypeVisitor, .IMapping, .IType, .ITypeDeclaration, org.eclipse.persistence.jpa.jpql.tools.utility.iterable.EmptyIterable

This Resolver is responsible to resolve the type of a collection-valued field.
Author
Pascal Filion
Since
2.3
Version
2.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class

Field Summary

Inherited from org.eclipse.persistence.jpa.jpql.tools.resolver.AbstractPathResolver:
path

Constructor Summary

AccessConstructor and Description
public
CollectionValuedFieldResolver(Resolver
The parent Resolver, which is never null
parent
,
String
A single segment of the collection-valued path expression
path
)

Creates a new CollectionValuedFieldResolver.

Method Summary

Modifier and TypeMethod and Description
protected IType
buildType()

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

Resolves the IType of the property handled by this Resolver.
protected IManagedType
resolveManagedType(IMapping
The IMapping, which is never null, is used to calculate the IManagedType
mapping
)

Implements abstract org.eclipse.persistence.jpa.jpql.tools.resolver.AbstractPathResolver.resolveManagedType.

Resolves this path's IManagedType by using the given IMapping.
Inherited from org.eclipse.persistence.jpa.jpql.tools.resolver.AbstractPathResolver:
buildTypeDeclarationgetManagedTypegetMappinggetPathresolveMappingtoString

Constructor Detail

CollectionValuedFieldResolverback to summary
public CollectionValuedFieldResolver(Resolver parent, String path)

Creates a new CollectionValuedFieldResolver.

Parameters
parent:Resolver

The parent Resolver, which is never null

path:String

A single segment of the collection-valued path expression

Method Detail

buildTypeback to summary
protected 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
resolveManagedTypeback to summary
protected IManagedType resolveManagedType(IMapping mapping)

Implements abstract org.eclipse.persistence.jpa.jpql.tools.resolver.AbstractPathResolver.resolveManagedType.

Doc from org.eclipse.persistence.jpa.jpql.tools.resolver.AbstractPathResolver.resolveManagedType.

Resolves this path's IManagedType by using the given IMapping.

Parameters
mapping:IMapping

The IMapping, which is never null, is used to calculate the IManagedType

Returns:IManagedType

The IManagedType for the given IMapping, if it has one; null if the type is a primitive

Annotations
@Override
org.eclipse.persistence.jpa.jpql.tools.resolver back to summary

protected Class CollectionValuedFieldResolver.MapManagedType

extends Object
implements IManagedType
Class Inheritance
  • java.lang.Object
  • org.eclipse.persistence.jpa.jpql.tools.resolver.CollectionValuedFieldResolver.MapManagedType
All Implemented Interfaces
org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType, java.lang.Comparable, org.eclipse.persistence.jpa.jpql.tools.spi.IExternalForm

Field Summary

Modifier and TypeField and Description
protected final IType
protected final IManagedTypeProvider

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
accept(IManagedTypeVisitor
The visitor to visit this managed type object
visitor
)

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.accept.

Visits this managed type with the given visitor.
public int
compareTo(IManagedType
the object to be compared.
managedType
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.
public IMapping
getMappingNamed(String
The name of the mapping to retrieve
name
)

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getMappingNamed.

Returns the IMapping with the given name.
public IManagedTypeProvider
getProvider()

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getProvider.

Retrieves the owner of this managed type.
public IType
getType()

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getType.

Returns the external representation of the class used by this managed type.
public Iterable<IMapping>
mappings()

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.mappings.

Returns the collection of mappings defined in this managed type.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

mapTypeback to summary
protected final IType mapType
providerback to summary
protected final IManagedTypeProvider provider

Constructor Detail

MapManagedTypeback to summary
protected MapManagedType(IManagedTypeProvider provider, IType mapType)

Method Detail

acceptback to summary
public void accept(IManagedTypeVisitor visitor)

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.accept.

Doc from org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.accept.

Visits this managed type with the given visitor.

Parameters
visitor:IManagedTypeVisitor

The visitor to visit this managed type object

Annotations
@Override
compareToback to summary
public int compareTo(IManagedType managedType)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
managedType:IManagedType

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
getMappingNamedback to summary
public IMapping getMappingNamed(String name)

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getMappingNamed.

Doc from org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getMappingNamed.

Returns the IMapping with the given name.

Parameters
name:String

The name of the mapping to retrieve

Returns:IMapping

Either the IMapping or null if it could not be found

Annotations
@Override
getProviderback to summary
public IManagedTypeProvider getProvider()

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getProvider.

Doc from org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getProvider.

Retrieves the owner of this managed type.

Returns:IManagedTypeProvider

The external form holding onto the JPA managed types

Annotations
@Override
getTypeback to summary
public IType getType()

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getType.

Doc from org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getType.

Returns the external representation of the class used by this managed type.

Returns:IType

The external representation of the class used by this managed type

Annotations
@Override
mappingsback to summary
public Iterable<IMapping> mappings()

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.mappings.

Doc from org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.mappings.

Returns the collection of mappings defined in this managed type.

Returns:Iterable<IMapping>

The collection of persistent fields and properties of this managed type

Annotations
@Override
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