Dali Provisional API
Release 3.2

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.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:
IAdaptable, JptResourceTypeReference, Model, DeleteTypeRefactoringParticipant, JpaContextNode, ManagedTypeContainer, MappingFileRefactoringParticipant, PersistenceUnit, PersistentTypeContainer, TypeRefactoringParticipant, PersistenceUnit2_0, MetamodelSynchronizer, org.eclipse.jpt.jpa.core.jpa2_1.context.persistence.PersistenceUnit2_1, JpaNode, JpaStructureNode

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

EclipseLink persistence unit


Nested Class Summary
static class EclipseLinkPersistenceUnit.MappingFileConvertersTransformer
           
static class EclipseLinkPersistenceUnit.PropertyNameDoesNotEndWith
           
static class EclipseLinkPersistenceUnit.TypeMappingConverterTransformer
           
 
Nested classes/interfaces inherited from class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit
org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.ImpliedClassRefContainer, org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.JarFileRefContainer, org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.MappedType, org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.MappingFileRefContains, org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.NonPersistentMetamodelSourceType, org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.PropertyContainer, org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.SpecifiedClassRefContainer, org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.SpecifiedMappingFileRefContainer, org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.SpecifiesManagedType
 
Nested classes/interfaces inherited from class org.eclipse.jpt.jpa.core.internal.AbstractJpaNode
org.eclipse.jpt.jpa.core.internal.AbstractJpaNode.AbstractContextCollectionContainer<C extends JpaContextNode,R>, org.eclipse.jpt.jpa.core.internal.AbstractJpaNode.CollectionContainer<C,R>, org.eclipse.jpt.jpa.core.internal.AbstractJpaNode.ContextCollectionContainer<C extends JpaContextNode,R>, org.eclipse.jpt.jpa.core.internal.AbstractJpaNode.ContextListContainer<C extends JpaContextNode,R>, org.eclipse.jpt.jpa.core.internal.AbstractJpaNode.ListContainer<C,R>
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit
PersistenceUnit.NameTransformer, PersistenceUnit.Property
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
JpaStructureNode.ContextType
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
JptResourceTypeReference.ResourceTypeTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer
PersistentTypeContainer.PersistentTypesTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.persistence.MappingFileRefactoringParticipant
MappingFileRefactoringParticipant.DeleteMappingFileEditsTransformer, MappingFileRefactoringParticipant.MoveFolderEditsTransformer, MappingFileRefactoringParticipant.MoveMappingFileEditsTransformer, MappingFileRefactoringParticipant.RenameFolderEditsTransformer, MappingFileRefactoringParticipant.RenameMappingFileEditsTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.DeleteTypeRefactoringParticipant
DeleteTypeRefactoringParticipant.DeleteTypeEditsTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.TypeRefactoringParticipant
TypeRefactoringParticipant.MoveTypeEditsTransformer, TypeRefactoringParticipant.RenamePackageEditsTransformer, TypeRefactoringParticipant.RenameTypeEditsTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.jpa2.MetamodelSynchronizer
MetamodelSynchronizer.MetamodelTools, MetamodelSynchronizer.Null
 
Field Summary
protected  Vector<EclipseLinkConverter> converters
           
static String CONVERTERS_COLLECTION
          String constant associated with changes to the persistence unit's collection of "global" converters.
static String DEFAULT_GET_METHOD_PROPERTY
          String constant associated with changes to the persistence unit's default get method.
static String DEFAULT_SET_METHOD_PROPERTY
          String constant associated with changes to the persistence unit's default set method.
static String DEFAULT_TENANT_DISCRIMINATOR_COLUMNS_LIST
          String constant associated with changes to the persistence unit's list of default tenant discriminator Columns
protected  String defaultGetMethod
           
protected  String defaultSetMethod
           
protected  Vector<ReadOnlyTenantDiscriminatorColumn2_3> defaultTenantDiscriminatorColumns
           
static String IMPLIED_ECLIPSELINK_MAPPING_FILE_REF_PROPERTY
          String constant associated with changes to the implied eclipselink mapping file ref
protected  MappingFileRef impliedEclipseLinkMappingFileRef
          Will be null if the implied EL mapping file should not be part of the context model.
static org.eclipse.jpt.common.utility.transformer.Transformer<MappingFile,Iterable<EclipseLinkConverter>> MAPPING_FILE_CONVERTERS_TRANSFORMER
           
protected  MappingFileRef potentialImpliedEclipseLinkMappingFileRef
          Store the implied EL mapping file ref even if it is not part of the context model.
static org.eclipse.jpt.common.utility.transformer.Transformer<TypeMapping,Iterable<org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.JavaEclipseLinkConverter<?>>> TYPE_MAPPING_CONVERTER_TRANSFORMER
           
 
Fields inherited from class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit
children, CLASS_REF_MANAGED_TYPE_TRANSFORMER, connection, defaultAccess, defaultCascadePersist, defaultCatalog, defaultDelimitedIdentifiers, defaultSchema, defaultSharedCacheMode, defaultTransactionType, defaultValidationMode, description, generators, genericSchemaGeneration, impliedClassRefContainer, impliedMappingFileRef, jarFileRefContainer, jtaDataSource, managedTypeMap, metamodelFiles, name, nonJtaDataSource, options, PERSISTENT_TYPE_FILTER, potentialImpliedMappingFileRef, propertyContainer, provider, queries, specifiedClassRefContainer, specifiedExcludeUnlistedClasses, specifiedMappingFileRefContainer, specifiedSharedCacheMode, specifiedTransactionType, specifiedValidationMode, TYPE_MAPPING_JAVA_GENERATORS_TRANSFORMER, TYPE_MAPPING_JAVA_QUERIES_TRANSFORMER, xmlMappingMetadataComplete, xmlPersistenceUnit
 
