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.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
 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.
 OrmAttributeMapping buildOrmAttributeMappingFromMappingKey(java.lang.String key, OrmPersistentAttribute attribute)
          Build an ORM attribute mapping for the specified key and persistent attribute.
 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.
 JpaAnnotationProvider getAnnotationProvider()
          Return an annotation provider responsible for determining what 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.
 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!! *************


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 annotations are supported and constructing java resource model objects


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)

buildOrmAttributeMappingFromMappingKey

OrmAttributeMapping buildOrmAttributeMappingFromMappingKey(java.lang.String key,
                                                           OrmPersistentAttribute attribute)
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.