org.eclipse.jpt.jpa.eclipselink.core.context.persistence
Class EclipseLinkPersistenceUnit

java.lang.Object
  extended by org.eclipse.jpt.common.utility.internal.model.AbstractModel
      extended by org.eclipse.jpt.jpa.core.internal.AbstractJpaNode
          extended by org.eclipse.jpt.jpa.core.internal.context.AbstractJpaContextNode
              extended by org.eclipse.jpt.jpa.core.internal.context.AbstractXmlContextNode
                  extended by org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceXmlContextNode
                      extended by org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit
                          extended by org.eclipse.jpt.jpa.eclipselink.core.context.persistence.EclipseLinkPersistenceUnit
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IResourcePart, Model, JpaContextNode, PersistenceUnit, PersistentTypeContainer, XmlContextNode, PersistenceUnit2_0, MetamodelSynchronizer, JpaNode, JpaStructureNode

public class EclipseLinkPersistenceUnit
extends org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

EclipseLink persistence unit


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit
PersistenceUnit.Property
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.jpa2.MetamodelSynchronizer
MetamodelSynchronizer.Null
 
Field Summary
static java.lang.String CONVERTERS_COLLECTION
          Identifier for changes to the list of global converter definitions.
static java.lang.String IMPLIED_ECLIPSELINK_MAPPING_FILE_REF_PROPERTY
          String constant associated with changes to the implied eclipselink mapping file ref
 
Fields inherited from class org.eclipse.jpt.jpa.core.internal.AbstractJpaNode
EMPTY_STRING_ARRAY
 
Fields inherited from interface org.eclipse.jpt.jpa.core.jpa2.context.persistence.PersistenceUnit2_0
DEFAULT_DELIMITED_IDENTIFIERS_PROPERTY, DEFAULT_SHARED_CACHE_MODE_PROPERTY, DEFAULT_VALIDATION_MODE, DEFAULT_VALIDATION_MODE_PROPERTY, SPECIFIED_SHARED_CACHE_MODE_PROPERTY, SPECIFIED_VALIDATION_MODE_PROPERTY
 
Fields inherited from interface org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit
DEFAULT_ACCESS_PROPERTY, DEFAULT_CASCADE_PERSIST_PROPERTY, DEFAULT_CATALOG_PROPERTY, DEFAULT_EXCLUDE_UNLISTED_CLASSES_PROPERTY, DEFAULT_SCHEMA_PROPERTY, DEFAULT_TRANSACTION_TYPE_PROPERTY, DESCRIPTION_PROPERTY, GENERATORS_COLLECTION, IMPLIED_CLASS_REFS_COLLECTION, IMPLIED_MAPPING_FILE_REF_PROPERTY, JAR_FILE_REFS_LIST, JTA_DATA_SOURCE_PROPERTY, NAME_PROPERTY, NON_JTA_DATA_SOURCE_PROPERTY, PROPERTIES_LIST, PROVIDER_PROPERTY, QUERIES_COLLECTION, SPECIFIED_CLASS_REFS_LIST, SPECIFIED_EXCLUDE_UNLISTED_CLASSES_PROPERTY, SPECIFIED_MAPPING_FILE_REFS_LIST, SPECIFIED_TRANSACTION_TYPE_PROPERTY, XML_MAPPING_METADATA_COMPLETE_PROPERTY
 
Fields inherited from interface org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer
TRANSFORMER
 
Constructor Summary
EclipseLinkPersistenceUnit(Persistence parent, XmlPersistenceUnit xmlPersistenceUnit)
           
 
Method Summary
 void addConverter(EclipseLinkConverter converter)
          Add the converter definition (defined elsewhere) to the list of converters defined within this persistence unit.
 java.util.ListIterator<EclipseLinkConverter> allConverters()
          Return an iterator on all converters defined within this persistence unit, included duplicately named converters definitions.
 boolean calculateDefaultCacheable()
           
 int convertersSize()
           
 Caching getCaching()
           
 Connection getConnection()
           
 EclipseLinkPersistenceXmlContextNodeFactory getContextNodeFactory()
           
 Customization getCustomization()
           
 GeneralProperties getGeneralProperties()
           
 MappingFileRef getImpliedEclipseLinkMappingFileRef()
           
 EclipseLinkJpaProject getJpaProject()
          Return the JPA project the node belongs to.
 Logging getLogging()
           
 Options getOptions()
           
 SchemaGeneration getSchemaGeneration()
           
 java.lang.Iterable<java.lang.String> getUniqueConverterNames()
          Return the names of the converters defined in the persistence unit, with duplicates removed.
 int mappingFileRefsSize()
          Return the size of the persistence unit's list of mapping file refs, both specified and implied.
 void propertyRemoved(java.lang.String propertyName)
           
 void propertyValueChanged(java.lang.String propertyName, java.lang.String newValue)
          Call back method for Property value changing.
 void setSpecifiedSharedCacheMode(SharedCacheMode specifiedSharedCacheMode)
          Set the persistence unit's specified shared cache mode.
 void update()
          Some non-trivial state in the JPA project has changed; update the parts of the context node that are dependent on yet other parts of the node's JPA project.
 
