org.eclipse.jpt.core
Interface JpaFactory

All Known Subinterfaces:
JpaFactory2_0

public interface JpaFactory

Use a JPA factory to build any core (e.g. JpaProject) model object or any Java (e.g. JavaEntity), ORM (e.g. EntityMappings), or persistence (e.g. PersistenceUnit) context model objects.

Assumes a base JPA project context structure corresponding to the JPA spec:

     RootContext
      |- persistence.xml
          |- persistence unit(s)
               |- mapping file(s)  (e.g. orm.xml)
               |   |- persistent type mapping(s)  (e.g. Entity)
               |       |- persistent attribute mapping(s)  (e.g. Basic)
               |- persistent type mapping(s)
 
... and associated objects.

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:
2.0
Version:
2.3
See Also:
org.eclipse.jpt.core.internal.jpa1.GenericJpaFactory

Method Summary
 JavaAssociationOverride buildJavaAssociationOverride(JavaAssociationOverrideContainer parent, JavaAssociationOverride.Owner owner)
           
 JavaAssociationOverrideContainer buildJavaAssociationOverrideContainer(JavaJpaContextNode parent, JavaAssociationOverrideContainer.Owner owner)
           
 JavaAssociationOverrideRelationshipReference buildJavaAssociationOverrideRelationshipReference(JavaAssociationOverride parent)
           
 JavaAttributeOverride buildJavaAttributeOverride(JavaAttributeOverrideContainer parent, JavaAttributeOverride.Owner owner)
           
 JavaAttributeOverrideContainer buildJavaAttributeOverrideContainer(JavaJpaContextNode parent, JavaAttributeOverrideContainer.Owner owner)
           
 JavaBasicMapping buildJavaBasicMapping(JavaPersistentAttribute parent)
           
 JavaColumn buildJavaColumn(JavaJpaContextNode parent, JavaBaseColumn.Owner owner)
           
 JavaDiscriminatorColumn buildJavaDiscriminatorColumn(JavaEntity parent, JavaDiscriminatorColumn.Owner owner)
           
 JavaEmbeddable buildJavaEmbeddable(JavaPersistentType parent)
           
 JavaEmbeddedIdMapping buildJavaEmbeddedIdMapping(JavaPersistentAttribute parent)
           
 JavaEmbeddedMapping buildJavaEmbeddedMapping(JavaPersistentAttribute parent)
           
 JavaEntity buildJavaEntity(JavaPersistentType parent)
           
 JavaEnumeratedConverter buildJavaEnumeratedConverter(JavaAttributeMapping parent, JavaResourcePersistentAttribute jrpa)
           
 JavaGeneratedValue buildJavaGeneratedValue(JavaIdMapping parent)
           
 JavaGeneratorContainer buildJavaGeneratorContainer(JavaJpaContextNode parent)
           
 JavaIdMapping buildJavaIdMapping(JavaPersistentAttribute parent)
           
 JavaJoinColumn buildJavaJoinColumn(JavaJpaContextNode parent, JavaJoinColumn.Owner owner)
           
 JavaJoinTable buildJavaJoinTable(JavaJoinTableJoiningStrategy parent)
           
 JavaLobConverter buildJavaLobConverter(JavaAttributeMapping parent, JavaResourcePersistentAttribute jrpa)
           
 JavaManyToManyMapping buildJavaManyToManyMapping(JavaPersistentAttribute parent)
           
 JavaManyToOneMapping buildJavaManyToOneMapping(JavaPersistentAttribute parent)
           
 JavaMappedSuperclass buildJavaMappedSuperclass(JavaPersistentType parent)
           
 JavaNamedNativeQuery buildJavaNamedNativeQuery(JavaJpaContextNode parent)
           
 JavaNamedQuery buildJavaNamedQuery(JavaJpaContextNode parent)
           
 JavaAttributeMapping buildJavaNullAttributeMapping(JavaPersistentAttribute parent)
           
 JavaConverter buildJavaNullConverter(JavaAttributeMapping parent)
           
 JavaTypeMapping buildJavaNullTypeMapping(JavaPersistentType parent)
           
 JavaOneToManyMapping buildJavaOneToManyMapping(JavaPersistentAttribute parent)
           
 JavaOneToOneMapping buildJavaOneToOneMapping(JavaPersistentAttribute parent)
           
 JavaOrderable buildJavaOrderable(JavaAttributeMapping parent, Orderable.Owner owner)
           
 JavaPersistentAttribute buildJavaPersistentAttribute(PersistentType parent, JavaResourcePersistentAttribute jrpa)
           
 JavaPersistentType buildJavaPersistentType(PersistentType.Owner owner, JavaResourcePersistentType jrpt)
           
 JavaPrimaryKeyJoinColumn buildJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, JavaBaseJoinColumn.Owner owner)
           
 JavaQueryContainer buildJavaQueryContainer(JavaJpaContextNode parent)
           
 JavaQueryHint buildJavaQueryHint(JavaQuery parent)
           
 JavaSecondaryTable buildJavaSecondaryTable(JavaEntity parent)
           
 JavaSequenceGenerator buildJavaSequenceGenerator(JavaJpaContextNode parent)
           
 JavaTable buildJavaTable(JavaEntity parent)
           
 JavaTableGenerator buildJavaTableGenerator(JavaJpaContextNode parent)
           
 JavaTemporalConverter buildJavaTemporalConverter(JavaAttributeMapping parent, JavaResourcePersistentAttribute jrpa)
           
 JavaTransientMapping buildJavaTransientMapping(JavaPersistentAttribute parent)
           
 JavaUniqueConstraint buildJavaUniqueConstraint(JavaJpaContextNode parent, UniqueConstraint.Owner owner)
           
 JavaVersionMapping buildJavaVersionMapping(JavaPersistentAttribute parent)
           
 AssociationOverrideAnnotation buildJavaVirtualAssociationOverrideAnnotation(JavaResourcePersistentMember jrpm, java.lang.String name, JoiningStrategy joiningStrategy)
           
 JpaDataSource buildJpaDataSource(JpaProject jpaProject, java.lang.String connectionProfileName)
           
 JpaFile buildJpaFile(JpaProject jpaProject, org.eclipse.core.resources.IFile file, org.eclipse.core.runtime.content.IContentType contentType, JpaResourceModel resourceModel)
          Construct a JPA file for the specified JPA project, file, content type, and resource model.
 JpaProject buildJpaProject(JpaProject.Config config)
          Construct a JpaProject for the specified config, to be added to the specified JPA project.
 MappingFile buildMappingFile(MappingFileRef parent, JpaXmlResource resource)
           
 PersistenceXml buildPersistenceXml(JpaRootContextNode parent, JpaXmlResource resource)
           
 JpaRootContextNode buildRootContextNode(JpaProject jpaProject)
          Build a (/an updated) root context node to be associated with the given JPA project.
 

