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 mapping (orm.xml) files. The org.eclipse.jpt.core.generic 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. In the extension point you actually provide a JpaPlatformFactory class used to build the JpaPlatform. See the org.eclipse.jpt.core.jpaPlatforms extension point

See Also:
JpaPlatformFactory, 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
 JavaAttributeMapping buildDefaultJavaAttributeMapping(JavaPersistentAttribute attribute)
          Build a default Java attribute mapping for the specified persistent attribute.
 JavaAttributeMapping buildJavaAttributeMappingFromAnnotation(java.lang.String annotationName, JavaPersistentAttribute attribute)
          Build a Java attribute mapping for the specified annotation and persistent attribute.
 JavaAttributeMapping buildJavaAttributeMappingFromMappingKey(java.lang.String key, JavaPersistentAttribute attribute)
          Build a Java attribute mapping for the specified key and persistent attribute.
 JavaTypeMapping buildJavaTypeMappingFromAnnotation(java.lang.String annotationName, JavaPersistentType type)
          Build a Java type mapping for the specified annotation and persistent type.
 JavaTypeMapping buildJavaTypeMappingFromMappingKey(java.lang.String key, JavaPersistentType type)
          Build a Java type mapping for the specified key and persistent type.
 JpaFile buildJpaFile(JpaProject jpaProject, org.eclipse.core.resources.IFile file)
          Return a JPA file corresponding to the specified Eclipse file.
 MappingFile buildMappingFile(MappingFileRef parent, JpaXmlResource resource)
           
 OrmAttributeMapping buildOrmAttributeMappingFromMappingKey(OrmPersistentAttribute parent, XmlAttributeMapping resourceMapping)
          Build an ORM attribute mapping for the specified key and persistent attribute.
 XmlAttributeMapping buildOrmResourceAttributeMapping(java.lang.String key, org.eclipse.core.runtime.content.IContentType contentType)
           
 XmlTypeMapping buildOrmResourceTypeMapping(java.lang.String key, org.eclipse.core.runtime.content.IContentType contentType)
           
 OrmTypeMapping buildOrmTypeMappingFromMappingKey(OrmPersistentType type, XmlTypeMapping resourceMapping)
          Build an ORM type mapping for the specified mapping key and persistent type.
 XmlAttributeMapping buildVirtualOrmResourceMappingFromMappingKey(java.lang.String key, OrmTypeMapping ormTypeMapping, JavaAttributeMapping javaAttributeMapping)
          Build a virtual resource attribute mapping to be used when the mapping is not specified in the orm.xml file.
 AnnotationEditFormatter getAnnotationEditFormatter()
          Return a formatter that can clean up the Java annotations added to source code.
 JpaAnnotationProvider getAnnotationProvider()
          Return an annotation provider responsible for determining what Java annotations are supported and constructing java resource model objects.
 ConnectionProfileFactory getConnectionProfileFactory()
          Return a connection repository that can be used to query the database about database metadata.
 DatabaseFinder getDatabaseFinder()
          Return a finder that can be used to look up various objects (schemata, tables, columns, etc.) on the database, respecting the platform's and database's case-sensitivity.
 java.lang.String getDefaultJavaAttributeMappingKey(JavaPersistentAttribute attribute)
          Return the Java attribute mapping key for the default mapping for the specified attribute.
 EntityGeneratorDatabaseAnnotationNameBuilder getEntityGeneratorDatabaseAnnotationNameBuilder()
          Return an entity generator database annotation name builder, which is used by Entity Generation to determine whether and how the entity generator prints the names of various database objects.
 java.lang.String getId()
          Get the ID for this platform
 JpaFactory getJpaFactory()
          Return a factory responsible for creating core (e.g.
 JpaValidation getJpaValidation()
           
 

Method Detail

getId

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


getJpaFactory

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


buildJpaFile

JpaFile buildJpaFile(JpaProject jpaProject,
                     org.eclipse.core.resources.IFile file)
Return a JPA file corresponding to the specified Eclipse file. Return null if the file's content is unsupported.


getAnnotationProvider

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


getAnnotationEditFormatter

AnnotationEditFormatter getAnnotationEditFormatter()
Return a formatter that can clean up the Java annotations added to source code.


buildJavaTypeMappingFromMappingKey

JavaTypeMapping buildJavaTypeMappingFromMappingKey(java.lang.String key,
                                                   JavaPersistentType type)
Build a Java type mapping for the specified key and persistent type. Use identity when comparing keys; so clients must use the same key constants as the providers. Throw an IllegalArgumentException if the key is not supported by the platform.


buildJavaTypeMappingFromAnnotation

JavaTypeMapping buildJavaTypeMappingFromAnnotation(java.lang.String annotationName,
                                                   JavaPersistentType type)
Build a Java type mapping for the specified annotation and persistent type. Use identity when comparing annotation names; so clients must use the same name constants as the providers. Throw an IllegalArgumentException if the mapping annotation is not supported by the platform.


buildJavaAttributeMappingFromMappingKey

JavaAttributeMapping buildJavaAttributeMappingFromMappingKey(java.lang.String key,
                                                             JavaPersistentAttribute attribute)
Build a Java attribute mapping for the specified key and persistent attribute. Use identity when comparing keys; so clients must use the same key constants as the providers. Throw an IllegalArgumentException if the key is not supported by the platform.


buildJavaAttributeMappingFromAnnotation

JavaAttributeMapping buildJavaAttributeMappingFromAnnotation(java.lang.String annotationName,
                                                             JavaPersistentAttribute attribute)
Build a Java attribute mapping for the specified annotation and persistent attribute. Use identity when comparing annotation names; so clients must use the same name constants as the providers. Throw an IllegalArgumentException if the mapping annotation is not supported by the platform.


buildDefaultJavaAttributeMapping

JavaAttributeMapping buildDefaultJavaAttributeMapping(JavaPersistentAttribute attribute)
Build a default Java attribute mapping for the specified persistent attribute.


getDefaultJavaAttributeMappingKey

java.lang.String getDefaultJavaAttributeMappingKey(JavaPersistentAttribute attribute)
Return the Java attribute mapping key for the default mapping for the specified attribute.

See Also:
DefaultJavaAttributeMappingProvider.defaultApplies(JavaPersistentAttribute)

buildMappingFile

MappingFile buildMappingFile(MappingFileRef parent,
                             JpaXmlResource resource)

buildOrmResourceTypeMapping

XmlTypeMapping buildOrmResourceTypeMapping(java.lang.String key,
                                           org.eclipse.core.runtime.content.IContentType contentType)

buildOrmTypeMappingFromMappingKey

OrmTypeMapping buildOrmTypeMappingFromMappingKey(OrmPersistentType type,
                                                 XmlTypeMapping resourceMapping)
Build an ORM type mapping for the specified mapping key and persistent type. Use identity when comparing keys; so clients must use the same key constants as the providers.


buildOrmResourceAttributeMapping

XmlAttributeMapping buildOrmResourceAttributeMapping(java.lang.String key,
                                                     org.eclipse.core.runtime.content.IContentType contentType)

buildOrmAttributeMappingFromMappingKey

OrmAttributeMapping buildOrmAttributeMappingFromMappingKey(OrmPersistentAttribute parent,
                                                           XmlAttributeMapping resourceMapping)
Build an ORM attribute mapping for the specified key and persistent attribute. Use identity when comparing keys; so clients must use the same key constants as the providers.


buildVirtualOrmResourceMappingFromMappingKey

XmlAttributeMapping buildVirtualOrmResourceMappingFromMappingKey(java.lang.String key,
                                                                 OrmTypeMapping ormTypeMapping,
                                                                 JavaAttributeMapping javaAttributeMapping)
Build a virtual resource attribute mapping to be used when the mapping is not specified in the orm.xml file. There is no XmlAttributeMapping in this case, so we build one that delegates to the JavaAttributeMapping as necessary


getConnectionProfileFactory

ConnectionProfileFactory getConnectionProfileFactory()
Return a connection repository that can be used to query the database about database metadata.


getEntityGeneratorDatabaseAnnotationNameBuilder

EntityGeneratorDatabaseAnnotationNameBuilder getEntityGeneratorDatabaseAnnotationNameBuilder()
Return an entity generator database annotation name builder, which is used by Entity Generation to determine whether and how the entity generator prints the names of various database objects.


getDatabaseFinder

DatabaseFinder getDatabaseFinder()
Return a finder that can be used to look up various objects (schemata, tables, columns, etc.) on the database, respecting the platform's and database's case-sensitivity.


getJpaValidation

JpaValidation getJpaValidation()