Methods inherited from class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit
addGenerator, addJarFileRef, addJarFileRef, addProperty, addProperty, addQuery, addSpecifiedClassRef, addSpecifiedClassRef, addSpecifiedMappingFileRef, addSpecifiedMappingFileRef, classRefs, classRefsSize, containsOffset, createDeleteMappingFileEdits, createDeleteTypeEdits, createMoveFolderEdits, createMoveMappingFileEdits, createMoveTypeEdits, createRenameFolderEdits, createRenameMappingFileEdits, createRenamePackageEdits, createRenameTypeEdits, dispose, disposeMetamodel, excludesUnlistedClasses, findInsertLocationForMappingFileRef, generators, generatorsSize, getDefaultAccess, getDefaultCascadePersist, getDefaultCatalog, getDefaultDelimitedIdentifiers, getDefaultExcludeUnlistedClasses, getDefaultSchema, getDefaultSharedCacheMode, getDefaultTransactionType, getDefaultValidationMode, getDescription, getEmbeddable, getEntities, getEntity, getId, getImpliedMappingFileRef, getJavaEntities, getJtaDataSource, getName, getNonJtaDataSource, getOrmEntities, getOrmMappedClassNames, getParent, getPersistenceUnit, getPersistentType, getPersistentTypes, getPropertiesNamed, getProperty, getProvider, getSelectionTextRange, getSharedCacheMode, getSpecifiedExcludeUnlistedClasses, getSpecifiedSharedCacheMode, getSpecifiedTransactionType, getSpecifiedValidationMode, getStructureNode, getTransactionType, getUniqueGeneratorNames, getValidationMode, getValidationTextRange, getXmlPersistenceUnit, impliedClassRefs, impliedClassRefsSize, initializeMetamodel, isXmlMappingMetadataComplete, jarFileRefs, jarFileRefsSize, javaEntityNames, javaEntityNamesExclOverridden, mapEntityNameToClassNames, mappingFileRefs, mappingFileRefsContaining, ormEntityNames, properties, propertiesSize, propertiesWithNamePrefix, propertyNameChanged, queries, queriesSize, removeJarFileRef, removeJarFileRef, removeProperty, removeProperty, removeProperty, removeSpecifiedClassRef, removeSpecifiedClassRef, removeSpecifiedMappingFileRef, removeSpecifiedMappingFileRef, setDescription, setJtaDataSource, setName, setNonJtaDataSource, setProperty, setProperty, setProvider, setSpecifiedExcludeUnlistedClasses, setSpecifiedTransactionType, setSpecifiedValidationMode, specifiedClassRefs, specifiedClassRefsSize, specifiedMappingFileRefs, specifiedMappingFileRefsSize, specifiesPersistentType, synchronizeMetamodel, synchronizeWithResourceModel, toString, validate, validatesAgainstDatabase
 
Methods inherited from class org.eclipse.jpt.jpa.core.internal.context.AbstractJpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getResourceType
 
Methods inherited from class org.eclipse.jpt.jpa.core.internal.AbstractJpaNode
getAdapter, getResource, stateChanged
 
Methods inherited from class org.eclipse.jpt.common.utility.internal.model.AbstractModel
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, hasAnyChangeListeners, hasAnyCollectionChangeListeners, hasAnyListChangeListeners, hasAnyPropertyChangeListeners, hasAnyStateChangeListeners, hasAnyTreeChangeListeners, hasNoChangeListeners, hasNoCollectionChangeListeners, hasNoListChangeListeners, hasNoPropertyChangeListeners, hasNoStateChangeListeners, hasNoTreeChangeListeners, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getResourceType
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaNode
stateChanged
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.common.core.IResourcePart
getResource
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
getResourceType
 

