Dali Provisional API
Release 3.2

org.eclipse.jpt.jpa.core.context.persistence
Interface Persistence

All Superinterfaces:
IAdaptable, JpaContextModel, JpaModel, JpaStructureNode, JptResourceTypeReference, Model, XmlFile.Root
All Known Subinterfaces:
Persistence2_0

public interface Persistence
extends XmlFile.Root

Context model corresponding to the XML resource model XmlPersistence, which corresponds to the persistence element in the persistence.xml file.

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
JpaStructureNode.ContextType
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.JpaModel
JpaModel.JpaVersionIsCompatibleWith
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
JptResourceTypeReference.ResourceTypeIsKindOf, JptResourceTypeReference.ResourceTypeTransformer
 
Field Summary
static String PERSISTENCE_UNITS_LIST
          String constant associated with changes to the persistence units list
 
Fields inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
CHILDREN_COLLECTION
 
Fields inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
TRANSFORMER
 
Method Summary
 PersistenceUnit addPersistenceUnit()
          Add a persistence unit and return it.
 PersistenceUnit addPersistenceUnit(int index)
          Add a persistence unit at the specified index and return it.
 void dispose()
           
 PersistenceXml getParent()
          Covariant override.
 PersistenceUnit getPersistenceUnit(int index)
          Return the persistence unit at the specified index.
 org.eclipse.jpt.common.utility.iterable.ListIterable<PersistenceUnit> getPersistenceUnits()
          Return the persistence element's persistence units.
 int getPersistenceUnitsSize()
          Return the number of persistence units.
 PersistenceXml getPersistenceXml()
           
 org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence getXmlPersistence()
          Return the resource model object associated with this context model object
 void removePersistenceUnit(int index)
          Remove the persistence unit at the specified index from the persistence node.
 void removePersistenceUnit(PersistenceUnit persistenceUnit)
          Remove the specified persistence unit from the persistence node.
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
addRootStructureNodesTo, containsOffset, getChildren, getChildrenSize, getContextType, getFullTextRange, getSelectionTextRange, getStructureNode, getType
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaContextModel
getCompletionProposals, getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit, getValidationTextRange, synchronizeWithResourceModel, update, validate
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaModel
getJpaPlatform, getJpaProject, getJpaProjectManager, getResource, stateChanged
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
getResourceType
 

Field Detail

PERSISTENCE_UNITS_LIST

static final String PERSISTENCE_UNITS_LIST
String constant associated with changes to the persistence units list

See Also:
Constant Field Values
Method Detail

getXmlPersistence

org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence getXmlPersistence()
Return the resource model object associated with this context model object


getParent

PersistenceXml getParent()
Covariant override.

Specified by:
getParent in interface JpaContextModel
Specified by:
getParent in interface JpaModel

getPersistenceXml

PersistenceXml getPersistenceXml()

getPersistenceUnits

org.eclipse.jpt.common.utility.iterable.ListIterable<PersistenceUnit> getPersistenceUnits()
Return the persistence element's persistence units.


getPersistenceUnitsSize

int getPersistenceUnitsSize()
Return the number of persistence units.


getPersistenceUnit

PersistenceUnit getPersistenceUnit(int index)
Return the persistence unit at the specified index.


addPersistenceUnit

PersistenceUnit addPersistenceUnit()
Add a persistence unit and return it.


addPersistenceUnit

PersistenceUnit addPersistenceUnit(int index)
Add a persistence unit at the specified index and return it.


removePersistenceUnit

void removePersistenceUnit(PersistenceUnit persistenceUnit)
Remove the specified persistence unit from the persistence node.


removePersistenceUnit

void removePersistenceUnit(int index)
Remove the persistence unit at the specified index from the persistence node.


dispose

void dispose()

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.