Fields inherited from class org.eclipse.jpt.jpa.core.internal.AbstractJpaNode
EMPTY_STRING_ARRAY, parent
 
Fields inherited from class org.eclipse.jpt.common.utility.internal.model.AbstractModel
changeSupport
 
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, NAME_TRANSFORMER, 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.JpaStructureNode
CHILDREN_COLLECTION
 
Fields inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
RESOURCE_TYPE_TRANSFORMER
 
Fields inherited from interface org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer
TRANSFORMER
 
Fields inherited from interface org.eclipse.jpt.jpa.core.jpa2.MetamodelSynchronizer
METAMODEL_GENERATED_ANNOTATION_VALUE
 
Constructor Summary
EclipseLinkPersistenceUnit(Persistence parent, org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit xmlPersistenceUnit)
           
 
Method Summary
protected  boolean allNodesAreEquivalent(ArrayList<? extends JpaNamedContextNode> nodes)
          Return whether all the specified nodes are "equivalent" (i.e. they all have the same state).
protected  boolean anyNodesAreInequivalent(ArrayList<? extends JpaNamedContextNode> nodes)
           
protected  Iterable<EclipseLinkConverter> buildConverters()
          Converters are much like queries.
protected  String buildDefaultGetMethod(EclipseLinkPersistenceUnitDefaults defaults)
           
protected  String buildDefaultSetMethod(EclipseLinkPersistenceUnitDefaults defaults)
           
protected  SharedCacheMode buildDefaultSharedCacheMode()
           
protected  org.eclipse.jpt.common.utility.iterable.ListIterable<ReadOnlyTenantDiscriminatorColumn2_3> buildDefaultTenantDiscriminatorColumns(EclipseLinkPersistenceUnitDefaults defaults)
           
protected  Caching buildEclipseLinkCaching()
           
protected  Connection buildEclipseLinkConnection()
           
protected  Customization buildEclipseLinkCustomization()
           
protected  GeneralProperties buildEclipseLinkGeneralProperties()
           
protected  Logging buildEclipseLinkLogging()
           
protected  Options buildEclipseLinkOptions()
           
protected  SchemaGeneration buildEclipseLinkSchemaGeneration()
           
protected  int calculateCumulativeSize(Collection<? extends Collection<?>> collections)
           
 boolean calculateDefaultCacheable()
           
protected  void checkForConvertersWithSameName(List<IMessage> messages)
           
 void convertJavaConverters(EclipseLinkEntityMappings entityMappings, IProgressMonitor monitor)
          Override the default implementation because EclipseLink allows "equivalent" converters.
protected  void convertJavaConvertersWithSameName(OrmEclipseLinkConverterContainer ormConverterContainer, Map.Entry<String,ArrayList<org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.JavaEclipseLinkConverter<?>>> entry, SubMonitor monitor)
           
 void convertJavaGenerators(EntityMappings entityMappings, IProgressMonitor monitor)
          Override the default implementation because EclipseLink allows "equivalent" generators.
protected  void convertJavaGeneratorsWithSameName(EntityMappings entityMappings, Map.Entry<String,ArrayList<JavaGenerator>> entry, SubMonitor monitor)
           
 void convertJavaQueries(EntityMappings entityMappings, IProgressMonitor monitor)
          Override the default implementation because EclipseLink allows "equivalent" queries.
protected  void convertJavaQueriesWithSameName(OrmQueryContainer queryContainer, Map.Entry<String,ArrayList<JavaQuery>> entry, SubMonitor monitor)
           
 JpaJpqlQueryHelper createJpqlQueryHelper()
          Creates a new JpaJpqlQueryHelper that provides functionality related to JPQL queries.
protected  Iterable<ReplaceEdit> createPersistenceUnitPropertiesMoveTypeEdits(IType originalType, IPackageFragment newPackage)
           
protected  Iterable<ReplaceEdit> createPersistenceUnitPropertiesRenamePackageEdits(IPackageFragment originalPackage, String newName)
           
protected  Iterable<ReplaceEdit> createPersistenceUnitPropertiesRenameTypeEdits(IType originalType, String newName)
           
protected
<N extends JpaNamedContextNode>
HashMap<String,ArrayList<N>>
extractEclipseLinkConvertibleJavaNodes(Iterable<N> allJavaNodes, Iterable<? extends JpaNamedContextNode> mappingFileNodes)
          Return the Java nodes that are neither overridden nor duplicated (by default any Java nodes with the same name are "duplicates"); but, in EclipseLink we return any "equivalent" nodes also.
 Iterable<EclipseLinkConverter> getAllConverters()
          Return the "active" converters defined within the persistence unit's scope, including converters with duplicate names.
 Iterable<org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.JavaEclipseLinkConverter<?>> getAllJavaConverters()
          Include "overridden" Java converters.
 Caching getCaching()
           
 Connection getConnection()
           
 EclipseLinkPersistenceXmlContextNodeFactory getContextNodeFactory()
           
protected  Iterable<String> getConverterNames()
           
 Iterable<EclipseLinkConverter> getConverters()
           
 int getConvertersSize()
           
 Customization getCustomization()
           
 String getDefaultCacheSharedPropertyValue()
           
 String getDefaultCacheSizePropertyValue()
           
 String getDefaultCacheTypePropertyValue()
           
 String getDefaultGetMethod()
           
 String getDefaultSetMethod()
           
 org.eclipse.jpt.common.utility.iterable.ListIterable<ReadOnlyTenantDiscriminatorColumn2_3> getDefaultTenantDiscriminatorColumns()
           
protected  HashMap<String,ArrayList<org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.JavaEclipseLinkConverter<?>>> getEclipseLinkConvertibleJavaConverters()
           
protected  HashMap<String,ArrayList<JavaGenerator>> getEclipseLinkConvertibleJavaGenerators()
           
