Dali Provisional API
Release 3.2

org.eclipse.jpt.jpa.core.jpql.spi
Class JpaMapping

java.lang.Object
  extended by org.eclipse.jpt.jpa.core.jpql.spi.JpaMapping
Direct Known Subclasses:
EclipseLinkMapping, GenericJpaMapping

public abstract class JpaMapping
extends Object

The concrete implementation of IMapping that is wrapping the design-time representation of a mapping. Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
3.0

Nested Class Summary
protected  class JpaMapping.TypeDeclarationTransformer
           
 
Constructor Summary
protected JpaMapping(IManagedType parent, AttributeMapping mapping)
          Creates a new JpaMapping.
 
Method Summary
protected  ITypeDeclaration[] buildGenericTypeDeclarations()
           
protected  Iterable<ITypeDeclaration> buildGenericTypeDeclarations(JavaResourceAttribute resource)
           
protected  IType buildType(boolean resolveRelationshipType)
           
protected  ITypeDeclaration buildTypeDeclaration()
           
protected  int calculateMappingType()
          Calculates the type of the persistent attribute represented by this external form.
 int compareTo(IMapping mapping)
          
protected  AttributeMapping getMapping()
          Returns the design-time mapping object.
 int getMappingType()
          
 String getName()
          
 IManagedType getParent()
          
 IType getType()
          
 ITypeDeclaration getTypeDeclaration()
          
protected  ITypeRepository getTypeRepository()
          Returns the type repository for the application.
 boolean hasAnnotation(Class<? extends Annotation> annotationType)
          
 boolean isCollection()
          
 boolean isProperty()
          
 boolean isRelationship()
          
 boolean isTransient()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JpaMapping

protected JpaMapping(IManagedType parent,
                     AttributeMapping mapping)
Creates a new JpaMapping.

Parameters:
parent - The parent of this mapping
mapping - The design-time AttributeMapping wrapped by this class
Method Detail

buildGenericTypeDeclarations

protected ITypeDeclaration[] buildGenericTypeDeclarations()

buildGenericTypeDeclarations

protected Iterable<ITypeDeclaration> buildGenericTypeDeclarations(JavaResourceAttribute resource)

buildType

protected IType buildType(boolean resolveRelationshipType)

buildTypeDeclaration

protected ITypeDeclaration buildTypeDeclaration()

calculateMappingType

protected int calculateMappingType()
Calculates the type of the persistent attribute represented by this external form.

Returns:
The mapping type, which is one of the constants defined in persistence.jpa.jpql.spi.IMappingType IMappingType when the provider is generic JPA

compareTo

public int compareTo(IMapping mapping)


getMapping

protected AttributeMapping getMapping()
Returns the design-time mapping object.

Returns:
The actual AttributeMapping wrapped by this JpaMapping

getMappingType

public int getMappingType()


getName

public String getName()


getParent

public IManagedType getParent()


getType

public IType getType()


getTypeDeclaration

public ITypeDeclaration getTypeDeclaration()


getTypeRepository

protected ITypeRepository getTypeRepository()
Returns the type repository for the application.

Returns:
The repository of ITypes

hasAnnotation

public boolean hasAnnotation(Class<? extends Annotation> annotationType)


isCollection

public boolean isCollection()


isProperty

public boolean isProperty()


isRelationship

public boolean isRelationship()


isTransient

public boolean isTransient()


toString

public String toString()

Overrides:
toString in class Object

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.