org.eclipse.jpt.core.jpa2
Interface MetamodelSynchronizer
- All Known Subinterfaces:
- JpaProject2_0, JpaRootContextNode2_0, Persistence2_0, PersistenceUnit2_0, PersistenceXml2_0
- All Known Implementing Classes:
- MetamodelSynchronizer.Null
public interface MetamodelSynchronizer
JPA 2.0 Canonical Metamodel synchronizer.
Notes:
-
When a JPA project is first created (e.g. when the user adds the JPA
Facet to a Faceted project or when a workspace containing a JPA project is
opened), if it is configured to generate the
Canonical Metamodel (i.e. its metamodel source folder is non-null), it will
first discover what metamodel classes are already present in the metamodel
source folder. Any class appropriately annotated with
javax.persistence.metamodel.StaticMetamodel
and javax.annotation.Generated
will be added to the Canonical Metamodel
(see org.eclipse.jpt.core.internal.resource.java.source.SourcePersistentType#isGeneratedMetamodel()).
Once the JPA project's context model is constructed, a new Canonical
Metamodel is generated and merged with the classes already present in the
metamodel source folder.
-
When a JPA project's metamodel source folder setting is cleared, the Canonical
Metamodel is cleared from the context model, but the generated source files are
left in place.
-
When a JPA project's metamodel source folder is set to a non-null value,
like when a JPA project is first created, the resulting Canonical Metamodel
will be merged with whatever is already present in the folder.
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.3
- Version:
- 2.3
|
Nested Class Summary |
static class |
MetamodelSynchronizer.Null
Singleton implemetation of the metamodel synchronizer interface that
does nothing. |
initializeMetamodel
void initializeMetamodel()
synchronizeMetamodel
void synchronizeMetamodel()
disposeMetamodel
void disposeMetamodel()