protected  HashMap<String,ArrayList<JavaQuery>> getEclipseLinkConvertibleJavaQueries()
           
 Iterable<String> getEclipseLinkDynamicPersistentTypeNames()
           
 Iterable<EclipseLinkOrmPersistentType> getEclipseLinkDynamicPersistentTypes()
           
protected  org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkPersistenceUnitMetadata getEclipseLinkMetadata()
           
 Iterable<EclipseLinkOrmPersistentType> getEclipseLinkOrmPersistentTypes()
           
 SchemaGeneration getEclipseLinkSchemaGeneration()
           
 GeneralProperties getGeneralProperties()
           
 MappingFileRef getImpliedEclipseLinkMappingFileRef()
           
 EclipseLinkJpaProject getJpaProject()
          Return the JPA project the node belongs to.
protected  ArrayList<PersistenceUnit.Property> getLegacyDescriptorCustomizerProperties()
           
protected  ArrayList<PersistenceUnit.Property> getLegacyEntityCachingProperties()
           
 Logging getLogging()
           
protected  Iterable<EclipseLinkConverter> getMappingFileConverters()
           
 org.eclipse.jpt.common.utility.iterable.ListIterable<MappingFileRef> getMappingFileRefs()
          Return the persistence unit's list of mapping file refs, both specified and implied.
 int getMappingFileRefsSize()
          Return the size of the persistence unit's list of mapping file refs, both specified and implied.
protected  Iterable<String> getNonEmptyConverterNames()
           
 Options getOptions()
           
protected  HashMap<String,PersistentType> getPersistentTypesToSynchronizeMetamodel()
           
 Iterable<String> getUniqueConverterNames()
          Return the names of the "active" converters defined in the persistence unit's scope, with duplicates removed.
 boolean hasAnyEquivalentJavaConverters()
          Return whether the persistence unit has any equivalent Java generators.
 boolean hasAnyEquivalentJavaGenerators()
          Return whether the persistence unit has any equivalent Java generators.
