org.eclipse.jpt.core.context.persistence
Interface PersistenceXml

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IResourcePart, JpaContextNode, JpaNode, JpaStructureNode, Model, XmlContextNode

public interface PersistenceXml
extends XmlContextNode, JpaStructureNode

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
static java.lang.String PERSISTENCE_PROPERTY
          String constant associated with changes to the persistence property
 
Method Summary
 Persistence addPersistence()
          Add a persistence node to the persistence.xml file and return the object representing it.
 Persistence getPersistence()
          Return the content represented by the root of the persistence.xml file.
 JpaXmlResource getXmlResource()
          Return the resource model object
 void removePersistence()
          Remove the persistence node from the persistence.xml file.
 void update(JpaXmlResource resource)
          Update the PersistenceXml context model object to match the JpaXmlResource resource model object.
 
Methods inherited from interface org.eclipse.jpt.core.context.XmlContextNode
getValidationTextRange, validate
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit, postUpdate
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addCollectionChangeListener, addCollectionChangeListener, addListChangeListener, addListChangeListener, addPropertyChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, addTreeChangeListener, removeCollectionChangeListener, removeCollectionChangeListener, removeListChangeListener, removeListChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.core.IResourcePart
getResource
 
Methods inherited from interface org.eclipse.jpt.core.JpaStructureNode
dispose, getContentType, getId, getSelectionTextRange, getStructureNode
 

Field Detail

PERSISTENCE_PROPERTY

static final java.lang.String PERSISTENCE_PROPERTY
String constant associated with changes to the persistence property

See Also:
Constant Field Values
Method Detail

getPersistence

Persistence getPersistence()
Return the content represented by the root of the persistence.xml file. This may be null.


addPersistence

Persistence addPersistence()
Add a persistence node to the persistence.xml file and return the object representing it. Throws IllegalStateException if a persistence node already exists.


removePersistence

void removePersistence()
Remove the persistence node from the persistence.xml file. Throws IllegalStateException if a persistence node does not exist.


getXmlResource

JpaXmlResource getXmlResource()
Return the resource model object


update

void update(JpaXmlResource resource)
Update the PersistenceXml context model object to match the JpaXmlResource resource model object. see JpaProject.update()