Field Detail

IMPLIED_ECLIPSELINK_MAPPING_FILE_REF_PROPERTY

public static final java.lang.String IMPLIED_ECLIPSELINK_MAPPING_FILE_REF_PROPERTY
String constant associated with changes to the implied eclipselink mapping file ref

See Also:
Constant Field Values

CONVERTERS_COLLECTION

public static final java.lang.String CONVERTERS_COLLECTION
Identifier for changes to the list of global converter definitions. Note that there are no granular changes to this list. There is only notification that the entire list has changed.

See Also:
Constant Field Values
Constructor Detail

EclipseLinkPersistenceUnit

public EclipseLinkPersistenceUnit(Persistence parent,
                                  XmlPersistenceUnit xmlPersistenceUnit)
Method Detail

update

public void update()
Description copied from interface: JpaContextNode
Some non-trivial state in the JPA project has changed; update the parts of the context node that are dependent on yet other parts of the node's JPA project. If the dependent state changes also, yet another update will be triggered, possibly followed by yet more updates; until the JPA project's state quiesces.

Specified by:
update in interface JpaContextNode
Overrides:
update in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

getGeneralProperties

public GeneralProperties getGeneralProperties()

getConnection

public Connection getConnection()
Specified by:
getConnection in interface PersistenceUnit2_0
Overrides:
getConnection in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

getCustomization

public Customization getCustomization()

getCaching

public Caching getCaching()

getLogging

public Logging getLogging()

getOptions

public Options getOptions()
Specified by:
getOptions in interface PersistenceUnit2_0
Overrides:
getOptions in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

getSchemaGeneration

public SchemaGeneration getSchemaGeneration()

propertyValueChanged

public void propertyValueChanged(java.lang.String propertyName,
                                 java.lang.String newValue)
Description copied from interface: PersistenceUnit
Call back method for Property value changing.

Specified by:
propertyValueChanged in interface PersistenceUnit
Overrides:
propertyValueChanged in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

propertyRemoved

public void propertyRemoved(java.lang.String propertyName)
Overrides:
propertyRemoved in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

mappingFileRefsSize

public int mappingFileRefsSize()
Description copied from interface: PersistenceUnit
Return the size of the persistence unit's list of mapping file refs, both specified and implied.

Specified by:
mappingFileRefsSize in interface PersistenceUnit
Overrides:
mappingFileRefsSize in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

getImpliedEclipseLinkMappingFileRef

public MappingFileRef getImpliedEclipseLinkMappingFileRef()

addConverter

public void addConverter(EclipseLinkConverter converter)
Add the converter definition (defined elsewhere) to the list of converters defined within this persistence unit. Note that this should only be called during the process of updating the local converter definition. No change notification accompanies this action specifically.


allConverters

public java.util.ListIterator<EclipseLinkConverter> allConverters()
Return an iterator on all converters defined within this persistence unit, included duplicately named converters definitions.


convertersSize

public int convertersSize()

getUniqueConverterNames

public java.lang.Iterable<java.lang.String> getUniqueConverterNames()
Return the names of the converters defined in the persistence unit, with duplicates removed.


getJpaProject

public EclipseLinkJpaProject getJpaProject()
Description copied from interface: JpaNode
Return the JPA project the node belongs to.

Specified by:
getJpaProject in interface JpaNode
Overrides:
getJpaProject in class org.eclipse.jpt.jpa.core.internal.AbstractJpaNode

getContextNodeFactory

public EclipseLinkPersistenceXmlContextNodeFactory getContextNodeFactory()
Overrides:
getContextNodeFactory in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceXmlContextNode

setSpecifiedSharedCacheMode

public void setSpecifiedSharedCacheMode(SharedCacheMode specifiedSharedCacheMode)
Description copied from interface: PersistenceUnit2_0
Set the persistence unit's specified shared cache mode.

Specified by:
setSpecifiedSharedCacheMode in interface PersistenceUnit2_0
Overrides:
setSpecifiedSharedCacheMode in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

calculateDefaultCacheable

public boolean calculateDefaultCacheable()
Specified by:
calculateDefaultCacheable in interface PersistenceUnit2_0
Overrides:
calculateDefaultCacheable in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit