|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JpaProject
A JPA project is associated with an Eclipse project (and its corresponding Java project). It holds the "resource" model that corresponds to the various JPA-related resources (the persistence.xml file, its mapping files [orm.xml], and the Java source files). It also holds the "context" model that represents the JPA metadata, as derived from spec-defined defaults, Java source code annotations, and XML descriptors. 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.
| Nested Class Summary | |
|---|---|
static interface |
JpaProject.Config
The settings used to construct a JPA project. |
static interface |
JpaProject.Updater
Define a strategy that can be used to "update" a JPA project whenever something changes. |
| Field Summary | |
|---|---|
static java.lang.String |
DISCOVERS_ANNOTATED_CLASSES_PROPERTY
ID string used when discoversAnnotatedClasses property is changed. |
static java.lang.String |
EXTERNAL_JAVA_RESOURCE_COMPILATION_UNITS_COLLECTION
ID string used when the JPA project's collection of external Java resource compilation units changes. |
static java.lang.String |
JPA_FILES_COLLECTION
ID string used when the JPA project's collection of JPA files changes. |
static java.lang.String |
USER_OVERRIDE_DEFAULT_CATALOG_PROPERTY
ID string used when the JPA project's user override default catalog changes. |
static java.lang.String |
USER_OVERRIDE_DEFAULT_SCHEMA_PROPERTY
ID string used when the JPA project's user override default schema changes. |
| Method Summary | |
|---|---|
java.util.Iterator<java.lang.String> |
annotatedClassNames()
Return the names of the JPA project's annotated Java classes (ignoring classes in JARs referenced in the persistence.xml). |
org.eclipse.core.resources.IFile |
convertToPlatformFile(java.lang.String fileName)
|
boolean |
discoversAnnotatedClasses()
Return whether the JPA project will "discover" annotated classes automatically, as opposed to requiring the classes to be listed in the persistence.xml or one of its mapping files. |
void |
dispose()
The JPA project has been removed from the JPA model. |
java.util.Iterator<JavaResourceCompilationUnit> |
externalJavaResourceCompilationUnits()
Return the JPA project's external Java resource compilation units. |
int |
externalJavaResourceCompilationUnitsSize()
Return the size of the JPA project's external Java resource compilation units. |
ConnectionProfile |
getConnectionProfile()
Return the JPA project's connection. |
JpaDataSource |
getDataSource()
Return the data source the JPA project is mapped to. |
java.lang.String |
getDefaultCatalog()
Return the JPA project's default catalog; which is either the user override catalog or the database's default catalog. |
Catalog |
getDefaultDbCatalog()
Return the JPA project's default database catalog. |
Schema |
getDefaultDbSchema()
Return the JPA project's default database schema. |
SchemaContainer |
getDefaultDbSchemaContainer()
Return the JPA project's default database schema container; which is either the JPA project's default catalog or the JPA project's database, depending on how the DTP model is implemented. |
JpaXmlResource |
getDefaultOrmXmlResource()
Return the XML resource model corresponding to the file 'META-INF/orm.xml' if that file has the mapping file content type. |
java.lang.String |
getDefaultSchema()
Return the JPA project's default schema; which can be one of the following: - the user override schema - the default catalog's default schema - the database's default schema (if catalogs are not supported) |
JavaResourcePersistentTypeCache |
getExternalJavaResourcePersistentTypeCache()
Return the JPA project's external Java resource persistent type cache. |
org.eclipse.jdt.core.IJavaProject |
getJavaProject()
Return the Java project associated with the JPA project. |
JavaResourcePackageFragmentRoot |
getJavaResourcePackageFragmentRoot(java.lang.String jarFileName)
Return the Java resource package fragement root for the specified JAR. |
JavaResourcePersistentType |
getJavaResourcePersistentType(java.lang.String typeName)
Return the Java resource persistent type for the specified type. |
JpaFile |
getJpaFile(org.eclipse.core.resources.IFile file)
Return the JPA file corresponding to the specified file. |
JpaPlatform |
getJpaPlatform()
Return the vendor-specific JPA platform that builds the JPA project and its contents. |
JpaXmlResource |
getMappingFileXmlResource(java.lang.String filePath)
Return the XML resource model corresponding to the specified file if that file has the mapping file content type (org.eclipse.jpt.core.content.mappingFile) |
CommandExecutor |
getModifySharedDocumentCommandExecutor()
Return the project-wide implementation of the CommandExecutor interface. |
java.lang.String |
getName()
Return the JPA project's name, which is the same as the associated Eclipse project's name. |
JpaXmlResource |
getPersistenceXmlResource()
Return the XML resource model corresponding to the file 'META-INF/persistence.xml' if that file has the persistence content type (org.eclipse.jpt.core.content.persistence). |
org.eclipse.core.resources.IProject |
getProject()
Return the Eclipse project associated with the JPA project. |
JpaRootContextNode |
getRootContextNode()
Return the root of the JPA project's context model. |
JpaProject.Updater |
getUpdater()
Return the implementation of the Updater interface that will be used to "update" the JPA project. |
java.lang.String |
getUserOverrideDefaultCatalog()
Return the name of the catalog to be used as a default for the JPA project instead of the one that is associated by default with the connection profile. |
java.lang.String |
getUserOverrideDefaultSchema()
Return the name of the schema to be used as a default for the project instead of the one that is associated by default with the connection profile. |
void |
javaElementChanged(org.eclipse.jdt.core.ElementChangedEvent event)
Synchronize the JPA project with the specified Java change. |
java.util.Iterator<JpaFile> |
jpaFiles()
Return the JPA project's JPA files. |
int |
jpaFilesSize()
Return the size of the JPA project's JPA files. |
void |
projectChanged(org.eclipse.core.resources.IResourceDelta delta)
Synchronize the JPA project with the specified project resource delta, watching for added and removed files in particular. |
void |
setDiscoversAnnotatedClasses(boolean discoversAnnotatedClasses)
Set whether the JPA project will "discover" annotated classes automatically, as opposed to requiring the classes to be listed in the persistence.xml. |
void |
setThreadLocalModifySharedDocumentCommandExecutor(CommandExecutor commandExecutor)
Set a thread-specific implementation of the CommandExecutor interface that will be used to execute a command to modify a shared document. |
void |
setUpdater(JpaProject.Updater updater)
Set the implementation of the Updater interface that will be used to "update" the JPA project. |
void |
setUserOverrideDefaultCatalog(java.lang.String catalog)
Set the name of the catalog to be used as a default for the project instead of the one that is associated by default with the connection profile. |
void |
setUserOverrideDefaultSchema(java.lang.String schema)
Set the name of the schema to be used as a default for the project instead of the one that is associated by default with the connection profile. |
void |
update()
The JPA project's state has changed, "update" those parts of the JPA project that are dependent on other parts of the JPA project. |
org.eclipse.core.runtime.IStatus |
update(org.eclipse.core.runtime.IProgressMonitor monitor)
This is the callback used by the updater to perform the actual "update", which most likely will happen asynchronously. |
java.util.Iterator<org.eclipse.wst.validation.internal.provisional.core.IMessage> |
validationMessages(org.eclipse.wst.validation.internal.provisional.core.IReporter reporter)
Return JPA project's validation messages. |
| Methods inherited from interface org.eclipse.jpt.core.JpaNode |
|---|
getJpaProject, getParent |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Methods inherited from interface org.eclipse.jpt.core.IResourcePart |
|---|
getResource |
| Field Detail |
|---|
static final java.lang.String JPA_FILES_COLLECTION
Model.addCollectionChangeListener(String, org.eclipse.jpt.utility.model.listener.CollectionChangeListener),
Constant Field Valuesstatic final java.lang.String EXTERNAL_JAVA_RESOURCE_COMPILATION_UNITS_COLLECTION
Model.addCollectionChangeListener(String, org.eclipse.jpt.utility.model.listener.CollectionChangeListener),
Constant Field Valuesstatic final java.lang.String USER_OVERRIDE_DEFAULT_CATALOG_PROPERTY
Model.addPropertyChangeListener(String, org.eclipse.jpt.utility.model.listener.PropertyChangeListener),
Constant Field Valuesstatic final java.lang.String USER_OVERRIDE_DEFAULT_SCHEMA_PROPERTY
Model.addPropertyChangeListener(String, org.eclipse.jpt.utility.model.listener.PropertyChangeListener),
Constant Field Valuesstatic final java.lang.String DISCOVERS_ANNOTATED_CLASSES_PROPERTY
Model.addPropertyChangeListener(String, org.eclipse.jpt.utility.model.listener.PropertyChangeListener),
Constant Field Values| Method Detail |
|---|
java.lang.String getName()
org.eclipse.core.resources.IProject getProject()
org.eclipse.jdt.core.IJavaProject getJavaProject()
JpaPlatform getJpaPlatform()
JpaRootContextNode getRootContextNode()
void dispose()
java.util.Iterator<JpaFile> jpaFiles()
int jpaFilesSize()
JpaFile getJpaFile(org.eclipse.core.resources.IFile file)
java.util.Iterator<JavaResourceCompilationUnit> externalJavaResourceCompilationUnits()
int externalJavaResourceCompilationUnitsSize()
JavaResourcePersistentTypeCache getExternalJavaResourcePersistentTypeCache()
JpaXmlResource getPersistenceXmlResource()
JptCorePlugin.DEFAULT_PERSISTENCE_XML_FILE_PATHJpaXmlResource getMappingFileXmlResource(java.lang.String filePath)
JpaXmlResource getDefaultOrmXmlResource()
JptCorePlugin.DEFAULT_ORM_XML_FILE_PATHjava.util.Iterator<java.lang.String> annotatedClassNames()
JavaResourcePersistentType getJavaResourcePersistentType(java.lang.String typeName)
JavaResourcePackageFragmentRoot getJavaResourcePackageFragmentRoot(java.lang.String jarFileName)
void projectChanged(org.eclipse.core.resources.IResourceDelta delta)
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionvoid javaElementChanged(org.eclipse.jdt.core.ElementChangedEvent event)
JpaProject.Updater getUpdater()
void setUpdater(JpaProject.Updater updater)
void update()
org.eclipse.core.runtime.IStatus update(org.eclipse.core.runtime.IProgressMonitor monitor)
org.eclipse.core.resources.IFile convertToPlatformFile(java.lang.String fileName)
java.util.Iterator<org.eclipse.wst.validation.internal.provisional.core.IMessage> validationMessages(org.eclipse.wst.validation.internal.provisional.core.IReporter reporter)
JpaDataSource getDataSource()
ConnectionProfile getConnectionProfile()
SchemaContainer getDefaultDbSchemaContainer()
java.lang.String getDefaultCatalog()
Catalog getDefaultDbCatalog()
getDefaultCatalog()java.lang.String getDefaultSchema()
Schema getDefaultDbSchema()
getDefaultSchema(),
getDefaultDbSchemaContainer()java.lang.String getUserOverrideDefaultCatalog()
void setUserOverrideDefaultCatalog(java.lang.String catalog)
java.lang.String getUserOverrideDefaultSchema()
void setUserOverrideDefaultSchema(java.lang.String schema)
boolean discoversAnnotatedClasses()
void setDiscoversAnnotatedClasses(boolean discoversAnnotatedClasses)
void setThreadLocalModifySharedDocumentCommandExecutor(CommandExecutor commandExecutor)
CommandExecutor getModifySharedDocumentCommandExecutor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||