Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2007-05-16 18:34:46 +0000
committerkmoore2007-05-16 18:34:46 +0000
commitca8380756e5ca8674bb19916a1e841d8c034b160 (patch)
treef35076cd7d31b31054c0ecf3c05b1fd986bcac4d
parent5bba348dc98cfffeccdb68ab8af817678c6683b3 (diff)
downloadwebtools.dali-ca8380756e5ca8674bb19916a1e841d8c034b160.tar.gz
webtools.dali-ca8380756e5ca8674bb19916a1e841d8c034b160.tar.xz
webtools.dali-ca8380756e5ca8674bb19916a1e841d8c034b160.zip
186432 - prevent extra tags in orm.xml with new xml objects to be used by translators for id-class, map-key, and inheritance strategy
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/model/coreModels.genmodel12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/model/orm.ecore17
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/JavaPersistentType.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/AbstractXmlColumn.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/AbstractXmlNamedColumn.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmFactory.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmPackage.java448
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlDiscriminatorColumn.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityForXml.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityInternal.java241
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlIdClass.java208
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlInheritance.java214
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMapKey.java209
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingForXml.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingInternal.java132
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/EntityTranslator.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/IdClassTranslator.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/InheritanceTranslator.java52
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/MapKeyTranslator.java66
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/MultiRelationshipTranslator.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrmXmlMapper.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmAdapterFactory.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmSwitch.java99
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITable.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITableGenerator.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IUniqueConstraint.java4
26 files changed, 1885 insertions, 81 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/coreModels.genmodel b/jpa/plugins/org.eclipse.jpt.core/model/coreModels.genmodel
index 1b5adbfc44..ce735036bc 100644
--- a/jpa/plugins/org.eclipse.jpt.core/model/coreModels.genmodel
+++ b/jpa/plugins/org.eclipse.jpt.core/model/coreModels.genmodel
@@ -527,6 +527,8 @@
<genClasses ecoreClass="orm.ecore#//XmlEntityForXml">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntityForXml/tableForXml"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntityForXml/discriminatorColumnForXml"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntityForXml/idClassForXml"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntityForXml/inheritanceForXml"/>
</genClasses>
<genClasses ecoreClass="orm.ecore#//XmlEntity">
<genFeatures property="None" children="true" createChild="false" ecoreFeature="ecore:EReference orm.ecore#//XmlEntity/secondaryTables"/>
@@ -547,6 +549,7 @@
<genClasses image="false" ecoreClass="orm.ecore#//XmlMultiRelationshipMappingForXml">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference orm.ecore#//XmlMultiRelationshipMappingForXml/joinTableForXml"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference orm.ecore#//XmlMultiRelationshipMappingForXml/orderByForXml"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference orm.ecore#//XmlMultiRelationshipMappingForXml/mapKeyForXml"/>
</genClasses>
<genClasses image="false" ecoreClass="orm.ecore#//XmlMultiRelationshipMapping"/>
<genClasses ecoreClass="orm.ecore#//XmlOneToMany"/>
@@ -641,6 +644,15 @@
<genClasses ecoreClass="orm.ecore#//XmlQueryHint"/>
<genClasses ecoreClass="orm.ecore#//XmlUniqueConstraint"/>
<genClasses ecoreClass="orm.ecore#//XmlCascade"/>
+ <genClasses ecoreClass="orm.ecore#//XmlIdClass">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlIdClass/value"/>
+ </genClasses>
+ <genClasses ecoreClass="orm.ecore#//XmlInheritance">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlInheritance/strategy"/>
+ </genClasses>
+ <genClasses ecoreClass="orm.ecore#//XmlMapKey">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlMapKey/name"/>
+ </genClasses>
</genPackages>
<genPackages prefix="Persistence" basePackage="org.eclipse.jpt.core.internal.content"
disposableProviderFactory="true" ecorePackage="persistence.ecore#/">
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore b/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore
index 22c01782e2..e6f628b2cc 100644
--- a/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore
+++ b/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore
@@ -90,6 +90,10 @@
volatile="true" resolveProxies="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="discriminatorColumnForXml"
eType="#//XmlDiscriminatorColumn" volatile="true" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="idClassForXml" eType="#//XmlIdClass"
+ containment="true" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="inheritanceForXml" eType="#//XmlInheritance"
+ containment="true" resolveProxies="false"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="XmlEntity" abstract="true" interface="true"
eSuperTypes="core.ecore#//mappings/IEntity">
@@ -121,6 +125,8 @@
volatile="true" resolveProxies="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="orderByForXml" eType="#//XmlOrderBy"
volatile="true" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="mapKeyForXml" eType="#//XmlMapKey"
+ containment="true" resolveProxies="false"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="XmlMultiRelationshipMapping" abstract="true"
interface="true" eSuperTypes="core.ecore#//mappings/IMultiRelationshipMapping"/>
@@ -262,4 +268,15 @@
<eClassifiers xsi:type="ecore:EClass" name="XmlQueryHint" eSuperTypes="core.ecore#//XmlEObject core.ecore#//mappings/IQueryHint"/>
<eClassifiers xsi:type="ecore:EClass" name="XmlUniqueConstraint" eSuperTypes="core.ecore#//XmlEObject core.ecore#//mappings/IUniqueConstraint"/>
<eClassifiers xsi:type="ecore:EClass" name="XmlCascade" eSuperTypes="core.ecore#//XmlEObject core.ecore#//mappings/ICascade"/>
+ <eClassifiers xsi:type="ecore:EClass" name="XmlIdClass" eSuperTypes="core.ecore#//XmlEObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
+ defaultValueLiteral=""/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="XmlInheritance" eSuperTypes="core.ecore#//XmlEObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="strategy" eType="ecore:EEnum core.ecore#//mappings/InheritanceType"
+ defaultValueLiteral=""/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="XmlMapKey" eSuperTypes="core.ecore#//XmlEObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/JavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/JavaPersistentType.java
index c59a1c2e68..32dd480189 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/JavaPersistentType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/JavaPersistentType.java
@@ -72,7 +72,6 @@ import org.eclipse.jpt.utility.internal.iterators.ChainIterator;
import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-import org.eclipse.jpt.utility.internal.iterators.ReadOnlyIterator;
import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
/**
@@ -769,7 +768,7 @@ public class JavaPersistentType extends JavaEObject implements IPersistentType
if (values != null) {
return values;
}
- for (Iterator<JavaPersistentAttribute> i = attributes() ; i.hasNext(); ) {
+ for (Iterator<JavaPersistentAttribute> i = attributes(); i.hasNext();) {
JavaPersistentAttribute attribute = i.next();
values = attribute.candidateValuesFor(pos, filter, astRoot);
if (values != null) {
@@ -780,11 +779,11 @@ public class JavaPersistentType extends JavaEObject implements IPersistentType
}
public IJpaContentNode contentNodeAt(int offset) {
- for (Iterator<JavaPersistentAttribute> i = attributes(); i.hasNext(); ) {
+ for (Iterator<JavaPersistentAttribute> i = attributes(); i.hasNext();) {
JavaPersistentAttribute persistentAttribute = i.next();
if (persistentAttribute.includes(offset)) {
return persistentAttribute;
- }
+ }
}
return null;
}
@@ -810,7 +809,7 @@ public class JavaPersistentType extends JavaEObject implements IPersistentType
}
private JavaPersistentAttribute persistentAttributeFor(IMember member) {
- for (Iterator<JavaPersistentAttribute> i = attributes(); i.hasNext(); ) {
+ for (Iterator<JavaPersistentAttribute> i = attributes(); i.hasNext();) {
JavaPersistentAttribute attribute = i.next();
if (attribute.isFor(member)) {
return attribute;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/AbstractXmlColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/AbstractXmlColumn.java
index a652e4e033..1fa12e5041 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/AbstractXmlColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/AbstractXmlColumn.java
@@ -233,7 +233,7 @@ public abstract class AbstractXmlColumn extends AbstractXmlNamedColumn
protected AbstractXmlColumn(INamedColumn.Owner owner) {
super(owner);
}
-
+
@Override
protected void addInsignificantXmlFeatureIdsTo(Set<Integer> insignificantXmlFeatureIds) {
super.addInsignificantXmlFeatureIdsTo(insignificantXmlFeatureIds);
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/AbstractXmlNamedColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/AbstractXmlNamedColumn.java
index aa6a0a25a9..aedb293ea0 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/AbstractXmlNamedColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/AbstractXmlNamedColumn.java
@@ -145,7 +145,7 @@ public abstract class AbstractXmlNamedColumn extends XmlEObject
super();
this.owner = owner;
}
-
+
@Override
protected void addInsignificantXmlFeatureIdsTo(Set<Integer> insignificantXmlFeatureIds) {
super.addInsignificantXmlFeatureIdsTo(insignificantXmlFeatureIds);
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmFactory.java
index 2b302ece90..e3231bbe6a 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmFactory.java
@@ -154,6 +154,12 @@ public class OrmFactory extends EFactoryImpl
return createXmlUniqueConstraint();
case OrmPackage.XML_CASCADE :
return createXmlCascade();
+ case OrmPackage.XML_ID_CLASS :
+ return createXmlIdClass();
+ case OrmPackage.XML_INHERITANCE :
+ return createXmlInheritance();
+ case OrmPackage.XML_MAP_KEY :
+ return createXmlMapKey();
default :
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -642,6 +648,36 @@ public class OrmFactory extends EFactoryImpl
return xmlCascade;
}
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public XmlIdClass createXmlIdClass() {
+ XmlIdClass xmlIdClass = new XmlIdClass();
+ return xmlIdClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public XmlInheritance createXmlInheritance() {
+ XmlInheritance xmlInheritance = new XmlInheritance();
+ return xmlInheritance;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public XmlMapKey createXmlMapKey() {
+ XmlMapKey xmlMapKey = new XmlMapKey();
+ return xmlMapKey;
+ }
+
public XmlPrimaryKeyJoinColumn createXmlPrimaryKeyJoinColumn(IAbstractJoinColumn.Owner owner) {
XmlPrimaryKeyJoinColumn xmlPrimaryKeyJoinColumn = new XmlPrimaryKeyJoinColumn(owner);
return xmlPrimaryKeyJoinColumn;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmPackage.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmPackage.java
index d83ea91c42..e925faf222 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmPackage.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmPackage.java
@@ -773,13 +773,31 @@ public class OrmPackage extends EPackageImpl
public static final int XML_ENTITY_INTERNAL__DISCRIMINATOR_COLUMN_FOR_XML = XML_TYPE_MAPPING_FEATURE_COUNT + 1;
/**
+ * The feature id for the '<em><b>Id Class For Xml</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_ENTITY_INTERNAL__ID_CLASS_FOR_XML = XML_TYPE_MAPPING_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Inheritance For Xml</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_ENTITY_INTERNAL__INHERITANCE_FOR_XML = XML_TYPE_MAPPING_FEATURE_COUNT + 3;
+
+ /**
* The feature id for the '<em><b>Specified Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SPECIFIED_NAME = XML_TYPE_MAPPING_FEATURE_COUNT + 2;
+ public static final int XML_ENTITY_INTERNAL__SPECIFIED_NAME = XML_TYPE_MAPPING_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Default Name</b></em>' attribute.
@@ -788,7 +806,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__DEFAULT_NAME = XML_TYPE_MAPPING_FEATURE_COUNT + 3;
+ public static final int XML_ENTITY_INTERNAL__DEFAULT_NAME = XML_TYPE_MAPPING_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Table</b></em>' containment reference.
@@ -797,7 +815,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__TABLE = XML_TYPE_MAPPING_FEATURE_COUNT + 4;
+ public static final int XML_ENTITY_INTERNAL__TABLE = XML_TYPE_MAPPING_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>Specified Secondary Tables</b></em>' containment reference list.
@@ -806,7 +824,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES = XML_TYPE_MAPPING_FEATURE_COUNT + 5;
+ public static final int XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES = XML_TYPE_MAPPING_FEATURE_COUNT + 7;
/**
* The feature id for the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
@@ -815,7 +833,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__PRIMARY_KEY_JOIN_COLUMNS = XML_TYPE_MAPPING_FEATURE_COUNT + 6;
+ public static final int XML_ENTITY_INTERNAL__PRIMARY_KEY_JOIN_COLUMNS = XML_TYPE_MAPPING_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Specified Primary Key Join Columns</b></em>' containment reference list.
@@ -824,7 +842,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS = XML_TYPE_MAPPING_FEATURE_COUNT + 7;
+ public static final int XML_ENTITY_INTERNAL__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS = XML_TYPE_MAPPING_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>Default Primary Key Join Columns</b></em>' containment reference list.
@@ -833,7 +851,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS = XML_TYPE_MAPPING_FEATURE_COUNT + 8;
+ public static final int XML_ENTITY_INTERNAL__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS = XML_TYPE_MAPPING_FEATURE_COUNT + 10;
/**
* The feature id for the '<em><b>Inheritance Strategy</b></em>' attribute.
@@ -842,7 +860,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__INHERITANCE_STRATEGY = XML_TYPE_MAPPING_FEATURE_COUNT + 9;
+ public static final int XML_ENTITY_INTERNAL__INHERITANCE_STRATEGY = XML_TYPE_MAPPING_FEATURE_COUNT + 11;
/**
* The feature id for the '<em><b>Default Discriminator Value</b></em>' attribute.
@@ -851,7 +869,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__DEFAULT_DISCRIMINATOR_VALUE = XML_TYPE_MAPPING_FEATURE_COUNT + 10;
+ public static final int XML_ENTITY_INTERNAL__DEFAULT_DISCRIMINATOR_VALUE = XML_TYPE_MAPPING_FEATURE_COUNT + 12;
/**
* The feature id for the '<em><b>Specified Discriminator Value</b></em>' attribute.
@@ -860,7 +878,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SPECIFIED_DISCRIMINATOR_VALUE = XML_TYPE_MAPPING_FEATURE_COUNT + 11;
+ public static final int XML_ENTITY_INTERNAL__SPECIFIED_DISCRIMINATOR_VALUE = XML_TYPE_MAPPING_FEATURE_COUNT + 13;
/**
* The feature id for the '<em><b>Discriminator Value</b></em>' attribute.
@@ -869,7 +887,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__DISCRIMINATOR_VALUE = XML_TYPE_MAPPING_FEATURE_COUNT + 12;
+ public static final int XML_ENTITY_INTERNAL__DISCRIMINATOR_VALUE = XML_TYPE_MAPPING_FEATURE_COUNT + 14;
/**
* The feature id for the '<em><b>Discriminator Column</b></em>' containment reference.
@@ -878,7 +896,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__DISCRIMINATOR_COLUMN = XML_TYPE_MAPPING_FEATURE_COUNT + 13;
+ public static final int XML_ENTITY_INTERNAL__DISCRIMINATOR_COLUMN = XML_TYPE_MAPPING_FEATURE_COUNT + 15;
/**
* The feature id for the '<em><b>Sequence Generator</b></em>' containment reference.
@@ -887,7 +905,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SEQUENCE_GENERATOR = XML_TYPE_MAPPING_FEATURE_COUNT + 14;
+ public static final int XML_ENTITY_INTERNAL__SEQUENCE_GENERATOR = XML_TYPE_MAPPING_FEATURE_COUNT + 16;
/**
* The feature id for the '<em><b>Table Generator</b></em>' containment reference.
@@ -896,7 +914,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__TABLE_GENERATOR = XML_TYPE_MAPPING_FEATURE_COUNT + 15;
+ public static final int XML_ENTITY_INTERNAL__TABLE_GENERATOR = XML_TYPE_MAPPING_FEATURE_COUNT + 17;
/**
* The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
@@ -905,7 +923,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__ATTRIBUTE_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 16;
+ public static final int XML_ENTITY_INTERNAL__ATTRIBUTE_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 18;
/**
* The feature id for the '<em><b>Specified Attribute Overrides</b></em>' containment reference list.
@@ -914,7 +932,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SPECIFIED_ATTRIBUTE_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 17;
+ public static final int XML_ENTITY_INTERNAL__SPECIFIED_ATTRIBUTE_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 19;
/**
* The feature id for the '<em><b>Default Attribute Overrides</b></em>' containment reference list.
@@ -923,7 +941,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__DEFAULT_ATTRIBUTE_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 18;
+ public static final int XML_ENTITY_INTERNAL__DEFAULT_ATTRIBUTE_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 20;
/**
* The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
@@ -932,7 +950,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__ASSOCIATION_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 19;
+ public static final int XML_ENTITY_INTERNAL__ASSOCIATION_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 21;
/**
* The feature id for the '<em><b>Specified Association Overrides</b></em>' containment reference list.
@@ -941,7 +959,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SPECIFIED_ASSOCIATION_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 20;
+ public static final int XML_ENTITY_INTERNAL__SPECIFIED_ASSOCIATION_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 22;
/**
* The feature id for the '<em><b>Default Association Overrides</b></em>' containment reference list.
@@ -950,7 +968,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__DEFAULT_ASSOCIATION_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 21;
+ public static final int XML_ENTITY_INTERNAL__DEFAULT_ASSOCIATION_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 23;
/**
* The feature id for the '<em><b>Named Queries</b></em>' containment reference list.
@@ -959,7 +977,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__NAMED_QUERIES = XML_TYPE_MAPPING_FEATURE_COUNT + 22;
+ public static final int XML_ENTITY_INTERNAL__NAMED_QUERIES = XML_TYPE_MAPPING_FEATURE_COUNT + 24;
/**
* The feature id for the '<em><b>Named Native Queries</b></em>' containment reference list.
@@ -968,7 +986,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__NAMED_NATIVE_QUERIES = XML_TYPE_MAPPING_FEATURE_COUNT + 23;
+ public static final int XML_ENTITY_INTERNAL__NAMED_NATIVE_QUERIES = XML_TYPE_MAPPING_FEATURE_COUNT + 25;
/**
* The feature id for the '<em><b>Id Class</b></em>' attribute.
@@ -977,7 +995,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__ID_CLASS = XML_TYPE_MAPPING_FEATURE_COUNT + 24;
+ public static final int XML_ENTITY_INTERNAL__ID_CLASS = XML_TYPE_MAPPING_FEATURE_COUNT + 26;
/**
* The feature id for the '<em><b>Secondary Tables</b></em>' containment reference list.
@@ -986,7 +1004,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SECONDARY_TABLES = XML_TYPE_MAPPING_FEATURE_COUNT + 25;
+ public static final int XML_ENTITY_INTERNAL__SECONDARY_TABLES = XML_TYPE_MAPPING_FEATURE_COUNT + 27;
/**
* The feature id for the '<em><b>Virtual Secondary Tables</b></em>' containment reference list.
@@ -995,7 +1013,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__VIRTUAL_SECONDARY_TABLES = XML_TYPE_MAPPING_FEATURE_COUNT + 26;
+ public static final int XML_ENTITY_INTERNAL__VIRTUAL_SECONDARY_TABLES = XML_TYPE_MAPPING_FEATURE_COUNT + 28;
/**
* The number of structural features of the '<em>Xml Entity Internal</em>' class.
@@ -1004,7 +1022,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL_FEATURE_COUNT = XML_TYPE_MAPPING_FEATURE_COUNT + 27;
+ public static final int XML_ENTITY_INTERNAL_FEATURE_COUNT = XML_TYPE_MAPPING_FEATURE_COUNT + 29;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlEntityForXml <em>Xml Entity For Xml</em>}' class.
@@ -1035,13 +1053,31 @@ public class OrmPackage extends EPackageImpl
public static final int XML_ENTITY_FOR_XML__DISCRIMINATOR_COLUMN_FOR_XML = 1;
/**
+ * The feature id for the '<em><b>Id Class For Xml</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_ENTITY_FOR_XML__ID_CLASS_FOR_XML = 2;
+
+ /**
+ * The feature id for the '<em><b>Inheritance For Xml</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_ENTITY_FOR_XML__INHERITANCE_FOR_XML = 3;
+
+ /**
* The number of structural features of the '<em>Xml Entity For Xml</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_ENTITY_FOR_XML_FEATURE_COUNT = 2;
+ public static final int XML_ENTITY_FOR_XML_FEATURE_COUNT = 4;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlEntity <em>Xml Entity</em>}' class.
@@ -1983,13 +2019,22 @@ public class OrmPackage extends EPackageImpl
public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 6;
/**
+ * The feature id for the '<em><b>Map Key For Xml</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 7;
+
+ /**
* The number of structural features of the '<em>Xml Multi Relationship Mapping Internal</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL_FEATURE_COUNT = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 7;
+ public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL_FEATURE_COUNT = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 8;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml <em>Xml Multi Relationship Mapping For Xml</em>}' class.
@@ -2020,13 +2065,22 @@ public class OrmPackage extends EPackageImpl
public static final int XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__ORDER_BY_FOR_XML = 1;
/**
+ * The feature id for the '<em><b>Map Key For Xml</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__MAP_KEY_FOR_XML = 2;
+
+ /**
* The number of structural features of the '<em>Xml Multi Relationship Mapping For Xml</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML_FEATURE_COUNT = 2;
+ public static final int XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML_FEATURE_COUNT = 3;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMapping <em>Xml Multi Relationship Mapping</em>}' class.
@@ -2265,6 +2319,15 @@ public class OrmPackage extends EPackageImpl
public static final int XML_ONE_TO_MANY__ORDER_BY_FOR_XML = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML;
/**
+ * The feature id for the '<em><b>Map Key For Xml</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_ONE_TO_MANY__MAP_KEY_FOR_XML = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML;
+
+ /**
* The number of structural features of the '<em>Xml One To Many</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2401,6 +2464,15 @@ public class OrmPackage extends EPackageImpl
public static final int XML_MANY_TO_MANY__ORDER_BY_FOR_XML = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML;
/**
+ * The feature id for the '<em><b>Map Key For Xml</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_MANY_TO_MANY__MAP_KEY_FOR_XML = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML;
+
+ /**
* The number of structural features of the '<em>Xml Many To Many</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -5721,6 +5793,90 @@ public class OrmPackage extends EPackageImpl
public static final int XML_CASCADE_FEATURE_COUNT = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 5;
/**
+ * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlIdClass <em>Xml Id Class</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlIdClass
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlIdClass()
+ * @generated
+ */
+ public static final int XML_ID_CLASS = 60;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_ID_CLASS__VALUE = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Xml Id Class</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_ID_CLASS_FEATURE_COUNT = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlInheritance <em>Xml Inheritance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlInheritance
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlInheritance()
+ * @generated
+ */
+ public static final int XML_INHERITANCE = 61;
+
+ /**
+ * The feature id for the '<em><b>Strategy</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_INHERITANCE__STRATEGY = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Xml Inheritance</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_INHERITANCE_FEATURE_COUNT = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlMapKey <em>Xml Map Key</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlMapKey
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlMapKey()
+ * @generated
+ */
+ public static final int XML_MAP_KEY = 62;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_MAP_KEY__NAME = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Xml Map Key</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_MAP_KEY_FEATURE_COUNT = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 1;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -6141,6 +6297,27 @@ public class OrmPackage extends EPackageImpl
private EClass xmlCascadeEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass xmlIdClassEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass xmlInheritanceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass xmlMapKeyEClass = null;
+
+ /**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
@@ -6838,6 +7015,32 @@ public class OrmPackage extends EPackageImpl
}
/**
+ * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.internal.content.orm.XmlEntityForXml#getIdClassForXml <em>Id Class For Xml</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Id Class For Xml</em>'.
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlEntityForXml#getIdClassForXml()
+ * @see #getXmlEntityForXml()
+ * @generated
+ */
+ public EReference getXmlEntityForXml_IdClassForXml() {
+ return (EReference) xmlEntityForXmlEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.internal.content.orm.XmlEntityForXml#getInheritanceForXml <em>Inheritance For Xml</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Inheritance For Xml</em>'.
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlEntityForXml#getInheritanceForXml()
+ * @see #getXmlEntityForXml()
+ * @generated
+ */
+ public EReference getXmlEntityForXml_InheritanceForXml() {
+ return (EReference) xmlEntityForXmlEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
* Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.orm.XmlEntity <em>Xml Entity</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -7047,6 +7250,19 @@ public class OrmPackage extends EPackageImpl
}
/**
+ * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml#getMapKeyForXml <em>Map Key For Xml</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Map Key For Xml</em>'.
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml#getMapKeyForXml()
+ * @see #getXmlMultiRelationshipMappingForXml()
+ * @generated
+ */
+ public EReference getXmlMultiRelationshipMappingForXml_MapKeyForXml() {
+ return (EReference) xmlMultiRelationshipMappingForXmlEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
* Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMapping <em>Xml Multi Relationship Mapping</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -7996,6 +8212,81 @@ public class OrmPackage extends EPackageImpl
}
/**
+ * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.orm.XmlIdClass <em>Xml Id Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Xml Id Class</em>'.
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlIdClass
+ * @generated
+ */
+ public EClass getXmlIdClass() {
+ return xmlIdClassEClass;
+ }
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.content.orm.XmlIdClass#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlIdClass#getValue()
+ * @see #getXmlIdClass()
+ * @generated
+ */
+ public EAttribute getXmlIdClass_Value() {
+ return (EAttribute) xmlIdClassEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.orm.XmlInheritance <em>Xml Inheritance</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Xml Inheritance</em>'.
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlInheritance
+ * @generated
+ */
+ public EClass getXmlInheritance() {
+ return xmlInheritanceEClass;
+ }
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.content.orm.XmlInheritance#getStrategy <em>Strategy</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Strategy</em>'.
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlInheritance#getStrategy()
+ * @see #getXmlInheritance()
+ * @generated
+ */
+ public EAttribute getXmlInheritance_Strategy() {
+ return (EAttribute) xmlInheritanceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.orm.XmlMapKey <em>Xml Map Key</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Xml Map Key</em>'.
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlMapKey
+ * @generated
+ */
+ public EClass getXmlMapKey() {
+ return xmlMapKeyEClass;
+ }
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.content.orm.XmlMapKey#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlMapKey#getName()
+ * @see #getXmlMapKey()
+ * @generated
+ */
+ public EAttribute getXmlMapKey_Name() {
+ return (EAttribute) xmlMapKeyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -8073,6 +8364,8 @@ public class OrmPackage extends EPackageImpl
xmlEntityForXmlEClass = createEClass(XML_ENTITY_FOR_XML);
createEReference(xmlEntityForXmlEClass, XML_ENTITY_FOR_XML__TABLE_FOR_XML);
createEReference(xmlEntityForXmlEClass, XML_ENTITY_FOR_XML__DISCRIMINATOR_COLUMN_FOR_XML);
+ createEReference(xmlEntityForXmlEClass, XML_ENTITY_FOR_XML__ID_CLASS_FOR_XML);
+ createEReference(xmlEntityForXmlEClass, XML_ENTITY_FOR_XML__INHERITANCE_FOR_XML);
xmlEntityEClass = createEClass(XML_ENTITY);
createEReference(xmlEntityEClass, XML_ENTITY__SECONDARY_TABLES);
createEReference(xmlEntityEClass, XML_ENTITY__VIRTUAL_SECONDARY_TABLES);
@@ -8090,6 +8383,7 @@ public class OrmPackage extends EPackageImpl
xmlMultiRelationshipMappingForXmlEClass = createEClass(XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML);
createEReference(xmlMultiRelationshipMappingForXmlEClass, XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__JOIN_TABLE_FOR_XML);
createEReference(xmlMultiRelationshipMappingForXmlEClass, XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__ORDER_BY_FOR_XML);
+ createEReference(xmlMultiRelationshipMappingForXmlEClass, XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__MAP_KEY_FOR_XML);
xmlMultiRelationshipMappingEClass = createEClass(XML_MULTI_RELATIONSHIP_MAPPING);
xmlOneToManyEClass = createEClass(XML_ONE_TO_MANY);
xmlManyToManyEClass = createEClass(XML_MANY_TO_MANY);
@@ -8166,6 +8460,12 @@ public class OrmPackage extends EPackageImpl
xmlQueryHintEClass = createEClass(XML_QUERY_HINT);
xmlUniqueConstraintEClass = createEClass(XML_UNIQUE_CONSTRAINT);
xmlCascadeEClass = createEClass(XML_CASCADE);
+ xmlIdClassEClass = createEClass(XML_ID_CLASS);
+ createEAttribute(xmlIdClassEClass, XML_ID_CLASS__VALUE);
+ xmlInheritanceEClass = createEClass(XML_INHERITANCE);
+ createEAttribute(xmlInheritanceEClass, XML_INHERITANCE__STRATEGY);
+ xmlMapKeyEClass = createEClass(XML_MAP_KEY);
+ createEAttribute(xmlMapKeyEClass, XML_MAP_KEY__NAME);
}
/**
@@ -8312,6 +8612,9 @@ public class OrmPackage extends EPackageImpl
xmlUniqueConstraintEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIUniqueConstraint());
xmlCascadeEClass.getESuperTypes().add(theJpaCorePackage.getXmlEObject());
xmlCascadeEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getICascade());
+ xmlIdClassEClass.getESuperTypes().add(theJpaCorePackage.getXmlEObject());
+ xmlInheritanceEClass.getESuperTypes().add(theJpaCorePackage.getXmlEObject());
+ xmlMapKeyEClass.getESuperTypes().add(theJpaCorePackage.getXmlEObject());
// Initialize classes and features; add operations and parameters
initEClass(xmlRootContentNodeEClass, XmlRootContentNode.class, "XmlRootContentNode", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getXmlRootContentNode_EntityMappings(), this.getEntityMappingsInternal(), this.getEntityMappingsInternal_Root(), "entityMappings", null, 1, 1, XmlRootContentNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
@@ -8361,6 +8664,8 @@ public class OrmPackage extends EPackageImpl
initEClass(xmlEntityForXmlEClass, XmlEntityForXml.class, "XmlEntityForXml", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getXmlEntityForXml_TableForXml(), this.getXmlTable(), null, "tableForXml", null, 0, 1, XmlEntityForXml.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getXmlEntityForXml_DiscriminatorColumnForXml(), this.getXmlDiscriminatorColumn(), null, "discriminatorColumnForXml", null, 0, 1, XmlEntityForXml.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getXmlEntityForXml_IdClassForXml(), this.getXmlIdClass(), null, "idClassForXml", null, 0, 1, XmlEntityForXml.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getXmlEntityForXml_InheritanceForXml(), this.getXmlInheritance(), null, "inheritanceForXml", null, 0, 1, XmlEntityForXml.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(xmlEntityEClass, XmlEntity.class, "XmlEntity", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getXmlEntity_SecondaryTables(), theJpaCoreMappingsPackage.getISecondaryTable(), null, "secondaryTables", null, 0, -1, XmlEntity.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getXmlEntity_VirtualSecondaryTables(), theJpaCoreMappingsPackage.getISecondaryTable(), null, "virtualSecondaryTables", null, 0, -1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -8378,6 +8683,7 @@ public class OrmPackage extends EPackageImpl
initEClass(xmlMultiRelationshipMappingForXmlEClass, XmlMultiRelationshipMappingForXml.class, "XmlMultiRelationshipMappingForXml", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getXmlMultiRelationshipMappingForXml_JoinTableForXml(), this.getXmlJoinTable(), null, "joinTableForXml", null, 0, 1, XmlMultiRelationshipMappingForXml.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getXmlMultiRelationshipMappingForXml_OrderByForXml(), this.getXmlOrderBy(), null, "orderByForXml", null, 0, 1, XmlMultiRelationshipMappingForXml.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getXmlMultiRelationshipMappingForXml_MapKeyForXml(), this.getXmlMapKey(), null, "mapKeyForXml", null, 0, 1, XmlMultiRelationshipMappingForXml.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(xmlMultiRelationshipMappingEClass, XmlMultiRelationshipMapping.class, "XmlMultiRelationshipMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(xmlOneToManyEClass, XmlOneToMany.class, "XmlOneToMany", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(xmlManyToManyEClass, XmlManyToMany.class, "XmlManyToMany", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -8456,6 +8762,12 @@ public class OrmPackage extends EPackageImpl
initEClass(xmlQueryHintEClass, XmlQueryHint.class, "XmlQueryHint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(xmlUniqueConstraintEClass, XmlUniqueConstraint.class, "XmlUniqueConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(xmlCascadeEClass, XmlCascade.class, "XmlCascade", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEClass(xmlIdClassEClass, XmlIdClass.class, "XmlIdClass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getXmlIdClass_Value(), theEcorePackage.getEString(), "value", "", 0, 1, XmlIdClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(xmlInheritanceEClass, XmlInheritance.class, "XmlInheritance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getXmlInheritance_Strategy(), theJpaCoreMappingsPackage.getInheritanceType(), "strategy", "", 0, 1, XmlInheritance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(xmlMapKeyEClass, XmlMapKey.class, "XmlMapKey", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getXmlMapKey_Name(), ecorePackage.getEString(), "name", null, 0, 1, XmlMapKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource
createResource(eNS_URI);
}
@@ -8878,6 +9190,22 @@ public class OrmPackage extends EPackageImpl
public static final EReference XML_ENTITY_FOR_XML__DISCRIMINATOR_COLUMN_FOR_XML = eINSTANCE.getXmlEntityForXml_DiscriminatorColumnForXml();
/**
+ * The meta object literal for the '<em><b>Id Class For Xml</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EReference XML_ENTITY_FOR_XML__ID_CLASS_FOR_XML = eINSTANCE.getXmlEntityForXml_IdClassForXml();
+
+ /**
+ * The meta object literal for the '<em><b>Inheritance For Xml</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EReference XML_ENTITY_FOR_XML__INHERITANCE_FOR_XML = eINSTANCE.getXmlEntityForXml_InheritanceForXml();
+
+ /**
* The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlEntity <em>Xml Entity</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -9038,6 +9366,14 @@ public class OrmPackage extends EPackageImpl
public static final EReference XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__ORDER_BY_FOR_XML = eINSTANCE.getXmlMultiRelationshipMappingForXml_OrderByForXml();
/**
+ * The meta object literal for the '<em><b>Map Key For Xml</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EReference XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__MAP_KEY_FOR_XML = eINSTANCE.getXmlMultiRelationshipMappingForXml_MapKeyForXml();
+
+ /**
* The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMapping <em>Xml Multi Relationship Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -9722,5 +10058,59 @@ public class OrmPackage extends EPackageImpl
* @generated
*/
public static final EClass XML_CASCADE = eINSTANCE.getXmlCascade();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlIdClass <em>Xml Id Class</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlIdClass
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlIdClass()
+ * @generated
+ */
+ public static final EClass XML_ID_CLASS = eINSTANCE.getXmlIdClass();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EAttribute XML_ID_CLASS__VALUE = eINSTANCE.getXmlIdClass_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlInheritance <em>Xml Inheritance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlInheritance
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlInheritance()
+ * @generated
+ */
+ public static final EClass XML_INHERITANCE = eINSTANCE.getXmlInheritance();
+
+ /**
+ * The meta object literal for the '<em><b>Strategy</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EAttribute XML_INHERITANCE__STRATEGY = eINSTANCE.getXmlInheritance_Strategy();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlMapKey <em>Xml Map Key</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlMapKey
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlMapKey()
+ * @generated
+ */
+ public static final EClass XML_MAP_KEY = eINSTANCE.getXmlMapKey();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EAttribute XML_MAP_KEY__NAME = eINSTANCE.getXmlMapKey_Name();
}
} //OrmPackage
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlDiscriminatorColumn.java
index 5bba6e3159..e44f2cfebf 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlDiscriminatorColumn.java
@@ -135,7 +135,7 @@ public class XmlDiscriminatorColumn extends AbstractXmlNamedColumn
protected XmlDiscriminatorColumn(INamedColumn.Owner owner) {
super(owner);
}
-
+
@Override
protected void addInsignificantXmlFeatureIdsTo(Set<Integer> insignificantXmlFeatureIds) {
super.addInsignificantXmlFeatureIdsTo(insignificantXmlFeatureIds);
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityForXml.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityForXml.java
index a69d44d1ff..20578b091d 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityForXml.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityForXml.java
@@ -21,6 +21,8 @@ import org.eclipse.emf.ecore.EObject;
* <ul>
* <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlEntityForXml#getTableForXml <em>Table For Xml</em>}</li>
* <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlEntityForXml#getDiscriminatorColumnForXml <em>Discriminator Column For Xml</em>}</li>
+ * <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlEntityForXml#getIdClassForXml <em>Id Class For Xml</em>}</li>
+ * <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlEntityForXml#getInheritanceForXml <em>Inheritance For Xml</em>}</li>
* </ul>
* </p>
*
@@ -81,4 +83,56 @@ public interface XmlEntityForXml extends EObject
* @generated
*/
void setDiscriminatorColumnForXml(XmlDiscriminatorColumn value);
+
+ /**
+ * Returns the value of the '<em><b>Id Class For Xml</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Id Class For Xml</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Id Class For Xml</em>' containment reference.
+ * @see #setIdClassForXml(XmlIdClass)
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlEntityForXml_IdClassForXml()
+ * @model containment="true"
+ * @generated
+ */
+ XmlIdClass getIdClassForXml();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlEntityForXml#getIdClassForXml <em>Id Class For Xml</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Id Class For Xml</em>' containment reference.
+ * @see #getIdClassForXml()
+ * @generated
+ */
+ void setIdClassForXml(XmlIdClass value);
+
+ /**
+ * Returns the value of the '<em><b>Inheritance For Xml</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Inheritance For Xml</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Inheritance For Xml</em>' containment reference.
+ * @see #setInheritanceForXml(XmlInheritance)
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlEntityForXml_InheritanceForXml()
+ * @model containment="true"
+ * @generated
+ */
+ XmlInheritance getInheritanceForXml();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlEntityForXml#getInheritanceForXml <em>Inheritance For Xml</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Inheritance For Xml</em>' containment reference.
+ * @see #getInheritanceForXml()
+ * @generated
+ */
+ void setInheritanceForXml(XmlInheritance value);
} // XmlEntityForXml
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityInternal.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityInternal.java
index 35b77c53bc..e670a345d1 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityInternal.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityInternal.java
@@ -12,8 +12,10 @@ package org.eclipse.jpt.core.internal.content.orm;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
+import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
@@ -64,6 +66,26 @@ public class XmlEntityInternal extends XmlTypeMapping
implements XmlEntityForXml, XmlEntity
{
/**
+ * The cached value of the '{@link #getIdClassForXml() <em>Id Class For Xml</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIdClassForXml()
+ * @generated
+ * @ordered
+ */
+ protected XmlIdClass idClassForXml;
+
+ /**
+ * The cached value of the '{@link #getInheritanceForXml() <em>Inheritance For Xml</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInheritanceForXml()
+ * @generated
+ * @ordered
+ */
+ protected XmlInheritance inheritanceForXml;
+
+ /**
* The default value of the '{@link #getSpecifiedName() <em>Specified Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -340,6 +362,57 @@ public class XmlEntityInternal extends XmlTypeMapping
this.discriminatorColumn = OrmFactory.eINSTANCE.createXmlDiscriminatorColumn(new IDiscriminatorColumn.Owner(this));
((InternalEObject) this.discriminatorColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY_INTERNAL__DISCRIMINATOR_COLUMN, null, null);
this.getDefaultPrimaryKeyJoinColumns().add(this.createPrimaryKeyJoinColumn(0));
+ this.eAdapters().add(this.buildListener());
+ }
+
+ protected Adapter buildListener() {
+ return new AdapterImpl() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ XmlEntityInternal.this.notifyChanged(notification);
+ }
+ };
+ }
+
+ protected void notifyChanged(Notification notification) {
+ switch (notification.getFeatureID(IEntity.class)) {
+ case JpaCoreMappingsPackage.IENTITY__ID_CLASS :
+ idClassChanged();
+ break;
+ case JpaCoreMappingsPackage.IENTITY__INHERITANCE_STRATEGY :
+ inheritanceStrategyChanged();
+ break;
+ default :
+ break;
+ }
+ switch (notification.getFeatureID(XmlEntityForXml.class)) {
+ case OrmPackage.XML_ENTITY_FOR_XML__ID_CLASS_FOR_XML :
+ xmlIdClassChanged();
+ break;
+ case OrmPackage.XML_ENTITY_FOR_XML__INHERITANCE_FOR_XML :
+ xmlInheritanceChanged();
+ break;
+ default :
+ break;
+ }
+ }
+
+ protected void inheritanceStrategyChanged() {
+ if (getInheritanceStrategy() == InheritanceType.DEFAULT) {
+ setInheritanceForXml(null);
+ }
+ else {
+ if (getInheritanceForXml() == null) {
+ setInheritanceForXml(OrmFactory.eINSTANCE.createXmlInheritance());
+ }
+ getInheritanceForXml().setStrategy(getInheritanceStrategy());
+ }
+ }
+
+ protected void xmlInheritanceChanged() {
+ if (getInheritanceForXml() == null) {
+ setInheritanceStrategy(null);
+ }
}
private ITable.Owner buildTableOwner() {
@@ -496,6 +569,12 @@ public class XmlEntityInternal extends XmlTypeMapping
return virtualSecondaryTables;
}
+ protected void xmlIdClassChanged() {
+ if (getIdClassForXml() == null) {
+ setIdClass(null);
+ }
+ }
+
public boolean containsSecondaryTable(String name) {
return containsSecondaryTable(name, getSecondaryTables());
}
@@ -1036,6 +1115,18 @@ public class XmlEntityInternal extends XmlTypeMapping
eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_INTERNAL__ID_CLASS, oldIdClass, idClass));
}
+ protected void idClassChanged() {
+ if (getIdClass() == null) {
+ setIdClassForXml(null);
+ }
+ else {
+ if (getIdClassForXml() == null) {
+ setIdClassForXml(OrmFactory.eINSTANCE.createXmlIdClass());
+ }
+ getIdClassForXml().setValue(getIdClass());
+ }
+ }
+
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1157,6 +1248,124 @@ public class XmlEntityInternal extends XmlTypeMapping
}
/**
+ * Returns the value of the '<em><b>Id Class For Xml</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Id Class For Xml</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Id Class For Xml</em>' containment reference.
+ * @see #setIdClassForXml(XmlIdClass)
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlEntityForXml_IdClassForXml()
+ * @model containment="true"
+ * @generated
+ */
+ public XmlIdClass getIdClassForXml() {
+ return idClassForXml;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetIdClassForXml(XmlIdClass newIdClassForXml, NotificationChain msgs) {
+ XmlIdClass oldIdClassForXml = idClassForXml;
+ idClassForXml = newIdClassForXml;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_INTERNAL__ID_CLASS_FOR_XML, oldIdClassForXml, newIdClassForXml);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlEntityInternal#getIdClassForXml <em>Id Class For Xml</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Id Class For Xml</em>' containment reference.
+ * @see #getIdClassForXml()
+ * @generated
+ */
+ public void setIdClassForXml(XmlIdClass newIdClassForXml) {
+ if (newIdClassForXml != idClassForXml) {
+ NotificationChain msgs = null;
+ if (idClassForXml != null)
+ msgs = ((InternalEObject) idClassForXml).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY_INTERNAL__ID_CLASS_FOR_XML, null, msgs);
+ if (newIdClassForXml != null)
+ msgs = ((InternalEObject) newIdClassForXml).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY_INTERNAL__ID_CLASS_FOR_XML, null, msgs);
+ msgs = basicSetIdClassForXml(newIdClassForXml, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_INTERNAL__ID_CLASS_FOR_XML, newIdClassForXml, newIdClassForXml));
+ }
+
+ /**
+ * Returns the value of the '<em><b>Inheritance For Xml</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Inheritance For Xml</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Inheritance For Xml</em>' containment reference.
+ * @see #setInheritanceForXml(XmlInheritance)
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlEntityForXml_InheritanceForXml()
+ * @model containment="true"
+ * @generated
+ */
+ public XmlInheritance getInheritanceForXml() {
+ return inheritanceForXml;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetInheritanceForXml(XmlInheritance newInheritanceForXml, NotificationChain msgs) {
+ XmlInheritance oldInheritanceForXml = inheritanceForXml;
+ inheritanceForXml = newInheritanceForXml;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_INTERNAL__INHERITANCE_FOR_XML, oldInheritanceForXml, newInheritanceForXml);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlEntityInternal#getInheritanceForXml <em>Inheritance For Xml</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Inheritance For Xml</em>' containment reference.
+ * @see #getInheritanceForXml()
+ * @generated
+ */
+ public void setInheritanceForXml(XmlInheritance newInheritanceForXml) {
+ if (newInheritanceForXml != inheritanceForXml) {
+ NotificationChain msgs = null;
+ if (inheritanceForXml != null)
+ msgs = ((InternalEObject) inheritanceForXml).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY_INTERNAL__INHERITANCE_FOR_XML, null, msgs);
+ if (newInheritanceForXml != null)
+ msgs = ((InternalEObject) newInheritanceForXml).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY_INTERNAL__INHERITANCE_FOR_XML, null, msgs);
+ msgs = basicSetInheritanceForXml(newInheritanceForXml, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_INTERNAL__INHERITANCE_FOR_XML, newInheritanceForXml, newInheritanceForXml));
+ }
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -1164,6 +1373,10 @@ public class XmlEntityInternal extends XmlTypeMapping
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
+ case OrmPackage.XML_ENTITY_INTERNAL__ID_CLASS_FOR_XML :
+ return basicSetIdClassForXml(null, msgs);
+ case OrmPackage.XML_ENTITY_INTERNAL__INHERITANCE_FOR_XML :
+ return basicSetInheritanceForXml(null, msgs);
case OrmPackage.XML_ENTITY_INTERNAL__TABLE :
return basicSetTable(null, msgs);
case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES :
@@ -1233,6 +1446,10 @@ public class XmlEntityInternal extends XmlTypeMapping
return getTableForXml();
case OrmPackage.XML_ENTITY_INTERNAL__DISCRIMINATOR_COLUMN_FOR_XML :
return getDiscriminatorColumnForXml();
+ case OrmPackage.XML_ENTITY_INTERNAL__ID_CLASS_FOR_XML :
+ return getIdClassForXml();
+ case OrmPackage.XML_ENTITY_INTERNAL__INHERITANCE_FOR_XML :
+ return getInheritanceForXml();
case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_NAME :
return getSpecifiedName();
case OrmPackage.XML_ENTITY_INTERNAL__DEFAULT_NAME :
@@ -1302,6 +1519,12 @@ public class XmlEntityInternal extends XmlTypeMapping
case OrmPackage.XML_ENTITY_INTERNAL__DISCRIMINATOR_COLUMN_FOR_XML :
setDiscriminatorColumnForXml((XmlDiscriminatorColumn) newValue);
return;
+ case OrmPackage.XML_ENTITY_INTERNAL__ID_CLASS_FOR_XML :
+ setIdClassForXml((XmlIdClass) newValue);
+ return;
+ case OrmPackage.XML_ENTITY_INTERNAL__INHERITANCE_FOR_XML :
+ setInheritanceForXml((XmlInheritance) newValue);
+ return;
case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_NAME :
setSpecifiedName((String) newValue);
return;
@@ -1381,6 +1604,12 @@ public class XmlEntityInternal extends XmlTypeMapping
case OrmPackage.XML_ENTITY_INTERNAL__DISCRIMINATOR_COLUMN_FOR_XML :
setDiscriminatorColumnForXml((XmlDiscriminatorColumn) null);
return;
+ case OrmPackage.XML_ENTITY_INTERNAL__ID_CLASS_FOR_XML :
+ setIdClassForXml((XmlIdClass) null);
+ return;
+ case OrmPackage.XML_ENTITY_INTERNAL__INHERITANCE_FOR_XML :
+ setInheritanceForXml((XmlInheritance) null);
+ return;
case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_NAME :
setSpecifiedName(SPECIFIED_NAME_EDEFAULT);
return;
@@ -1448,6 +1677,10 @@ public class XmlEntityInternal extends XmlTypeMapping
return getTableForXml() != null;
case OrmPackage.XML_ENTITY_INTERNAL__DISCRIMINATOR_COLUMN_FOR_XML :
return getDiscriminatorColumnForXml() != null;
+ case OrmPackage.XML_ENTITY_INTERNAL__ID_CLASS_FOR_XML :
+ return idClassForXml != null;
+ case OrmPackage.XML_ENTITY_INTERNAL__INHERITANCE_FOR_XML :
+ return inheritanceForXml != null;
case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_NAME :
return SPECIFIED_NAME_EDEFAULT == null ? specifiedName != null : !SPECIFIED_NAME_EDEFAULT.equals(specifiedName);
case OrmPackage.XML_ENTITY_INTERNAL__DEFAULT_NAME :
@@ -1515,6 +1748,10 @@ public class XmlEntityInternal extends XmlTypeMapping
return OrmPackage.XML_ENTITY_FOR_XML__TABLE_FOR_XML;
case OrmPackage.XML_ENTITY_INTERNAL__DISCRIMINATOR_COLUMN_FOR_XML :
return OrmPackage.XML_ENTITY_FOR_XML__DISCRIMINATOR_COLUMN_FOR_XML;
+ case OrmPackage.XML_ENTITY_INTERNAL__ID_CLASS_FOR_XML :
+ return OrmPackage.XML_ENTITY_FOR_XML__ID_CLASS_FOR_XML;
+ case OrmPackage.XML_ENTITY_INTERNAL__INHERITANCE_FOR_XML :
+ return OrmPackage.XML_ENTITY_FOR_XML__INHERITANCE_FOR_XML;
default :
return -1;
}
@@ -1597,6 +1834,10 @@ public class XmlEntityInternal extends XmlTypeMapping
return OrmPackage.XML_ENTITY_INTERNAL__TABLE_FOR_XML;
case OrmPackage.XML_ENTITY_FOR_XML__DISCRIMINATOR_COLUMN_FOR_XML :
return OrmPackage.XML_ENTITY_INTERNAL__DISCRIMINATOR_COLUMN_FOR_XML;
+ case OrmPackage.XML_ENTITY_FOR_XML__ID_CLASS_FOR_XML :
+ return OrmPackage.XML_ENTITY_INTERNAL__ID_CLASS_FOR_XML;
+ case OrmPackage.XML_ENTITY_FOR_XML__INHERITANCE_FOR_XML :
+ return OrmPackage.XML_ENTITY_INTERNAL__INHERITANCE_FOR_XML;
default :
return -1;
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlIdClass.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlIdClass.java
new file mode 100644
index 0000000000..32ec3ae6ec
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlIdClass.java
@@ -0,0 +1,208 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.content.orm;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.XmlEObject;
+
+/**
+ * This class is purely used to hack around a problem with the translators and representing
+ * the IEntity.idClass feature in the xml. Added this object to correspend to the
+ * id-class type in the xml since the translator path approach caused the id-class element
+ * to be added even when the idClass was null. This occurred when you added a new persistent
+ * type to the orm.xml via the structure view.
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlIdClass#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlIdClass()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlIdClass extends XmlEObject
+{
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final String VALUE_EDEFAULT = "";
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected String value = VALUE_EDEFAULT;
+
+ protected XmlIdClass() {
+ super();
+ this.eAdapters().add(this.buildListener());
+ }
+
+ protected Adapter buildListener() {
+ return new AdapterImpl() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ XmlIdClass.this.notifyChanged(notification);
+ }
+ };
+ }
+
+ protected void notifyChanged(Notification notification) {
+ switch (notification.getFeatureID(XmlIdClass.class)) {
+ case OrmPackage.XML_ID_CLASS__VALUE :
+ valueChanged();
+ break;
+ default :
+ break;
+ }
+ }
+
+ private XmlEntityInternal xmlEntity() {
+ return (XmlEntityInternal) eContainer();
+ }
+
+ protected void valueChanged() {
+ xmlEntity().setIdClass(getValue());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return OrmPackage.Literals.XML_ID_CLASS;
+ }
+
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * The default value is <code>""</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(String)
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlIdClass_Value()
+ * @model default=""
+ * @generated
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlIdClass#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ public void setValue(String newValue) {
+ String oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID_CLASS__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case OrmPackage.XML_ID_CLASS__VALUE :
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case OrmPackage.XML_ID_CLASS__VALUE :
+ setValue((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case OrmPackage.XML_ID_CLASS__VALUE :
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case OrmPackage.XML_ID_CLASS__VALUE :
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy())
+ return super.toString();
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (value: ");
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+} // XmlIdClass
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlInheritance.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlInheritance.java
new file mode 100644
index 0000000000..6e06610ee6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlInheritance.java
@@ -0,0 +1,214 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.content.orm;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.XmlEObject;
+import org.eclipse.jpt.core.internal.mappings.InheritanceType;
+
+/**
+ * <!-- begin-user-doc -->
+ * This class is purely used to hack around a problem with the translators and representing
+ * the IEntity.inheritanceStrategy feature in the xml. Added this object to correspend to the
+ * inheritance type in the xml since the translator path approach caused the inheritance element
+ * to be added even when the strategy was default was null. This occurred when you added a new persistent
+ * type to the orm.xml via the structure view.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlInheritance#getStrategy <em>Strategy</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlInheritance()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlInheritance extends XmlEObject
+{
+ /**
+ * The default value of the '{@link #getStrategy() <em>Strategy</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStrategy()
+ * @generated
+ * @ordered
+ */
+ protected static final InheritanceType STRATEGY_EDEFAULT = InheritanceType.DEFAULT;
+
+ /**
+ * The cached value of the '{@link #getStrategy() <em>Strategy</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStrategy()
+ * @generated
+ * @ordered
+ */
+ protected InheritanceType strategy = STRATEGY_EDEFAULT;
+
+ protected XmlInheritance() {
+ super();
+ this.eAdapters().add(this.buildListener());
+ }
+
+ protected Adapter buildListener() {
+ return new AdapterImpl() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ XmlInheritance.this.notifyChanged(notification);
+ }
+ };
+ }
+
+ protected void notifyChanged(Notification notification) {
+ switch (notification.getFeatureID(XmlInheritance.class)) {
+ case OrmPackage.XML_INHERITANCE__STRATEGY :
+ strategyChanged();
+ break;
+ default :
+ break;
+ }
+ }
+
+ private XmlEntityInternal xmlEntity() {
+ return (XmlEntityInternal) eContainer();
+ }
+
+ protected void strategyChanged() {
+ xmlEntity().setInheritanceStrategy(getStrategy());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return OrmPackage.Literals.XML_INHERITANCE;
+ }
+
+ /**
+ * Returns the value of the '<em><b>Strategy</b></em>' attribute.
+ * The default value is <code>""</code>.
+ * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.InheritanceType}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Strategy</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Strategy</em>' attribute.
+ * @see org.eclipse.jpt.core.internal.mappings.InheritanceType
+ * @see #setStrategy(InheritanceType)
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlInheritance_Strategy()
+ * @model default=""
+ * @generated
+ */
+ public InheritanceType getStrategy() {
+ return strategy;
+ }
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlInheritance#getStrategy <em>Strategy</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Strategy</em>' attribute.
+ * @see org.eclipse.jpt.core.internal.mappings.InheritanceType
+ * @see #getStrategy()
+ * @generated
+ */
+ public void setStrategy(InheritanceType newStrategy) {
+ InheritanceType oldStrategy = strategy;
+ strategy = newStrategy == null ? STRATEGY_EDEFAULT : newStrategy;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_INHERITANCE__STRATEGY, oldStrategy, strategy));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case OrmPackage.XML_INHERITANCE__STRATEGY :
+ return getStrategy();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case OrmPackage.XML_INHERITANCE__STRATEGY :
+ setStrategy((InheritanceType) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case OrmPackage.XML_INHERITANCE__STRATEGY :
+ setStrategy(STRATEGY_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case OrmPackage.XML_INHERITANCE__STRATEGY :
+ return strategy != STRATEGY_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy())
+ return super.toString();
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (strategy: ");
+ result.append(strategy);
+ result.append(')');
+ return result.toString();
+ }
+} // XmlInheritance
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMapKey.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMapKey.java
new file mode 100644
index 0000000000..c2a9fa38ff
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMapKey.java
@@ -0,0 +1,209 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.content.orm;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.XmlEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * This class is purely used to hack around a problem with the translators and representing
+ * the IMultiRelationshipMapping.mapKey feature in the xml. Added this object to correspend to the
+ * map-key type in the xml since the translator path approach caused the map-key element
+ * to be added even when the mapKey String was null. This occurred when you added a new 1-m or m-m
+ * mapping to the orm.xml via the structure view.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlMapKey#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlMapKey()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlMapKey extends XmlEObject
+{
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ protected XmlMapKey() {
+ super();
+ this.eAdapters().add(this.buildListener());
+ }
+
+ protected Adapter buildListener() {
+ return new AdapterImpl() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ XmlMapKey.this.notifyChanged(notification);
+ }
+ };
+ }
+
+ protected void notifyChanged(Notification notification) {
+ switch (notification.getFeatureID(XmlMapKey.class)) {
+ case OrmPackage.XML_MAP_KEY__NAME :
+ nameChanged();
+ break;
+ default :
+ break;
+ }
+ }
+
+ private XmlMultiRelationshipMapping xmlMultiRelationshipMapping() {
+ return (XmlMultiRelationshipMapping) eContainer();
+ }
+
+ protected void nameChanged() {
+ xmlMultiRelationshipMapping().setMapKey(getName());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return OrmPackage.Literals.XML_MAP_KEY;
+ }
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlMapKey_Name()
+ * @model
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlMapKey#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MAP_KEY__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case OrmPackage.XML_MAP_KEY__NAME :
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case OrmPackage.XML_MAP_KEY__NAME :
+ setName((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case OrmPackage.XML_MAP_KEY__NAME :
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case OrmPackage.XML_MAP_KEY__NAME :
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy())
+ return super.toString();
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+} // XmlMapKey
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingForXml.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingForXml.java
index be3173cbe3..a58b4e041c 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingForXml.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingForXml.java
@@ -20,6 +20,7 @@ import org.eclipse.emf.ecore.EObject;
* <ul>
* <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml#getJoinTableForXml <em>Join Table For Xml</em>}</li>
* <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml#getOrderByForXml <em>Order By For Xml</em>}</li>
+ * <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml#getMapKeyForXml <em>Map Key For Xml</em>}</li>
* </ul>
* </p>
*
@@ -80,4 +81,30 @@ public interface XmlMultiRelationshipMappingForXml extends EObject
* @generated
*/
void setOrderByForXml(XmlOrderBy value);
+
+ /**
+ * Returns the value of the '<em><b>Map Key For Xml</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Map Key For Xml</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Map Key For Xml</em>' containment reference.
+ * @see #setMapKeyForXml(XmlMapKey)
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlMultiRelationshipMappingForXml_MapKeyForXml()
+ * @model containment="true"
+ * @generated
+ */
+ XmlMapKey getMapKeyForXml();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml#getMapKeyForXml <em>Map Key For Xml</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Map Key For Xml</em>' containment reference.
+ * @see #getMapKeyForXml()
+ * @generated
+ */
+ void setMapKeyForXml(XmlMapKey value);
} // XmlMultiRelationshipMappingForXml
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingInternal.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingInternal.java
index 6d5c9564fe..26ef44e803 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingInternal.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingInternal.java
@@ -9,8 +9,10 @@
package org.eclipse.jpt.core.internal.content.orm;
import java.util.Iterator;
+import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
@@ -121,12 +123,67 @@ public abstract class XmlMultiRelationshipMappingInternal
*/
protected String mapKey = MAP_KEY_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getMapKeyForXml() <em>Map Key For Xml</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMapKeyForXml()
+ * @generated
+ * @ordered
+ */
+ protected XmlMapKey mapKeyForXml;
+
protected XmlMultiRelationshipMappingInternal() {
super();
this.joinTable = OrmFactory.eINSTANCE.createXmlJoinTable(buildJoinTableOwner());
((InternalEObject) this.joinTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE, null, null);
this.orderBy = OrmFactory.eINSTANCE.createXmlOrderBy();
((InternalEObject) this.orderBy).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY, null, null);
+ this.eAdapters().add(this.buildListener());
+ }
+
+ protected Adapter buildListener() {
+ return new AdapterImpl() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ XmlMultiRelationshipMappingInternal.this.notifyChanged(notification);
+ }
+ };
+ }
+
+ protected void notifyChanged(Notification notification) {
+ switch (notification.getFeatureID(IMultiRelationshipMapping.class)) {
+ case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__MAP_KEY :
+ mapKeyChanged();
+ break;
+ default :
+ break;
+ }
+ switch (notification.getFeatureID(XmlMultiRelationshipMappingForXml.class)) {
+ case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML :
+ xmlMapKeyChanged();
+ break;
+ default :
+ break;
+ }
+ }
+
+ protected void mapKeyChanged() {
+ if (getMapKey() == null) {
+ setMapKeyForXml(null);
+ }
+ else {
+ if (getMapKeyForXml() == null) {
+ setMapKeyForXml(OrmFactory.eINSTANCE.createXmlMapKey());
+ }
+ getMapKeyForXml().setName(getMapKey());
+ }
+ }
+
+ protected void xmlMapKeyChanged() {
+ if (getMapKeyForXml() == null) {
+ setMapKey(null);
+ }
}
private IJoinTable.Owner buildJoinTableOwner() {
@@ -378,6 +435,65 @@ public abstract class XmlMultiRelationshipMappingInternal
}
/**
+ * Returns the value of the '<em><b>Map Key For Xml</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Map Key For Xml</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Map Key For Xml</em>' containment reference.
+ * @see #setMapKeyForXml(XmlMapKey)
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlMultiRelationshipMappingForXml_MapKeyForXml()
+ * @model containment="true"
+ * @generated
+ */
+ public XmlMapKey getMapKeyForXml() {
+ return mapKeyForXml;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetMapKeyForXml(XmlMapKey newMapKeyForXml, NotificationChain msgs) {
+ XmlMapKey oldMapKeyForXml = mapKeyForXml;
+ mapKeyForXml = newMapKeyForXml;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML, oldMapKeyForXml, newMapKeyForXml);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingInternal#getMapKeyForXml <em>Map Key For Xml</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Map Key For Xml</em>' containment reference.
+ * @see #getMapKeyForXml()
+ * @generated
+ */
+ public void setMapKeyForXml(XmlMapKey newMapKeyForXml) {
+ if (newMapKeyForXml != mapKeyForXml) {
+ NotificationChain msgs = null;
+ if (mapKeyForXml != null)
+ msgs = ((InternalEObject) mapKeyForXml).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML, null, msgs);
+ if (newMapKeyForXml != null)
+ msgs = ((InternalEObject) newMapKeyForXml).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML, null, msgs);
+ msgs = basicSetMapKeyForXml(newMapKeyForXml, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML, newMapKeyForXml, newMapKeyForXml));
+ }
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -389,6 +505,8 @@ public abstract class XmlMultiRelationshipMappingInternal
return basicSetJoinTable(null, msgs);
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY :
return basicSetOrderBy(null, msgs);
+ case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML :
+ return basicSetMapKeyForXml(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -415,6 +533,8 @@ public abstract class XmlMultiRelationshipMappingInternal
return getJoinTableForXml();
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML :
return getOrderByForXml();
+ case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML :
+ return getMapKeyForXml();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -442,6 +562,9 @@ public abstract class XmlMultiRelationshipMappingInternal
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML :
setOrderByForXml((XmlOrderBy) newValue);
return;
+ case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML :
+ setMapKeyForXml((XmlMapKey) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -469,6 +592,9 @@ public abstract class XmlMultiRelationshipMappingInternal
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML :
setOrderByForXml((XmlOrderBy) null);
return;
+ case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML :
+ setMapKeyForXml((XmlMapKey) null);
+ return;
}
super.eUnset(featureID);
}
@@ -495,6 +621,8 @@ public abstract class XmlMultiRelationshipMappingInternal
return getJoinTableForXml() != null;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML :
return getOrderByForXml() != null;
+ case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML :
+ return mapKeyForXml != null;
}
return super.eIsSet(featureID);
}
@@ -534,6 +662,8 @@ public abstract class XmlMultiRelationshipMappingInternal
return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__JOIN_TABLE_FOR_XML;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML :
return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__ORDER_BY_FOR_XML;
+ case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML :
+ return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__MAP_KEY_FOR_XML;
default :
return -1;
}
@@ -582,6 +712,8 @@ public abstract class XmlMultiRelationshipMappingInternal
return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE_FOR_XML;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__ORDER_BY_FOR_XML :
return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML;
+ case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__MAP_KEY_FOR_XML :
+ return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML;
default :
return -1;
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/EntityTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/EntityTranslator.java
index 3adc4ba000..8715ba66c6 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/EntityTranslator.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/EntityTranslator.java
@@ -135,7 +135,7 @@ public class EntityTranslator extends TypeMappingTranslator
}
protected Translator createInheritanceTranslator() {
- return new EnumeratorTranslator(ENTITY__INHERITANCE + "/" + STRATEGY, MAPPINGS_PKG.getIEntity_InheritanceStrategy(), DOM_ATTRIBUTE);
+ return new InheritanceTranslator(ENTITY__INHERITANCE, JPA_CORE_XML_PKG.getXmlEntityForXml_InheritanceForXml());
}
protected Translator createPrimaryKeyJoinColumnsTranslator() {
@@ -178,7 +178,7 @@ public class EntityTranslator extends TypeMappingTranslator
}
protected Translator createIdClassTranslator() {
- return new Translator(ID_CLASS + "/" + ID_CLASS__CLASS, JpaCoreMappingsPackage.eINSTANCE.getIEntity_IdClass(), DOM_ATTRIBUTE);
+ return new IdClassTranslator(ID_CLASS, JPA_CORE_XML_PKG.getXmlEntityForXml_IdClassForXml());
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/IdClassTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/IdClassTranslator.java
new file mode 100644
index 0000000000..4d10df1e2f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/IdClassTranslator.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Oracle. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors: Oracle. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.content.orm.resource;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.internal.content.orm.OrmFactory;
+import org.eclipse.jpt.core.internal.content.orm.OrmPackage;
+import org.eclipse.wst.common.internal.emf.resource.IDTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+public class IdClassTranslator extends Translator implements OrmXmlMapper
+{
+ protected static final OrmPackage JPA_CORE_XML_PKG =
+ OrmPackage.eINSTANCE;
+
+
+ private Translator[] children;
+
+ public IdClassTranslator(String domNameAndPath, EStructuralFeature aFeature) {
+ super(domNameAndPath, aFeature);
+ }
+
+ public Translator[] getChildren(Object target, int versionID) {
+ if (children == null) {
+ children = createChildren();
+ }
+ return children;
+ }
+
+ protected Translator[] createChildren() {
+ return new Translator[] {
+ IDTranslator.INSTANCE,
+ createValueTranslator(),
+ };
+ }
+
+ protected Translator createValueTranslator() {
+ return new Translator(ID_CLASS__CLASS, JPA_CORE_XML_PKG.getXmlIdClass_Value(), DOM_ATTRIBUTE);
+ }
+
+ @Override
+ public EObject createEMFObject(String nodeName, String readAheadName) {
+ return OrmFactory.eINSTANCE.createXmlIdClass();
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/InheritanceTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/InheritanceTranslator.java
new file mode 100644
index 0000000000..2373d91e8c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/InheritanceTranslator.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Oracle. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors: Oracle. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.content.orm.resource;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.internal.content.orm.OrmFactory;
+import org.eclipse.jpt.core.internal.content.orm.OrmPackage;
+import org.eclipse.wst.common.internal.emf.resource.IDTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+public class InheritanceTranslator extends Translator implements OrmXmlMapper
+{
+ protected static final OrmPackage JPA_CORE_XML_PKG =
+ OrmPackage.eINSTANCE;
+
+
+ private Translator[] children;
+
+ public InheritanceTranslator(String domNameAndPath, EStructuralFeature aFeature) {
+ super(domNameAndPath, aFeature);
+ }
+
+ public Translator[] getChildren(Object target, int versionID) {
+ if (children == null) {
+ children = createChildren();
+ }
+ return children;
+ }
+
+ protected Translator[] createChildren() {
+ return new Translator[] {
+ IDTranslator.INSTANCE,
+ createStrategyTranslator(),
+ };
+ }
+
+ protected Translator createStrategyTranslator() {
+ return new EnumeratorTranslator(INHERITANCE__STRATEGY, JPA_CORE_XML_PKG.getXmlInheritance_Strategy(), DOM_ATTRIBUTE);
+ }
+
+ @Override
+ public EObject createEMFObject(String nodeName, String readAheadName) {
+ return OrmFactory.eINSTANCE.createXmlInheritance();
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/MapKeyTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/MapKeyTranslator.java
index 4587f54b94..8206e09ca3 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/MapKeyTranslator.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/MapKeyTranslator.java
@@ -8,52 +8,46 @@
*******************************************************************************/
package org.eclipse.jpt.core.internal.content.orm.resource;
-import java.util.Collections;
-import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jpt.core.internal.mappings.EnumType;
+import org.eclipse.jpt.core.internal.content.orm.OrmFactory;
+import org.eclipse.jpt.core.internal.content.orm.OrmPackage;
+import org.eclipse.wst.common.internal.emf.resource.IDTranslator;
import org.eclipse.wst.common.internal.emf.resource.Translator;
-/**
- * There is a bug in the translator framework that causes
- * enumerators in xml elements and enumerators in xml attributes
- * to be treated differently. When the enumerator is an attribute
- * setting the model to the default causes the attribute to be removed.
- * With an element is causes the default literal to be placed in
- * the tag.
- *
- * The problem is wrapped up in the emf unsettable attribute as well.
- * For attributes the eIsSet method returns false for the default value
- * For elements the eIsSet method returns true for the default value.
- * I don't want to have to use the unsettable option in emf since that would
- * require that I call different api. I am not sure yet what the bug is in
- * the translator, so I have entered one ~KFM
- */
-public class MapKeyTranslator extends Translator
+
+public class MapKeyTranslator extends Translator implements OrmXmlMapper
{
+ protected static final OrmPackage JPA_CORE_XML_PKG =
+ OrmPackage.eINSTANCE;
+
- public MapKeyTranslator(String domNameAndPath, EStructuralFeature aFeature, int style) {
- super(domNameAndPath, aFeature, style);
+ private Translator[] children;
+
+ public MapKeyTranslator(String domNameAndPath, EStructuralFeature aFeature) {
+ super(domNameAndPath, aFeature);
}
- @Override
- public Object getMOFValue(EObject mofObject) {
- EnumType type = (EnumType) super.getMOFValue(mofObject);
- if (type == EnumType.DEFAULT) {
- return null;
+ public Translator[] getChildren(Object target, int versionID) {
+ if (children == null) {
+ children = createChildren();
}
- return type;
+ return children;
}
-
+
+ protected Translator[] createChildren() {
+ return new Translator[] {
+ IDTranslator.INSTANCE,
+ createNameTranslator(),
+ };
+ }
+
+ protected Translator createNameTranslator() {
+ return new Translator(MAP_KEY__NAME, JPA_CORE_XML_PKG.getXmlMapKey_Name(), DOM_ATTRIBUTE);
+ }
+
@Override
- public List getMOFChildren(EObject mofObject) {
- List result = super.getMOFChildren(mofObject);
- if(result != null && result.size() > 0) {
- EnumType type = (EnumType) result.get(0);
- if(type.getValue() == EnumType.DEFAULT_VALUE)
- result = Collections.EMPTY_LIST;
- }
- return result;
+ public EObject createEMFObject(String nodeName, String readAheadName) {
+ return OrmFactory.eINSTANCE.createXmlIdClass();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/MultiRelationshipTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/MultiRelationshipTranslator.java
index e7fdaa1741..ddbb995a21 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/MultiRelationshipTranslator.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/MultiRelationshipTranslator.java
@@ -51,6 +51,6 @@ public abstract class MultiRelationshipTranslator extends RelationshipTranslator
}
protected Translator createMapKeyTranslator() {
- return new Translator(MAP_KEY + "/" + MAP_KEY__NAME, JpaCoreMappingsPackage.eINSTANCE.getIMultiRelationshipMapping_MapKey(), DOM_ATTRIBUTE);
+ return new MapKeyTranslator(MAP_KEY, JPA_CORE_XML_PKG.getXmlMultiRelationshipMappingForXml_MapKeyForXml());
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrmXmlMapper.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrmXmlMapper.java
index c46f03842e..26d6540174 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrmXmlMapper.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrmXmlMapper.java
@@ -69,6 +69,7 @@ public interface OrmXmlMapper
String ENTITY__TABLE = "table"; //$NON-NLS-1$
String ENTITY__PRIMARY_KEY_JOIN_COLUMN = "primary-key-join-column"; //$NON-NLS-1$
String ENTITY__INHERITANCE = "inheritance"; //$NON-NLS-1$
+ String INHERITANCE__STRATEGY = "strategy"; //$NON-NLS-1$
String ENTITY__DISCRIMINATOR_VALUE = "discriminator-value"; //$NON-NLS-1$
String ENTITY__DISCRIMINATOR_COLUMN = "discriminator-column"; //$NON-NLS-1$
String ENTITY__SEQUENCE_GENERATOR = "sequence-generator"; //$NON-NLS-1$
@@ -162,7 +163,7 @@ public interface OrmXmlMapper
String SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMN = "primary-key-join-column"; //$NON-NLS-1$
String SEQUENCE_GENERATOR = "sequence-generator"; //$NON-NLS-1$
String SEQUENCE_GENERATOR__SEQUENCE_NAME = "sequence-name"; //$NON-NLS-1$
- String STRATEGY = "strategy"; //$NON-NLS-1$
+
String TABLE_GENERATOR = "table-generator"; //$NON-NLS-1$
String TABLE_GENERATOR__TABLE = "table"; //$NON-NLS-1$
String TABLE_GENERATOR__CATALOG = "catalog"; //$NON-NLS-1$
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmAdapterFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmAdapterFactory.java
index cb2b2a92cc..0b5cb18202 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmAdapterFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmAdapterFactory.java
@@ -55,10 +55,13 @@ import org.eclipse.jpt.core.internal.content.orm.XmlEntityInternal;
import org.eclipse.jpt.core.internal.content.orm.XmlGeneratedValue;
import org.eclipse.jpt.core.internal.content.orm.XmlGenerator;
import org.eclipse.jpt.core.internal.content.orm.XmlId;
+import org.eclipse.jpt.core.internal.content.orm.XmlIdClass;
+import org.eclipse.jpt.core.internal.content.orm.XmlInheritance;
import org.eclipse.jpt.core.internal.content.orm.XmlJoinColumn;
import org.eclipse.jpt.core.internal.content.orm.XmlJoinTable;
import org.eclipse.jpt.core.internal.content.orm.XmlManyToMany;
import org.eclipse.jpt.core.internal.content.orm.XmlManyToOne;
+import org.eclipse.jpt.core.internal.content.orm.XmlMapKey;
import org.eclipse.jpt.core.internal.content.orm.XmlMappedSuperclass;
import org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMapping;
import org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml;
@@ -485,6 +488,21 @@ public class OrmAdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter caseXmlIdClass(XmlIdClass object) {
+ return createXmlIdClassAdapter();
+ }
+
+ @Override
+ public Adapter caseXmlInheritance(XmlInheritance object) {
+ return createXmlInheritanceAdapter();
+ }
+
+ @Override
+ public Adapter caseXmlMapKey(XmlMapKey object) {
+ return createXmlMapKeyAdapter();
+ }
+
+ @Override
public Adapter caseIJpaEObject(IJpaEObject object) {
return createIJpaEObjectAdapter();
}
@@ -1581,6 +1599,48 @@ public class OrmAdapterFactory extends AdapterFactoryImpl
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.orm.XmlIdClass <em>Xml Id Class</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlIdClass
+ * @generated
+ */
+ public Adapter createXmlIdClassAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.orm.XmlInheritance <em>Xml Inheritance</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlInheritance
+ * @generated
+ */
+ public Adapter createXmlInheritanceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.orm.XmlMapKey <em>Xml Map Key</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlMapKey
+ * @generated
+ */
+ public Adapter createXmlMapKeyAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.IJpaEObject <em>IJpa EObject</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmSwitch.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmSwitch.java
index 3b2f6aaf47..6969850722 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmSwitch.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmSwitch.java
@@ -54,10 +54,13 @@ import org.eclipse.jpt.core.internal.content.orm.XmlEntityInternal;
import org.eclipse.jpt.core.internal.content.orm.XmlGeneratedValue;
import org.eclipse.jpt.core.internal.content.orm.XmlGenerator;
import org.eclipse.jpt.core.internal.content.orm.XmlId;
+import org.eclipse.jpt.core.internal.content.orm.XmlIdClass;
+import org.eclipse.jpt.core.internal.content.orm.XmlInheritance;
import org.eclipse.jpt.core.internal.content.orm.XmlJoinColumn;
import org.eclipse.jpt.core.internal.content.orm.XmlJoinTable;
import org.eclipse.jpt.core.internal.content.orm.XmlManyToMany;
import org.eclipse.jpt.core.internal.content.orm.XmlManyToOne;
+import org.eclipse.jpt.core.internal.content.orm.XmlMapKey;
import org.eclipse.jpt.core.internal.content.orm.XmlMappedSuperclass;
import org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMapping;
import org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml;
@@ -1479,6 +1482,57 @@ public class OrmSwitch<T>
result = defaultCase(theEObject);
return result;
}
+ case OrmPackage.XML_ID_CLASS : {
+ XmlIdClass xmlIdClass = (XmlIdClass) theEObject;
+ T result = caseXmlIdClass(xmlIdClass);
+ if (result == null)
+ result = caseXmlEObject(xmlIdClass);
+ if (result == null)
+ result = caseJpaEObject(xmlIdClass);
+ if (result == null)
+ result = caseIXmlEObject(xmlIdClass);
+ if (result == null)
+ result = caseIJpaEObject(xmlIdClass);
+ if (result == null)
+ result = caseIJpaSourceObject(xmlIdClass);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case OrmPackage.XML_INHERITANCE : {
+ XmlInheritance xmlInheritance = (XmlInheritance) theEObject;
+ T result = caseXmlInheritance(xmlInheritance);
+ if (result == null)
+ result = caseXmlEObject(xmlInheritance);
+ if (result == null)
+ result = caseJpaEObject(xmlInheritance);
+ if (result == null)
+ result = caseIXmlEObject(xmlInheritance);
+ if (result == null)
+ result = caseIJpaEObject(xmlInheritance);
+ if (result == null)
+ result = caseIJpaSourceObject(xmlInheritance);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case OrmPackage.XML_MAP_KEY : {
+ XmlMapKey xmlMapKey = (XmlMapKey) theEObject;
+ T result = caseXmlMapKey(xmlMapKey);
+ if (result == null)
+ result = caseXmlEObject(xmlMapKey);
+ if (result == null)
+ result = caseJpaEObject(xmlMapKey);
+ if (result == null)
+ result = caseIXmlEObject(xmlMapKey);
+ if (result == null)
+ result = caseIJpaEObject(xmlMapKey);
+ if (result == null)
+ result = caseIJpaSourceObject(xmlMapKey);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
default :
return defaultCase(theEObject);
}
@@ -2340,6 +2394,51 @@ public class OrmSwitch<T>
}
/**
+ * Returns the result of interpretting the object as an instance of '<em>Xml Id Class</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Xml Id Class</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseXmlIdClass(XmlIdClass object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Xml Inheritance</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Xml Inheritance</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseXmlInheritance(XmlInheritance object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Xml Map Key</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Xml Map Key</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseXmlMapKey(XmlMapKey object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpretting the object as an instance of '<em>IJpa EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITable.java
index 96735757f3..77763ff27a 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITable.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITable.java
@@ -269,12 +269,16 @@ public interface ITable extends IJpaSourceObject
ITypeMapping getTypeMapping();
}
- class UniqueConstraintOwner implements IUniqueConstraint.Owner {
+
+ class UniqueConstraintOwner implements IUniqueConstraint.Owner
+ {
private final ITable table;
+
public UniqueConstraintOwner(ITable table) {
super();
this.table = table;
}
+
public Iterator<String> candidateUniqueConstraintColumnNames() {
return this.table.dbTable().columnNames();
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITableGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITableGenerator.java
index 11c42856d6..3b7aaf92e4 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITableGenerator.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITableGenerator.java
@@ -412,12 +412,15 @@ public interface ITableGenerator extends IGenerator
Table dbTable();
- class UniqueConstraintOwner implements IUniqueConstraint.Owner {
+ class UniqueConstraintOwner implements IUniqueConstraint.Owner
+ {
private final ITableGenerator tableGenerator;
+
public UniqueConstraintOwner(ITableGenerator tableGenerator) {
super();
this.tableGenerator = tableGenerator;
}
+
public Iterator<String> candidateUniqueConstraintColumnNames() {
return this.tableGenerator.dbTable().columnNames();
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IUniqueConstraint.java
index 40bc94a14a..ca1984e9f0 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IUniqueConstraint.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IUniqueConstraint.java
@@ -50,8 +50,8 @@ public interface IUniqueConstraint extends IJpaSourceObject
/**
* All containers must implement this interface.
*/
- interface Owner {
+ interface Owner
+ {
Iterator<String> candidateUniqueConstraintColumnNames();
}
-
}

Back to the top