org.eclipse.jpt.core
Interface JpaPlatform


public interface JpaPlatform

This interface is to be implemented by a JPA vendor to provide extensions to the core JPA model. The core JPA model will provide functionality for JPA spec annotations in java, persistence.xml and (orm.xml) mapping files. The org.eclipse.jpt.core.genericPlatform extension supplies resource models for those file types. As another vendor option you will have to supply those resource models as well or different ones as necessary. See the org.eclipse.jpt.core.jpaPlatform extension point 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.


Method Summary
 void addToMessages(JpaProject project, java.util.List<org.eclipse.wst.validation.internal.provisional.core.IMessage> messages)
          Adds validation messages to the growing list of messages for a given project
 JavaAttributeMapping buildDefaultJavaAttributeMapping(JavaPersistentAttribute parent)
          Build a default Java attribute mapping with the given mapping annotation and parent.
 JavaAttributeMapping buildJavaAttributeMappingFromAnnotation(java.lang.String mappingAnnotationName, JavaPersistentAttribute parent)
          Build a Java attribute mapping with the given mapping annotation and parent.
 JavaAttributeMapping buildJavaAttributeMappingFromMappingKey(java.lang.String attributeMappingKey, JavaPersistentAttribute parent)
          Build a Java attribute mapping with the given mapping key and parent.
 JavaTypeMapping buildJavaTypeMappingFromAnnotation(java.lang.String mappingAnnotationName, JavaPersistentType parent)
          Build a Java type mapping with the given mapping annotation and parent.
 JavaTypeMapping buildJavaTypeMappingFromMappingKey(java.lang.String typeMappingKey, JavaPersistentType parent)
          Build a Java type mapping with the given mapping key and parent.
 JpaFile buildJpaFile(JpaProject jpaProject, org.eclipse.core.resources.IFile file)
          Construct a JPA file for the specified file, to be added to the specified JPA project.
 java.lang.String defaultJavaAttributeMappingKey(JavaPersistentAttribute persistentAttribute)
          Return the attribute mapping key corresponding to the default atribute mapping that applies to the Java persistent attribute.
 JpaAnnotationProvider getAnnotationProvider()
          Return an annotation provider responsible for determining what annotations are supported and constructing java resource model objects
 java.lang.String getId()
          Get the ID for this platform
 JpaFactory getJpaFactory()
          Return a factory responsible for creating core (e.g.
 void setId(java.lang.String theId)
          Set the ID for this platform.
 

Method Detail

getId

java.lang.String getId()
Get the ID for this platform


setId

void setId(java.lang.String theId)
Set the ID for this platform. This is an extension so you can't use a non-default constructor. ************* * IMPORTANT * For INTERNAL use only!! *************


buildJpaFile

JpaFile buildJpaFile(JpaProject jpaProject,
                     org.eclipse.core.resources.IFile file)
Construct a JPA file for the specified file, to be added to the specified JPA project. (Defer to the factory for actual object creation.) Return null if unable to create the JPA file (e.g. the content type is unrecognized).


getJpaFactory

JpaFactory getJpaFactory()
Return a factory responsible for creating core (e.g. JpaProject), resource (e.g. PersistenceResource), and context (e.g. PersistenceUnit) model objects


getAnnotationProvider

JpaAnnotationProvider getAnnotationProvider()
Return an annotation provider responsible for determining what annotations are supported and constructing java resource model objects


buildJavaTypeMappingFromMappingKey

JavaTypeMapping buildJavaTypeMappingFromMappingKey(java.lang.String typeMappingKey,
                                                   JavaPersistentType parent)
Build a Java type mapping with the given mapping key and parent. Throws a IllegalArgumentException if the typeMappingKey is not supported by this platform. Override #GenericJpaPlatform.addJavaTypeMappingProvidersTo(Collection) to add new supported type mappings to the platform


buildJavaTypeMappingFromAnnotation

JavaTypeMapping buildJavaTypeMappingFromAnnotation(java.lang.String mappingAnnotationName,
                                                   JavaPersistentType parent)
Build a Java type mapping with the given mapping annotation and parent. Throws a IllegalArgumentException if the mapping annotation is not supported by this platform. Override #GenericJpaPlatform.addJavaTypeMappingProvidersTo(Collection) to add new supported type mappings to the platform


buildJavaAttributeMappingFromMappingKey

JavaAttributeMapping buildJavaAttributeMappingFromMappingKey(java.lang.String attributeMappingKey,
                                                             JavaPersistentAttribute parent)
Build a Java attribute mapping with the given mapping key and parent. Throws a IllegalArgumentException if the attributeMappingKey is not supported by this platform. Override #GenericJpaPlatform.addJavaAttributeMappingProvidersTo(Collection) to add new supported attribute mappings to the platform


buildJavaAttributeMappingFromAnnotation

JavaAttributeMapping buildJavaAttributeMappingFromAnnotation(java.lang.String mappingAnnotationName,
                                                             JavaPersistentAttribute parent)
Build a Java attribute mapping with the given mapping annotation and parent. Throws a IllegalArgumentException if the mapping annotation is not supported by this platform. Override #GenericJpaPlatform.addJavaAttributeMappingProvidersTo(Collection) to add new supported attribute mappings to the platform


buildDefaultJavaAttributeMapping

JavaAttributeMapping buildDefaultJavaAttributeMapping(JavaPersistentAttribute parent)
Build a default Java attribute mapping with the given mapping annotation and parent. Throws a IllegalArgumentException if the mapping annotation is not supported by this platform. Override #GenericJpaPlatform.addDefaultJavaAttributeMappingProvidersTo(Collection) to add new supported attribute mappings to the platform


defaultJavaAttributeMappingKey

java.lang.String defaultJavaAttributeMappingKey(JavaPersistentAttribute persistentAttribute)
Return the attribute mapping key corresponding to the default atribute mapping that applies to the Java persistent attribute. This will be based on the attribute's type. See DefaultJavaAttributeMappingProvider.#defaultApplies(JavaPersistentAttribute)


addToMessages

void addToMessages(JpaProject project,
                   java.util.List<org.eclipse.wst.validation.internal.provisional.core.IMessage> messages)
Adds validation messages to the growing list of messages for a given project