protected
<N extends JpaNamedContextNode>
boolean
hasAnyEquivalentJavaNodes(Iterable<N> allJavaNodes, Iterable<? extends JpaNamedContextNode> mappingFileNodes)
           
 boolean hasAnyEquivalentJavaQueries()
          Return whether the persistence unit has any equivalent Java generators.
 boolean hasConvertibleJavaConverters()
           
 boolean hasConvertibleJavaGenerators()
          Return whether the persistence unit contains any "convertible" generators (i.e.
 boolean hasConvertibleJavaQueries()
          Return whether the persistence unit contains any "convertible" queries.
protected  boolean impliedEclipseLinkMappingFileExists()
           
protected  boolean impliedEclipseLinkMappingFileIsExcluded()
           
protected  boolean impliedEclipseLinkMappingFileIsNotExcluded()
           
protected  boolean impliedEclipseLinkMappingFileIsNotSpecified()
           
protected  boolean impliedEclipseLinkMappingFileIsSpecified()
           
protected  void initializeProperties()
           
 void propertyRemoved(String propertyName)
           
 void propertyValueChanged(String propertyName, String newValue)
          Call back method for Property value changing.
protected  void setConverters(Iterable<EclipseLinkConverter> converters)
           
protected  void setDefaultGetMethod(String getMethod)
           
protected  void setDefaultSetMethod(String setMethod)
           
protected  void setDefaultTenantDiscriminatorColumns(Iterable<ReadOnlyTenantDiscriminatorColumn2_3> tenantDiscriminatorColumns)
           
protected  void setImpliedEclipseLinkMappingFileRef(MappingFileRef mappingFileRef)
           
 void setSpecifiedSharedCacheMode(SharedCacheMode specifiedSharedCacheMode)
          Set the persistence unit's specified shared cache mode.
protected  void syncImpliedMappingFileRef()
           
 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.
protected  void updateImpliedMappingFileRef()
           
protected  void updatePersistenceUnitMetadata()
           
protected  void validate(EclipseLinkConverter converter, List<IMessage> messages, IReporter reporter)
           
 void validate(List<IMessage> messages, IReporter reporter)
          Add to the list of current validation messages
protected  void validateConverters(List<IMessage> messages, IReporter reporter)
          NB: We validate converters here.
protected  void validateConvertersWithSameName(String converterName, ArrayList<EclipseLinkConverter> dups, List<IMessage> messages)
          NB: Unlike generators and queries, we do not mark "equivalent" converters with info messages - we just ignore them because they cannot be "portable" (since only EclipseLink has converters).
protected  void validateDefaultCachingProperty(PersistenceUnit.Property cachingProperty, List<IMessage> messages)
           
protected  void validateGeneratorsWithSameName(String generatorName, ArrayList<Generator> dups, List<IMessage> messages)
          If all the generators are "equivalent" add info messages; otherwise mark them all as duplicates.
protected  void validateLoggerProperty(PersistenceUnit.Property loggerProperty, List<IMessage> messages)
           
protected  void validateProperties(List<IMessage> messages, IReporter reporter)
           
protected  void validateQueriesWithSameName(String queryName, ArrayList<Query> dups, List<IMessage> messages)
           
 
Methods inherited from class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit
addJarFileRef, addJarFileRef, addPersistentTypes, addPersistentTypesTo, addProperty_, addProperty, addProperty, addProperty, addQuery, addSpecifiedClassRef, addSpecifiedClassRef, addSpecifiedClassRefs, addSpecifiedClassRefs, addSpecifiedMappingFileRef, addSpecifiedMappingFileRef, annotateClasses, buildClassRef, buildClassRef, buildDefaultCascadePersist, buildDefaultCatalog, buildDefaultDelimitedIdentifiers, buildDefaultSchema, buildDefaultTransactionType, buildDefaultValidationMode, buildGenerators, buildImpliedClassRefContainer, buildImpliedMappingFileRef, buildJarFileRef, buildJarFileRefContainer, buildNonPersistentMetamodelSourceType, buildProperty, buildPropertyContainer, buildQueries, buildSpecifiedClassRefContainer, buildSpecifiedMappingFileRef, buildSpecifiedMappingFileRefContainer, buildSpecifiedSharedCacheMode, buildSpecifiedTransactionType, buildSpecifiedValidationMode, buildXmlJarFileRef, buildXmlJavaClassRef, buildXmlMappingFileRef, buildXmlMappingMetadataComplete, buildXmlProperties, buildXmlProperty, checkForDuplicateClassRefs, checkForDuplicateJarFileRefs, checkForDuplicateMappingFileClasses, checkForDuplicateMappingFileRefs, checkForGeneratorsWithSameName, checkForMultiplePersistenceUnitMetadata, checkForQueriesWithSameName, containsOffset, convertJavaGenerator, convertJavaQuery, convertToClassNames, convertToNames, createDeleteMappingFileEdits, createDeleteTypeEdits, createMappingFileRefMoveFolderReplaceEdits, createMappingFileRefRenameFolderEdits, createMoveFolderEdits, createMoveMappingFileEdits, createMoveTypeEdits, createRenameFolderEdits, createRenameMappingFileEdits, createRenamePackageEdits, createRenameTypeEdits, createSpecifiedClassRefMoveTypeEdits, createSpecifiedClassRefRenamePackageEdits, createSpecifiedClassRefRenameTypeEdits, deleteMetamodelFile_, deleteMetamodelFile, dispose, disposeMetamodel, excludesUnlistedClasses, extractConvertibleJavaNodes, fileIsGeneratedMetamodel, filterToEntities_, filterToEntities, findInsertLocationForMappingFileRef, findJdtType, gatherRootStructureNodes, getActiveEntities, getActiveTypeMappings, getAllJavaGenerators, getAllJavaPersistentTypesUnique, getAllJavaQueries, getAllJavaTypeMappingsUnique, getChildren, getChildrenSize, getClassRefManagedTypes_, getClassRefManagedTypes, getClassRefPersistentTypes, getClassRefs, getClassRefsSize, getCombinedMappingFileRefs, getCombinedMappingFileRefsSize, getContextType, getConvertibleJavaGenerators, getConvertibleJavaQueries, getDefaultAccess, getDefaultCascadePersist, getDefaultCatalog, getDefaultDelimitedIdentifiers, getDefaultExcludeUnlistedClasses, getDefaultSchema, getDefaultSharedCacheMode, getDefaultTransactionType, getDefaultValidationMode, getDescription, getEmbeddable, getEntities, getEntity, getFullTextRange, getGeneratedMetamodelFiles, getGeneratedMetamodelTopLevelTypes, getGeneratorNames, getGenerators, getGeneratorsSize, getImpliedClassRefs, getImpliedClassRefsSize, getImpliedClassResourceTypes_, getImpliedClassResourceTypes, getImpliedMappingFileRef, getJarFileManagedTypes, getJarFilePersistentTypes, getJarFileRefs, getJarFileRefsSize, getJavaManagedTypes, getJavaPersistentTypes, getJavaTypeMappingDefinition, getJavaTypeMappings, getJtaDataSource, getManagedType, getManagedTypes, getMappingFileGenerators, getMappingFileJavaPersistentTypes_, getMappingFileJavaPersistentTypes, getMappingFileManagedTypes, getMappingFilePersistentTypes, getMappingFileQueries, getMappingFileRefsContaining, getMappingFiles_, getMappingFiles, getMappingFileTypeMappings, getMappingFileTypeNames, getMetadata, getName, getNonEmptyGeneratorNames, getNonJtaDataSource, getPackageNames, getParent, getPersistence, getPersistenceUnit, getPersistenceUnitMetadataMappingFileRefs, getPersistentType, getPersistentTypes, getProperties, getPropertiesNamed, getPropertiesSize, getPropertiesWithNamePrefix, getProperty, getProvider, getQueries, getQueriesSize, getSchemaGeneration, getSelectionTextRange, getSharedCacheMode, getSpecifiedClassRefs, getSpecifiedClassRefsSize, getSpecifiedExcludeUnlistedClasses, getSpecifiedMappingFileRefs, getSpecifiedMappingFileRefsSize, getSpecifiedSharedCacheMode, getSpecifiedTransactionType, getSpecifiedValidationMode, getStructureNode, getTransactionType, getType, getTypeMapping, getTypeMappings, getUniqueGeneratorNames, getValidationMode, getValidationTextRange, getXmlClassRefs, getXmlJarFileRefs, getXmlMappingFileRefs, getXmlPersistenceUnit, getXmlProperties, impliedMappingFileExists, impliedMappingFileIsNotSpecified, impliedMappingFileIsSpecified, initializeChildren, initializeMetamodel, initializeMetamodelFiles_, initializeMetamodelFiles, isXmlMappingMetadataComplete, listInPersistenceXml, mapByName, mapClassRefsByName, mapJarFileRefsByName, mapMappingFileManagedTypesByName, mapMappingFileRefsByFileName, mappingFileIsSpecified, mapTypeMappingsByClassName, mapTypeMappingsByName, propertyAdded, propertyNameChanged, rebuildManagedTypeMap, removeJarFileRef_, removeJarFileRef, removeJarFileRef, removeProperty_, removeProperty, removeProperty, removeProperty, removeProperty, removeSpecifiedClassRef_, removeSpecifiedClassRef, removeSpecifiedClassRef, removeSpecifiedClassRefs, removeSpecifiedMappingFileRef_, removeSpecifiedMappingFileRef, removeSpecifiedMappingFileRef, selectSourceType, setDefaultAccess, setDefaultCascadePersist, setDefaultCatalog, setDefaultDelimitedIdentifiers, setDefaultSchema, setDefaultSharedCacheMode, setDefaultTransactionType, setDefaultValidationMode, setDescription_, setDescription, setGenerators, setImpliedMappingFileRef, setJtaDataSource_, setJtaDataSource, setName_, setName, setNonJtaDataSource_, setNonJtaDataSource, setProperty, setProperty, setProvider_, setProvider, setQueries, setSpecifiedExcludeUnlistedClasses_, setSpecifiedExcludeUnlistedClasses, setSpecifiedSharedCacheMode_, setSpecifiedTransactionType_, setSpecifiedTransactionType, setSpecifiedValidationMode_, setSpecifiedValidationMode, setXmlMappingMetadataComplete, specifiesManagedType, synchronizeClasses, synchronizeMetamodel, synchronizeWithResourceModel, syncJarFileRefs, syncProperties, syncSpecifiedClassRefs, syncSpecifiedMappingFileRefs, toString, updateChildren, updateImpliedClassRefs, usesImpliedMappingFile, validate, validate, validateClassRefs, validateEntitiesWithSameName, validateEntityNames, validateGenerators, validateJarFileRefs, validateMappingFiles, validateQueries, validatesAgainstDatabase
 
Methods inherited from class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceXmlContextNode
getPersistenceXmlDefinition, getResourceNodeFactory
 
Methods inherited from class org.eclipse.jpt.jpa.core.internal.context.AbstractJpaContextNode
buildValidationMessage, buildValidationMessage, buildValidationMessage, buildValidationMessage, buildValidationMessage, buildValidationMessage, buildValidationMessage, buildValidationMessage, getCompletionProposals, getConnectedCompletionProposals, getContextDefaultCatalog, getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getContextDefaultSchema, getMappingFileRoot, getResourceType, getValidationTextRange, synchronizeNodesWithResourceModel, updateNodes, validateNode, validateNodes
 
Methods inherited from class org.eclipse.jpt.jpa.core.internal.AbstractJpaNode
addNonUpdateAspectNamesTo, aspectChanged, aspectDoesNotTriggerUpdate, aspectTriggersUpdate, buildChangeSupport, buildChangeSupportListener, checkParent, connectionProfileIsActive, forbidsParent, getAdapter, getDatabase, getDataSource, getJavaProject, getJpaFactory, getJpaFactory2_0, getJpaFactory2_1, getJpaFile, getJpaPlatform, getJpaPlatformVariation, getJpaPlatformVersion, getJpaProjectManager, getResource, isJpa2_0Compatible, isJpa2_1Compatible, nonUpdateAspectNames, requiresParent, resolveDbCatalog, stateChanged
 
Methods inherited from class org.eclipse.jpt.common.utility.internal.model.AbstractModel
addChangeListener, addCollectionChangeListener, addItemsToCollection, addItemsToCollection, addItemsToCollection, addItemsToCollection, addItemsToList, addItemsToList, addItemsToList, addItemsToList, addItemsToList, addItemsToList, addItemsToList, addItemsToList, addItemToCollection, addItemToList, addItemToList, addListChangeListener, addPropertyChangeListener, addStateChangeListener, attributeValueHasChanged, attributeValueHasNotChanged, clearCollection, clearList, clone, fireCollectionChanged, fireCollectionChanged, fireCollectionCleared, fireCollectionCleared, fireItemAdded, fireItemAdded, fireItemMoved, fireItemRemoved, fireItemRemoved, fireItemReplaced, fireItemsAdded, fireItemsAdded, fireItemsAdded, fireItemsAdded, fireItemsMoved, fireItemsMoved, fireItemsRemoved, fireItemsRemoved, fireItemsRemoved, fireItemsRemoved, fireItemsReplaced, fireItemsReplaced, fireListChanged, fireListChanged, fireListCleared, fireListCleared, firePropertyChanged, firePropertyChanged, firePropertyChanged, firePropertyChanged, firePropertyChanged, fireStateChanged, fireStateChanged, getChangeSupport, hasAnyChangeListeners, hasAnyCollectionChangeListeners, hasAnyListChangeListeners, hasAnyPropertyChangeListeners, hasAnyStateChangeListeners, hasNoChangeListeners, hasNoCollectionChangeListeners, hasNoListChangeListeners, hasNoPropertyChangeListeners, hasNoStateChangeListeners, moveItemInList, moveItemInList, moveItemsInList, removeChangeListener, removeCollectionChangeListener, removeItemFromCollection, removeItemFromList, removeItemFromList, removeItemsFromCollection, removeItemsFromCollection, removeItemsFromCollection, removeItemsFromCollection, removeItemsFromList, removeItemsFromList, removeItemsFromList, removeItemsFromList, removeItemsFromList, removeItemsFromList, removeListChangeListener, removePropertyChangeListener, removeRangeFromList, removeStateChangeListener, replaceItemInList, retainItemsInCollection, retainItemsInCollection, retainItemsInCollection, retainItemsInCollection, retainItemsInList, retainItemsInList, retainItemsInList, retainItemsInList, setItemInList, setItemsInList, setItemsInList, synchronizeCollection, synchronizeCollection, synchronizeCollection, synchronizeList, synchronizeList, synchronizeList, toString, valuesAreDifferent, valuesAreEqual
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaContextNode
getCompletionProposals, getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaNode
getJpaPlatform, 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

impliedEclipseLinkMappingFileRef

protected MappingFileRef impliedEclipseLinkMappingFileRef
Will be null if the implied EL mapping file should not be part of the context model. Otherwise will be equal to potentialImpliedEclipseLinkMappingFileRef.

See Also:
potentialImpliedEclipseLinkMappingFileRef

IMPLIED_ECLIPSELINK_MAPPING_FILE_REF_PROPERTY

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

See Also:
Constant Field Values

potentialImpliedEclipseLinkMappingFileRef

protected final MappingFileRef potentialImpliedEclipseLinkMappingFileRef
Store the implied EL mapping file ref even if it is not part of the context model. This allows us to sync it in the syncWithResourceModel. In the update, determine if it should be part of the context model and set the impliedEclipseLinkMappingFileRef appropriately.

See Also:
impliedEclipseLinkMappingFileRef, usesImpliedEclipseLinkMappingFile()

converters

protected final Vector<EclipseLinkConverter> converters

defaultTenantDiscriminatorColumns

protected final Vector<ReadOnlyTenantDiscriminatorColumn2_3> defaultTenantDiscriminatorColumns

defaultGetMethod

protected String defaultGetMethod

defaultSetMethod

protected String defaultSetMethod

DEFAULT_TENANT_DISCRIMINATOR_COLUMNS_LIST

public static final String DEFAULT_TENANT_DISCRIMINATOR_COLUMNS_LIST
String constant associated with changes to the persistence unit's list of default tenant discriminator Columns

See Also:
Constant Field Values

CONVERTERS_COLLECTION

public static final String CONVERTERS_COLLECTION
String constant associated with changes to the persistence unit's collection of "global" converters.

See Also:
Constant Field Values

MAPPING_FILE_CONVERTERS_TRANSFORMER

public static final org.eclipse.jpt.common.utility.transformer.Transformer<MappingFile,Iterable<EclipseLinkConverter>> MAPPING_FILE_CONVERTERS_TRANSFORMER

TYPE_MAPPING_CONVERTER_TRANSFORMER

public static final org.eclipse.jpt.common.utility.transformer.Transformer<TypeMapping,Iterable<org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.JavaEclipseLinkConverter<?>>> TYPE_MAPPING_CONVERTER_TRANSFORMER

DEFAULT_GET_METHOD_PROPERTY

public static final String DEFAULT_GET_METHOD_PROPERTY
String constant associated with changes to the persistence unit's default get method.

See Also:
Constant Field Values

DEFAULT_SET_METHOD_PROPERTY

public static final String DEFAULT_SET_METHOD_PROPERTY
String constant associated with changes to the persistence unit's default set method.

See Also:
Constant Field Values
Constructor Detail

EclipseLinkPersistenceUnit

public EclipseLinkPersistenceUnit(Persistence parent,
                                  org.eclipse.jpt.jpa.core.resource.persistence.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

getEclipseLinkMetadata

protected org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkPersistenceUnitMetadata getEclipseLinkMetadata()

updatePersistenceUnitMetadata

protected void updatePersistenceUnitMetadata()
Overrides:
updatePersistenceUnitMetadata 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()

getDefaultCacheTypePropertyValue

public String getDefaultCacheTypePropertyValue()

getDefaultCacheSizePropertyValue

public String getDefaultCacheSizePropertyValue()

getDefaultCacheSharedPropertyValue

public String getDefaultCacheSharedPropertyValue()

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

getEclipseLinkSchemaGeneration

public SchemaGeneration getEclipseLinkSchemaGeneration()

buildEclipseLinkGeneralProperties

protected GeneralProperties buildEclipseLinkGeneralProperties()

buildEclipseLinkConnection

protected Connection buildEclipseLinkConnection()

buildEclipseLinkCustomization

protected Customization buildEclipseLinkCustomization()

buildEclipseLinkCaching

protected Caching buildEclipseLinkCaching()

buildEclipseLinkLogging

protected Logging buildEclipseLinkLogging()

buildEclipseLinkOptions

protected Options buildEclipseLinkOptions()

buildEclipseLinkSchemaGeneration

protected SchemaGeneration buildEclipseLinkSchemaGeneration()

initializeProperties

protected void initializeProperties()
Overrides:
initializeProperties in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

propertyValueChanged

public void propertyValueChanged(String propertyName,
                                 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(String propertyName)
Overrides:
propertyRemoved in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

getMappingFileRefs

public org.eclipse.jpt.common.utility.iterable.ListIterable<MappingFileRef> getMappingFileRefs()
Description copied from interface: PersistenceUnit
Return the persistence unit's list of mapping file refs, both specified and implied.

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

getMappingFileRefsSize

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

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

getImpliedEclipseLinkMappingFileRef

public MappingFileRef getImpliedEclipseLinkMappingFileRef()

setImpliedEclipseLinkMappingFileRef

protected void setImpliedEclipseLinkMappingFileRef(MappingFileRef mappingFileRef)

syncImpliedMappingFileRef

protected void syncImpliedMappingFileRef()
Overrides:
syncImpliedMappingFileRef in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

updateImpliedMappingFileRef

protected void updateImpliedMappingFileRef()
Overrides:
updateImpliedMappingFileRef in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

impliedEclipseLinkMappingFileIsNotExcluded

protected boolean impliedEclipseLinkMappingFileIsNotExcluded()

impliedEclipseLinkMappingFileIsExcluded

protected boolean impliedEclipseLinkMappingFileIsExcluded()

impliedEclipseLinkMappingFileIsNotSpecified

protected boolean impliedEclipseLinkMappingFileIsNotSpecified()

impliedEclipseLinkMappingFileIsSpecified

protected boolean impliedEclipseLinkMappingFileIsSpecified()

impliedEclipseLinkMappingFileExists

protected boolean impliedEclipseLinkMappingFileExists()

getDefaultTenantDiscriminatorColumns

public org.eclipse.jpt.common.utility.iterable.ListIterable<ReadOnlyTenantDiscriminatorColumn2_3> getDefaultTenantDiscriminatorColumns()

setDefaultTenantDiscriminatorColumns

protected void setDefaultTenantDiscriminatorColumns(Iterable<ReadOnlyTenantDiscriminatorColumn2_3> tenantDiscriminatorColumns)

buildDefaultTenantDiscriminatorColumns

protected org.eclipse.jpt.common.utility.iterable.ListIterable<ReadOnlyTenantDiscriminatorColumn2_3> buildDefaultTenantDiscriminatorColumns(EclipseLinkPersistenceUnitDefaults defaults)

getAllConverters

public Iterable<EclipseLinkConverter> getAllConverters()
Return the "active" converters defined within the persistence unit's scope, including converters with duplicate names. "Active" converters are: NB: A Java converter defined on a class or attribute that is overridden in a mapping file is not, as a result, itself overridden. A Java converter can only be overridden by a mapping file converter with the same name.

NB: A Java converter defined on a class or attribute whose corresponding mapping file mapping (or mapping file) is marked "metadata complete" is ignored.


getConverters

public Iterable<EclipseLinkConverter> getConverters()

getConvertersSize

public int getConvertersSize()

getUniqueConverterNames

public Iterable<String> getUniqueConverterNames()
Return the names of the "active" converters defined in the persistence unit's scope, with duplicates removed.


getNonEmptyConverterNames

protected Iterable<String> getNonEmptyConverterNames()

getConverterNames

protected Iterable<String> getConverterNames()

setConverters

protected void setConverters(Iterable<EclipseLinkConverter> converters)

buildConverters

protected Iterable<EclipseLinkConverter> buildConverters()
Converters are much like queries.

See Also:
AbstractPersistenceUnit.buildQueries()

getMappingFileConverters

protected Iterable<EclipseLinkConverter> getMappingFileConverters()

getAllJavaConverters

public Iterable<org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.JavaEclipseLinkConverter<?>> getAllJavaConverters()
Include "overridden" Java converters.


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

buildDefaultSharedCacheMode

protected SharedCacheMode buildDefaultSharedCacheMode()
Overrides:
buildDefaultSharedCacheMode 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

getDefaultGetMethod

public String getDefaultGetMethod()

setDefaultGetMethod

protected void setDefaultGetMethod(String getMethod)

buildDefaultGetMethod

protected String buildDefaultGetMethod(EclipseLinkPersistenceUnitDefaults defaults)

getDefaultSetMethod

public String getDefaultSetMethod()

setDefaultSetMethod

protected void setDefaultSetMethod(String setMethod)

buildDefaultSetMethod

protected String buildDefaultSetMethod(EclipseLinkPersistenceUnitDefaults defaults)

getEclipseLinkDynamicPersistentTypeNames

public Iterable<String> getEclipseLinkDynamicPersistentTypeNames()

getEclipseLinkDynamicPersistentTypes

public Iterable<EclipseLinkOrmPersistentType> getEclipseLinkDynamicPersistentTypes()

getEclipseLinkOrmPersistentTypes

public Iterable<EclipseLinkOrmPersistentType> getEclipseLinkOrmPersistentTypes()

createJpqlQueryHelper

public JpaJpqlQueryHelper createJpqlQueryHelper()
Description copied from interface: PersistenceUnit
Creates a new JpaJpqlQueryHelper that provides functionality related to JPQL queries.


validate

public void validate(List<IMessage> messages,
                     IReporter reporter)
Description copied from interface: JpaContextNode
Add to the list of current validation messages

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

validateProperties

protected void validateProperties(List<IMessage> messages,
                                  IReporter reporter)
Specified by:
validateProperties in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

validateDefaultCachingProperty

protected void validateDefaultCachingProperty(PersistenceUnit.Property cachingProperty,
                                              List<IMessage> messages)

validateLoggerProperty

protected void validateLoggerProperty(PersistenceUnit.Property loggerProperty,
                                      List<IMessage> messages)

getLegacyDescriptorCustomizerProperties

protected ArrayList<PersistenceUnit.Property> getLegacyDescriptorCustomizerProperties()

getLegacyEntityCachingProperties

protected ArrayList<PersistenceUnit.Property> getLegacyEntityCachingProperties()

validateConverters

protected void validateConverters(List<IMessage> messages,
                                  IReporter reporter)
NB: We validate converters here.

See Also:
AbstractPersistenceUnit.validateGenerators(List, IReporter)

checkForConvertersWithSameName

protected void checkForConvertersWithSameName(List<IMessage> messages)

validateConvertersWithSameName

protected void validateConvertersWithSameName(String converterName,
                                              ArrayList<EclipseLinkConverter> dups,
                                              List<IMessage> messages)
NB: Unlike generators and queries, we do not mark "equivalent" converters with info messages - we just ignore them because they cannot be "portable" (since only EclipseLink has converters).


allNodesAreEquivalent

protected boolean allNodesAreEquivalent(ArrayList<? extends JpaNamedContextNode> nodes)
Return whether all the specified nodes are "equivalent" (i.e. they all have the same state).


anyNodesAreInequivalent

protected boolean anyNodesAreInequivalent(ArrayList<? extends JpaNamedContextNode> nodes)

validate

protected void validate(EclipseLinkConverter converter,
                        List<IMessage> messages,
                        IReporter reporter)

validateGeneratorsWithSameName

protected void validateGeneratorsWithSameName(String generatorName,
                                              ArrayList<Generator> dups,
                                              List<IMessage> messages)
If all the generators are "equivalent" add info messages; otherwise mark them all as duplicates.

Overrides:
validateGeneratorsWithSameName in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

validateQueriesWithSameName

protected void validateQueriesWithSameName(String queryName,
                                           ArrayList<Query> dups,
                                           List<IMessage> messages)
Overrides:
validateQueriesWithSameName in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit
See Also:
validateGeneratorsWithSameName(String, ArrayList, List)

createPersistenceUnitPropertiesRenameTypeEdits

protected Iterable<ReplaceEdit> createPersistenceUnitPropertiesRenameTypeEdits(IType originalType,
                                                                               String newName)
Overrides:
createPersistenceUnitPropertiesRenameTypeEdits in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

createPersistenceUnitPropertiesMoveTypeEdits

protected Iterable<ReplaceEdit> createPersistenceUnitPropertiesMoveTypeEdits(IType originalType,
                                                                             IPackageFragment newPackage)
Overrides:
createPersistenceUnitPropertiesMoveTypeEdits in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

createPersistenceUnitPropertiesRenamePackageEdits

protected Iterable<ReplaceEdit> createPersistenceUnitPropertiesRenamePackageEdits(IPackageFragment originalPackage,
                                                                                  String newName)
Overrides:
createPersistenceUnitPropertiesRenamePackageEdits in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

hasConvertibleJavaQueries

public boolean hasConvertibleJavaQueries()
Description copied from interface: PersistenceUnit
Return whether the persistence unit contains any "convertible" queries. (i.e. Java queries that are neither overridden nor [erroneously] duplicated - by default, any Java queries with the same name are "duplicates").

Specified by:
hasConvertibleJavaQueries in interface PersistenceUnit
Overrides:
hasConvertibleJavaQueries in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit
See Also:
convertJavaQueries(EntityMappings, IProgressMonitor)

hasAnyEquivalentJavaQueries

public boolean hasAnyEquivalentJavaQueries()
Return whether the persistence unit has any equivalent Java generators.


convertJavaQueries

public void convertJavaQueries(EntityMappings entityMappings,
                               IProgressMonitor monitor)
Override the default implementation because EclipseLink allows "equivalent" queries.

Specified by:
convertJavaQueries in interface PersistenceUnit
Overrides:
convertJavaQueries in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit
See Also:
PersistenceUnit.hasConvertibleJavaQueries()

convertJavaQueriesWithSameName

protected void convertJavaQueriesWithSameName(OrmQueryContainer queryContainer,
                                              Map.Entry<String,ArrayList<JavaQuery>> entry,
                                              SubMonitor monitor)

getEclipseLinkConvertibleJavaQueries

protected HashMap<String,ArrayList<JavaQuery>> getEclipseLinkConvertibleJavaQueries()
See Also:
extractEclipseLinkConvertibleJavaNodes(Iterable, Iterable)

hasConvertibleJavaGenerators

public boolean hasConvertibleJavaGenerators()
Description copied from interface: PersistenceUnit
Return whether the persistence unit contains any "convertible" generators (i.e. Java generators that are neither overridden nor [erroneously] duplicated).

Specified by:
hasConvertibleJavaGenerators in interface PersistenceUnit
Overrides:
hasConvertibleJavaGenerators in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit
See Also:
convertJavaGenerators(EntityMappings, IProgressMonitor)

hasAnyEquivalentJavaGenerators

public boolean hasAnyEquivalentJavaGenerators()
Return whether the persistence unit has any equivalent Java generators.


convertJavaGenerators

public void convertJavaGenerators(EntityMappings entityMappings,
                                  IProgressMonitor monitor)
Override the default implementation because EclipseLink allows "equivalent" generators.

Specified by:
convertJavaGenerators in interface PersistenceUnit
Overrides:
convertJavaGenerators in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit
See Also:
PersistenceUnit.hasConvertibleJavaGenerators()

convertJavaGeneratorsWithSameName

protected void convertJavaGeneratorsWithSameName(EntityMappings entityMappings,
                                                 Map.Entry<String,ArrayList<JavaGenerator>> entry,
                                                 SubMonitor monitor)

getEclipseLinkConvertibleJavaGenerators

protected HashMap<String,ArrayList<JavaGenerator>> getEclipseLinkConvertibleJavaGenerators()
See Also:
extractEclipseLinkConvertibleJavaNodes(Iterable, Iterable)

hasConvertibleJavaConverters

public boolean hasConvertibleJavaConverters()
See Also:
convertJavaConverters(EclipseLinkEntityMappings, IProgressMonitor)

hasAnyEquivalentJavaConverters

public boolean hasAnyEquivalentJavaConverters()
Return whether the persistence unit has any equivalent Java generators.


convertJavaConverters

public void convertJavaConverters(EclipseLinkEntityMappings entityMappings,
                                  IProgressMonitor monitor)
Override the default implementation because EclipseLink allows "equivalent" converters.


convertJavaConvertersWithSameName

protected void convertJavaConvertersWithSameName(OrmEclipseLinkConverterContainer ormConverterContainer,
                                                 Map.Entry<String,ArrayList<org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.JavaEclipseLinkConverter<?>>> entry,
                                                 SubMonitor monitor)

getEclipseLinkConvertibleJavaConverters

protected HashMap<String,ArrayList<org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.JavaEclipseLinkConverter<?>>> getEclipseLinkConvertibleJavaConverters()
See Also:
extractEclipseLinkConvertibleJavaNodes(Iterable, Iterable)

calculateCumulativeSize

protected int calculateCumulativeSize(Collection<? extends Collection<?>> collections)

hasAnyEquivalentJavaNodes

protected <N extends JpaNamedContextNode> boolean hasAnyEquivalentJavaNodes(Iterable<N> allJavaNodes,
                                                                            Iterable<? extends JpaNamedContextNode> mappingFileNodes)

extractEclipseLinkConvertibleJavaNodes

protected <N extends JpaNamedContextNode> HashMap<String,ArrayList<N>> extractEclipseLinkConvertibleJavaNodes(Iterable<N> allJavaNodes,
                                                                                                              Iterable<? extends JpaNamedContextNode> mappingFileNodes)
Return the Java nodes that are neither overridden nor duplicated (by default any Java nodes with the same name are "duplicates"); but, in EclipseLink we return any "equivalent" nodes also.


getPersistentTypesToSynchronizeMetamodel

protected HashMap<String,PersistentType> getPersistentTypesToSynchronizeMetamodel()
Overrides:
getPersistentTypesToSynchronizeMetamodel in class org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.