Method Detail

buildJpaProject

JpaProject buildJpaProject(JpaProject.Config config)
Construct a JpaProject for the specified config, to be added to the specified JPA project. Return null if unable to create the JPA file (e.g. the content type is unrecognized).


buildJpaDataSource

JpaDataSource buildJpaDataSource(JpaProject jpaProject,
                                 java.lang.String connectionProfileName)

buildJpaFile

JpaFile buildJpaFile(JpaProject jpaProject,
                     org.eclipse.core.resources.IFile file,
                     org.eclipse.core.runtime.content.IContentType contentType,
                     JpaResourceModel resourceModel)
Construct a JPA file for the specified JPA project, file, content type, and resource model.


buildRootContextNode

JpaRootContextNode buildRootContextNode(JpaProject jpaProject)
Build a (/an updated) root context node to be associated with the given JPA project. The root context node will be built once, but updated many times.

See Also:
JpaProject.update(org.eclipse.core.runtime.IProgressMonitor)

buildPersistenceXml

PersistenceXml buildPersistenceXml(JpaRootContextNode parent,
                                   JpaXmlResource resource)

buildMappingFile

MappingFile buildMappingFile(MappingFileRef parent,
                             JpaXmlResource resource)

buildJavaPersistentType

JavaPersistentType buildJavaPersistentType(PersistentType.Owner owner,
                                           JavaResourcePersistentType jrpt)

buildJavaEntity

JavaEntity buildJavaEntity(JavaPersistentType parent)

buildJavaMappedSuperclass

JavaMappedSuperclass buildJavaMappedSuperclass(JavaPersistentType parent)

buildJavaEmbeddable

JavaEmbeddable buildJavaEmbeddable(JavaPersistentType parent)

buildJavaNullTypeMapping

JavaTypeMapping buildJavaNullTypeMapping(JavaPersistentType parent)

buildJavaPersistentAttribute

JavaPersistentAttribute buildJavaPersistentAttribute(PersistentType parent,
                                                     JavaResourcePersistentAttribute jrpa)

buildJavaBasicMapping

JavaBasicMapping buildJavaBasicMapping(JavaPersistentAttribute parent)

buildJavaEmbeddedIdMapping

JavaEmbeddedIdMapping buildJavaEmbeddedIdMapping(JavaPersistentAttribute parent)

buildJavaEmbeddedMapping

JavaEmbeddedMapping buildJavaEmbeddedMapping(JavaPersistentAttribute parent)

buildJavaGeneratorContainer

JavaGeneratorContainer buildJavaGeneratorContainer(JavaJpaContextNode parent)

buildJavaIdMapping

JavaIdMapping buildJavaIdMapping(JavaPersistentAttribute parent)

buildJavaManyToManyMapping

JavaManyToManyMapping buildJavaManyToManyMapping(JavaPersistentAttribute parent)

buildJavaManyToOneMapping

JavaManyToOneMapping buildJavaManyToOneMapping(JavaPersistentAttribute parent)

buildJavaOneToManyMapping

JavaOneToManyMapping buildJavaOneToManyMapping(JavaPersistentAttribute parent)

buildJavaOneToOneMapping

JavaOneToOneMapping buildJavaOneToOneMapping(JavaPersistentAttribute parent)

buildJavaTransientMapping

JavaTransientMapping buildJavaTransientMapping(JavaPersistentAttribute parent)

buildJavaVersionMapping

JavaVersionMapping buildJavaVersionMapping(JavaPersistentAttribute parent)

buildJavaNullAttributeMapping

JavaAttributeMapping buildJavaNullAttributeMapping(JavaPersistentAttribute parent)

buildJavaTable

JavaTable buildJavaTable(JavaEntity parent)

buildJavaJoinTable

JavaJoinTable buildJavaJoinTable(JavaJoinTableJoiningStrategy parent)

buildJavaColumn

JavaColumn buildJavaColumn(JavaJpaContextNode parent,
                           JavaBaseColumn.Owner owner)

buildJavaDiscriminatorColumn

JavaDiscriminatorColumn buildJavaDiscriminatorColumn(JavaEntity parent,
                                                     JavaDiscriminatorColumn.Owner owner)

buildJavaJoinColumn

JavaJoinColumn buildJavaJoinColumn(JavaJpaContextNode parent,
                                   JavaJoinColumn.Owner owner)

buildJavaSecondaryTable

JavaSecondaryTable buildJavaSecondaryTable(JavaEntity parent)

buildJavaSequenceGenerator

JavaSequenceGenerator buildJavaSequenceGenerator(JavaJpaContextNode parent)

buildJavaTableGenerator

JavaTableGenerator buildJavaTableGenerator(JavaJpaContextNode parent)

buildJavaGeneratedValue

JavaGeneratedValue buildJavaGeneratedValue(JavaIdMapping parent)

buildJavaPrimaryKeyJoinColumn

JavaPrimaryKeyJoinColumn buildJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent,
                                                       JavaBaseJoinColumn.Owner owner)

buildJavaAttributeOverrideContainer

JavaAttributeOverrideContainer buildJavaAttributeOverrideContainer(JavaJpaContextNode parent,
                                                                   JavaAttributeOverrideContainer.Owner owner)

buildJavaAttributeOverride

JavaAttributeOverride buildJavaAttributeOverride(JavaAttributeOverrideContainer parent,
                                                 JavaAttributeOverride.Owner owner)

buildJavaAssociationOverrideContainer

JavaAssociationOverrideContainer buildJavaAssociationOverrideContainer(JavaJpaContextNode parent,
                                                                       JavaAssociationOverrideContainer.Owner owner)

buildJavaAssociationOverride

JavaAssociationOverride buildJavaAssociationOverride(JavaAssociationOverrideContainer parent,
                                                     JavaAssociationOverride.Owner owner)

buildJavaAssociationOverrideRelationshipReference

JavaAssociationOverrideRelationshipReference buildJavaAssociationOverrideRelationshipReference(JavaAssociationOverride parent)

buildJavaQueryContainer

JavaQueryContainer buildJavaQueryContainer(JavaJpaContextNode parent)

buildJavaNamedQuery

JavaNamedQuery buildJavaNamedQuery(JavaJpaContextNode parent)

buildJavaNamedNativeQuery

JavaNamedNativeQuery buildJavaNamedNativeQuery(JavaJpaContextNode parent)

buildJavaQueryHint

JavaQueryHint buildJavaQueryHint(JavaQuery parent)

buildJavaUniqueConstraint

JavaUniqueConstraint buildJavaUniqueConstraint(JavaJpaContextNode parent,
                                               UniqueConstraint.Owner owner)

buildJavaEnumeratedConverter

JavaEnumeratedConverter buildJavaEnumeratedConverter(JavaAttributeMapping parent,
                                                     JavaResourcePersistentAttribute jrpa)

buildJavaTemporalConverter

JavaTemporalConverter buildJavaTemporalConverter(JavaAttributeMapping parent,
                                                 JavaResourcePersistentAttribute jrpa)

buildJavaLobConverter

JavaLobConverter buildJavaLobConverter(JavaAttributeMapping parent,
                                       JavaResourcePersistentAttribute jrpa)

buildJavaNullConverter

JavaConverter buildJavaNullConverter(JavaAttributeMapping parent)

buildJavaOrderable

JavaOrderable buildJavaOrderable(JavaAttributeMapping parent,
                                 Orderable.Owner owner)

buildJavaVirtualAssociationOverrideAnnotation

AssociationOverrideAnnotation buildJavaVirtualAssociationOverrideAnnotation(JavaResourcePersistentMember jrpm,
                                                                            java.lang.String name,
                                                                            JoiningStrategy joiningStrategy)