org.eclipse.jpt.core.resource.orm
Class OrmArtifactEdit

java.lang.Object
  extended by org.eclipse.wst.common.componentcore.ArtifactEdit
      extended by org.eclipse.jpt.core.resource.common.JpaArtifactEdit
          extended by org.eclipse.jpt.core.resource.orm.OrmArtifactEdit
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.wst.common.componentcore.IEditModelHandler

public class OrmArtifactEdit
extends JpaArtifactEdit

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.


Field Summary
 
Fields inherited from class org.eclipse.wst.common.componentcore.ArtifactEdit
ADAPTER_TYPE
 
Constructor Summary
OrmArtifactEdit(org.eclipse.core.resources.IProject aProject, boolean toAccessAsReadOnly)
           
 
Method Summary
static OrmArtifactEdit getArtifactEditForRead(org.eclipse.core.resources.IProject aProject)
           
static OrmArtifactEdit getArtifactEditForWrite(org.eclipse.core.resources.IProject aProject)
           
 OrmResource getResource(org.eclipse.core.resources.IFile file)
           
 OrmResource getResource(java.lang.String fileURI)
           
 
Methods inherited from class org.eclipse.wst.common.componentcore.ArtifactEdit
addListener, commandStackChanged, deleteResource, dispose, forceLoadKnownResources, getAdapter, getArtifactEditForRead, getArtifactEditForWrite, getCommandStack, getComponent, getContentModelRoot, getProject, getResource, hasEditModel, isBinary, isDirty, isProjectOfType, isReadOnly, isValid, isValidEditableModule, removeListener, save, saveIfNecessary, saveIfNecessaryWithPrompt, validateEdit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrmArtifactEdit

public OrmArtifactEdit(org.eclipse.core.resources.IProject aProject,
                       boolean toAccessAsReadOnly)
                throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

getArtifactEditForRead

public static OrmArtifactEdit getArtifactEditForRead(org.eclipse.core.resources.IProject aProject)
Parameters:
aProject -
Returns:
an orm artifact for the project aProject. Opened only for read access (no write)

getArtifactEditForWrite

public static OrmArtifactEdit getArtifactEditForWrite(org.eclipse.core.resources.IProject aProject)
Parameters:
aProject -
Returns:
an orm artifact for the project aProject. Opened for both write and read access

getResource

public OrmResource getResource(org.eclipse.core.resources.IFile file)
Specified by:
getResource in class JpaArtifactEdit
Returns:
a resource for the given file

getResource

public OrmResource getResource(java.lang.String fileURI)
Specified by:
getResource in class JpaArtifactEdit
Parameters:
fileURI - - this must be in a deployment relevant form (e.g "META-INF/persistence.xml" instead of "src/META-INF/persistence.xml")
Returns:
a resource for the given deployment file URI