EclipseLink 2.5.0, build 'v20130425-368d603' API Reference

org.eclipse.persistence.jpa.jpql.tools.spi.java
Class JavaManagedTypeProvider

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.tools.spi.java.JavaManagedTypeProvider
All Implemented Interfaces:
IManagedTypeProvider

public class JavaManagedTypeProvider
extends java.lang.Object
implements IManagedTypeProvider

The concrete implementation of IManagedTypeProvider that is wrapping the runtime representation of a provider of a managed type.

Version:
2.5
Author:
Pascal Filion
Since:
2.3

Constructor Summary
JavaManagedTypeProvider(IMappingBuilder<java.lang.reflect.Member> mappingBuilder)
          Creates a new JavaManagedTypeProvider.
 
Method Summary
 IEmbeddable addEmbeddable(java.lang.Class<?> type)
          Adds the given Java class that is a JPA embeddable.
 IEntity addEntity(java.lang.Class<?> type)
          Adds the given Java class that is a JPA entity.
 IMappedSuperclass addMappedSuperclass(java.lang.Class<?> type)
          Adds the given Java class that is a JPA mapped superclass.
protected  IEmbeddable buildEmbeddable(java.lang.Class<?> type)
           
protected  IEntity buildEntity(java.lang.Class<?> type)
           
protected  IMappedSuperclass buildMappedSuperclass(java.lang.Class<?> type)
           
 java.lang.Iterable<IEntity> entities()
          Returns the collection of possible abstract schema types.
 IEmbeddable getEmbeddable(IType type)
          Retrieves the IEmbeddable with the given IType.
 IEmbeddable getEmbeddable(java.lang.String typeName)
          Retrieves the IEmbeddable for the given fully qualified type name.
 IEntity getEntity(IType type)
          Retrieves the IEntity with the given IType.
 IEntity getEntity(java.lang.String typeName)
          Retrieves the IEntity with the given name.
 IEntity getEntityNamed(java.lang.String entityName)
          Retrieves the IEntity with the given entity name.
 IManagedType getManagedType(IType type)
          Retrieves the IManagedType for the given IType.
 IManagedType getManagedType(java.lang.String typeName)
          Retrieves the IManagedType for the given fully qualified type name.
 IMappedSuperclass getMappedSuperclass(IType type)
          Retrieves the IEmbeddable with the given IType.
 IMappedSuperclass getMappedSuperclass(java.lang.String typeName)
          Retrieves the IMappedSuperclass for the given fully qualified type name.
protected  IMappingBuilder<java.lang.reflect.Member> getMappingBuilder()
           
 JavaTypeRepository getTypeRepository()
          Returns the type repository for the application.
protected  void initialize()
          Initializes this provider.
 java.lang.Iterable<IManagedType> managedTypes()
          Returns the managed types available within the context of this provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaManagedTypeProvider

public JavaManagedTypeProvider(IMappingBuilder<java.lang.reflect.Member> mappingBuilder)
Creates a new JavaManagedTypeProvider.

Parameters:
mappingBuilder - The builder that is responsible to create the persistence.jpa.jpql.spi.IMapping IMapping wrapping a persistent attribute or property
Throws:
java.lang.NullPointerException - The IMappingBuilder cannot be null
Method Detail

addEmbeddable

public IEmbeddable addEmbeddable(java.lang.Class<?> type)
Adds the given Java class that is a JPA embeddable.

Parameters:
type - The embeddable class
Returns:
The external form wrapping the given Java type

addEntity

public IEntity addEntity(java.lang.Class<?> type)
Adds the given Java class that is a JPA entity.

Parameters:
type - The entity class
Returns:
The external form wrapping the given Java type

addMappedSuperclass

public IMappedSuperclass addMappedSuperclass(java.lang.Class<?> type)
Adds the given Java class that is a JPA mapped superclass.

Parameters:
type - The mapped superclass class
Returns:
The external form wrapping the given Java type

buildEmbeddable

protected IEmbeddable buildEmbeddable(java.lang.Class<?> type)

buildEntity

protected IEntity buildEntity(java.lang.Class<?> type)

buildMappedSuperclass

protected IMappedSuperclass buildMappedSuperclass(java.lang.Class<?> type)

entities

public java.lang.Iterable<IEntity> entities()
Returns the collection of possible abstract schema types.

Specified by:
entities in interface IManagedTypeProvider
Returns:
The entities defined in the persistence context

getEmbeddable

public IEmbeddable getEmbeddable(IType type)
Retrieves the IEmbeddable with the given IType.

Specified by:
getEmbeddable in interface IManagedTypeProvider
Parameters:
type - The IType of the IEmbeddable to retrieve
Returns:
The IEmbeddable for the given IType if it's representing an embeddable; otherwise null

getEmbeddable

public IEmbeddable getEmbeddable(java.lang.String typeName)
Retrieves the IEmbeddable for the given fully qualified type name.

Specified by:
getEmbeddable in interface IManagedTypeProvider
Parameters:
typeName - The fully qualified type name of the IEmbeddable to retrieve
Returns:
The IEmbeddable that has the given type name; otherwise null

getEntity

public IEntity getEntity(IType type)
Retrieves the IEntity with the given IType.

Specified by:
getEntity in interface IManagedTypeProvider
Parameters:
type - The IType of the IEntity to retrieve
Returns:
The IEntity for the given IType if it's representing an entity; otherwise null

getEntity

public IEntity getEntity(java.lang.String typeName)
Retrieves the IEntity with the given name.

Specified by:
getEntity in interface IManagedTypeProvider
Parameters:
typeName - The fully qualified type name of the IEntity to retrieve
Returns:
The IEntity with the given name; otherwise null
See Also:
IManagedTypeProvider.getEntityNamed(String)

getEntityNamed

public IEntity getEntityNamed(java.lang.String entityName)
Retrieves the IEntity with the given entity name.

Specified by:
getEntityNamed in interface IManagedTypeProvider
Parameters:
entityName - The abstract schema name of the IEntity to retrieve
Returns:
The IEntity with the given abstract schema name; otherwise null
See Also:
IManagedTypeProvider.getEntity(String)

getManagedType

public IManagedType getManagedType(IType type)
Retrieves the IManagedType for the given IType.

Specified by:
getManagedType in interface IManagedTypeProvider
Parameters:
type - The type that is used as a managed type
Returns:
The IManagedType for the given type, if one exists, null otherwise

getManagedType

public IManagedType getManagedType(java.lang.String typeName)
Retrieves the IManagedType for the given fully qualified type name.

Specified by:
getManagedType in interface IManagedTypeProvider
Parameters:
typeName - The fully qualified type name of the IManagedType to retrieve
Returns:
The IManagedType for the given type, if one exists, null otherwise

getMappedSuperclass

public IMappedSuperclass getMappedSuperclass(IType type)
Retrieves the IEmbeddable with the given IType.

Specified by:
getMappedSuperclass in interface IManagedTypeProvider
Parameters:
type - The IType of the IMappedSuperclass to retrieve
Returns:
The IMappedSuperclass for the given IType if it's representing a mapped superclass; otherwise null

getMappedSuperclass

public IMappedSuperclass getMappedSuperclass(java.lang.String typeName)
Retrieves the IMappedSuperclass for the given fully qualified type name.

Specified by:
getMappedSuperclass in interface IManagedTypeProvider
Parameters:
typeName - The fully qualified type name of the IMappedSuperclass to retrieve
Returns:
The IMappedSuperclass that has the given type name; otherwise null

getMappingBuilder

protected IMappingBuilder<java.lang.reflect.Member> getMappingBuilder()

getTypeRepository

public JavaTypeRepository getTypeRepository()
Returns the type repository for the application.

Specified by:
getTypeRepository in interface IManagedTypeProvider
Returns:
The repository of ITypes

initialize

protected void initialize()
Initializes this provider.


managedTypes

public java.lang.Iterable<IManagedType> managedTypes()
Returns the managed types available within the context of this provider.

Specified by:
managedTypes in interface IManagedTypeProvider
Returns:
The managed types owned by this provider

EclipseLink 2.5.0, build 'v20130425-368d603' API Reference