Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2007-05-07 15:42:48 -0400
committerkmoore2007-05-07 15:42:48 -0400
commitb8aa9807444c959b5d359db12374a7859fb16dff (patch)
tree8ccfb85ff30ea32a3128a9283da93706428f5ed5
parent12d956def54e9320119b80a2116072f35e3a1e34 (diff)
downloadwebtools.dali-b8aa9807444c959b5d359db12374a7859fb16dff.tar.gz
webtools.dali-b8aa9807444c959b5d359db12374a7859fb16dff.tar.xz
webtools.dali-b8aa9807444c959b5d359db12374a7859fb16dff.zip
moved IDiscriminatorColumn to the INamedColumn hierarchy
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/model/core.ecore7
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/model/coreModels.genmodel6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/model/java.ecore2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/model/orm.ecore6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaDiscriminatorColumn.java279
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsPackage.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmPackage.java98
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlDiscriminatorColumn.java272
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/DiscriminatorColumnTranslator.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmSwitch.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IDiscriminatorColumn.java100
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/JpaCoreMappingsPackage.java128
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/util/JpaCoreMappingsSwitch.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InheritanceComposite.java6
15 files changed, 101 insertions, 876 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/core.ecore b/jpa/plugins/org.eclipse.jpt.core/model/core.ecore
index 84ecb1fb29..0b1c222325 100644
--- a/jpa/plugins/org.eclipse.jpt.core/model/core.ecore
+++ b/jpa/plugins/org.eclipse.jpt.core/model/core.ecore
@@ -393,13 +393,8 @@
eType="#//mappings/IJoinColumn" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IDiscriminatorColumn" abstract="true"
- interface="true" eSuperTypes="#//IJpaSourceObject">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="defaultName" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="specifiedName" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
- changeable="false" volatile="true" transient="true" derived="true"/>
+ interface="true" eSuperTypes="#//mappings/INamedColumn">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="discriminatorType" eType="#//mappings/DiscriminatorType"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="columnDefinition" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="defaultLength" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"
defaultValueLiteral="31"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="specifiedLength" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/coreModels.genmodel b/jpa/plugins/org.eclipse.jpt.core/model/coreModels.genmodel
index 8482f39ca5..98e96f02b6 100644
--- a/jpa/plugins/org.eclipse.jpt.core/model/coreModels.genmodel
+++ b/jpa/plugins/org.eclipse.jpt.core/model/coreModels.genmodel
@@ -304,11 +304,7 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference core.ecore#//mappings/IAssociationOverride/defaultJoinColumns"/>
</genClasses>
<genClasses ecoreClass="core.ecore#//mappings/IDiscriminatorColumn">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute core.ecore#//mappings/IDiscriminatorColumn/defaultName"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute core.ecore#//mappings/IDiscriminatorColumn/specifiedName"/>
- <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute core.ecore#//mappings/IDiscriminatorColumn/name"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute core.ecore#//mappings/IDiscriminatorColumn/discriminatorType"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute core.ecore#//mappings/IDiscriminatorColumn/columnDefinition"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute core.ecore#//mappings/IDiscriminatorColumn/defaultLength"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute core.ecore#//mappings/IDiscriminatorColumn/specifiedLength"/>
<genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute core.ecore#//mappings/IDiscriminatorColumn/length"/>
@@ -600,9 +596,7 @@
<genClasses ecoreClass="orm.ecore#//XmlAttributeOverride"/>
<genClasses ecoreClass="orm.ecore#//XmlAssociationOverride"/>
<genClasses ecoreClass="orm.ecore#//XmlDiscriminatorColumn">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlDiscriminatorColumn/specifiedNameForXml"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlDiscriminatorColumn/discriminatorTypeForXml"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlDiscriminatorColumn/columnDefinitionForXml"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlDiscriminatorColumn/specifiedLengthForXml"/>
</genClasses>
<genClasses ecoreClass="orm.ecore#//XmlSecondaryTable"/>
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/java.ecore b/jpa/plugins/org.eclipse.jpt.core/model/java.ecore
index 4e387b0b97..fdfe164b2c 100644
--- a/jpa/plugins/org.eclipse.jpt.core/model/java.ecore
+++ b/jpa/plugins/org.eclipse.jpt.core/model/java.ecore
@@ -71,7 +71,7 @@
<eClassifiers xsi:type="ecore:EClass" name="JavaOverride" abstract="true" eSuperTypes="#//JavaEObject core.ecore#//mappings/IOverride"/>
<eClassifiers xsi:type="ecore:EClass" name="JavaAttributeOverride" eSuperTypes="#//mappings/JavaOverride core.ecore#//mappings/IAttributeOverride"/>
<eClassifiers xsi:type="ecore:EClass" name="JavaAssociationOverride" eSuperTypes="#//mappings/JavaOverride core.ecore#//mappings/IAssociationOverride"/>
- <eClassifiers xsi:type="ecore:EClass" name="JavaDiscriminatorColumn" eSuperTypes="#//JavaEObject core.ecore#//mappings/IDiscriminatorColumn"/>
+ <eClassifiers xsi:type="ecore:EClass" name="JavaDiscriminatorColumn" eSuperTypes="#//mappings/JavaNamedColumn core.ecore#//mappings/IDiscriminatorColumn"/>
<eClassifiers xsi:type="ecore:EClass" name="JavaPrimaryKeyJoinColumn" eSuperTypes="#//mappings/JavaNamedColumn core.ecore#//mappings/IPrimaryKeyJoinColumn"/>
<eClassifiers xsi:type="ecore:EClass" name="JavaGeneratedValue" eSuperTypes="#//JavaEObject core.ecore#//mappings/IGeneratedValue"/>
<eClassifiers xsi:type="ecore:EClass" name="JavaGenerator" abstract="true" eSuperTypes="#//JavaEObject core.ecore#//mappings/IGenerator"/>
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore b/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore
index 2ee6c9b047..7993507183 100644
--- a/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore
+++ b/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore
@@ -239,13 +239,9 @@
<eClassifiers xsi:type="ecore:EClass" name="XmlOverride" abstract="true" eSuperTypes="core.ecore#//XmlEObject core.ecore#//mappings/IOverride"/>
<eClassifiers xsi:type="ecore:EClass" name="XmlAttributeOverride" eSuperTypes="#//XmlOverride core.ecore#//mappings/IAttributeOverride #//IXmlColumnMapping"/>
<eClassifiers xsi:type="ecore:EClass" name="XmlAssociationOverride" eSuperTypes="#//XmlOverride core.ecore#//mappings/IAssociationOverride"/>
- <eClassifiers xsi:type="ecore:EClass" name="XmlDiscriminatorColumn" eSuperTypes="core.ecore#//XmlEObject core.ecore#//mappings/IDiscriminatorColumn">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="specifiedNameForXml" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
- volatile="true"/>
+ <eClassifiers xsi:type="ecore:EClass" name="XmlDiscriminatorColumn" eSuperTypes="#//AbstractXmlNamedColumn core.ecore#//mappings/IDiscriminatorColumn">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="discriminatorTypeForXml"
eType="ecore:EEnum core.ecore#//mappings/DiscriminatorType" volatile="true"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="columnDefinitionForXml"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" volatile="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="specifiedLengthForXml"
eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"
volatile="true"/>
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaDiscriminatorColumn.java
index e59295ef9d..df94dadd1c 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaDiscriminatorColumn.java
@@ -14,7 +14,6 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.ITextRange;
-import org.eclipse.jpt.core.internal.content.java.JavaEObject;
import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
import org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
@@ -40,78 +39,21 @@ import org.eclipse.jpt.db.internal.Table;
* @model kind="class"
* @generated
*/
-public class JavaDiscriminatorColumn extends JavaEObject
+public class JavaDiscriminatorColumn extends JavaNamedColumn
implements IDiscriminatorColumn
{
private Type type;
private AnnotationElementAdapter discriminatorTypeAdapter;
- private AnnotationElementAdapter nameAdapter;
-
private IntAnnotationElementAdapter lengthAdapter;
- private AnnotationElementAdapter columnDefinitionAdapter;
-
private static final DeclarationAnnotationAdapter ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.DISCRIMINATOR_COLUMN);
private static final DeclarationAnnotationElementAdapter DISCRIMINATOR_TYPE_ADAPTER = buildDiscriminatorTypeAdapter();
- private static final DeclarationAnnotationElementAdapter NAME_ADAPTER = buildAnnotationElementAdapter(JPA.DISCRIMINATOR_COLUMN__NAME);
-
private static final DeclarationAnnotationElementAdapter LENGTH_ADAPTER = buildAnnotationElementAdapter(JPA.DISCRIMINATOR_COLUMN__LENGTH);
- private static final DeclarationAnnotationElementAdapter COLUMN_DEFINITION_ADAPTER = buildAnnotationElementAdapter(JPA.DISCRIMINATOR_COLUMN__COLUMN_DEFINITION);
-
- /**
- * The default value of the '{@link #getDefaultName() <em>Default Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultName()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultName() <em>Default Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultName()
- * @generated
- * @ordered
- */
- protected String defaultName = DEFAULT_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSpecifiedName() <em>Specified Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedName()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedName() <em>Specified Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedName()
- * @generated
- * @ordered
- */
- protected String specifiedName = SPECIFIED_NAME_EDEFAULT;
-
- /**
- * 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 default value of the '{@link #getDiscriminatorType() <em>Discriminator Type</em>}' attribute.
@@ -134,26 +76,6 @@ public class JavaDiscriminatorColumn extends JavaEObject
protected DiscriminatorType discriminatorType = DISCRIMINATOR_TYPE_EDEFAULT;
/**
- * The default value of the '{@link #getColumnDefinition() <em>Column Definition</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumnDefinition()
- * @generated
- * @ordered
- */
- protected static final String COLUMN_DEFINITION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getColumnDefinition() <em>Column Definition</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumnDefinition()
- * @generated
- * @ordered
- */
- protected String columnDefinition = COLUMN_DEFINITION_EDEFAULT;
-
- /**
* The default value of the '{@link #getDefaultLength() <em>Default Length</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -213,27 +135,29 @@ public class JavaDiscriminatorColumn extends JavaEObject
}
protected JavaDiscriminatorColumn(Type type) {
- super();
+ super(null, type, ANNOTATION_ADAPTER);
this.type = type;
this.discriminatorTypeAdapter = new ShortCircuitAnnotationElementAdapter(this.type, DISCRIMINATOR_TYPE_ADAPTER);
- this.nameAdapter = new ShortCircuitAnnotationElementAdapter(this.type, NAME_ADAPTER);
this.lengthAdapter = new IntAnnotationElementAdapter(new ShortCircuitAnnotationElementAdapter(this.type, LENGTH_ADAPTER));
- this.columnDefinitionAdapter = new ShortCircuitAnnotationElementAdapter(this.type, COLUMN_DEFINITION_ADAPTER);
}
@Override
+ protected String nameElementName() {
+ return JPA.DISCRIMINATOR_COLUMN__NAME;
+ }
+
+ @Override
+ protected String columnDefinitionElementName() {
+ return JPA.DISCRIMINATOR_COLUMN__COLUMN_DEFINITION;
+ }
+
+ @Override
protected void notifyChanged(Notification notification) {
super.notifyChanged(notification);
- switch (notification.getFeatureID(INamedColumn.class)) {
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_NAME :
- this.nameAdapter.setValue(notification.getNewValue());
- break;
+ switch (notification.getFeatureID(IDiscriminatorColumn.class)) {
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
this.discriminatorTypeAdapter.setValue(((DiscriminatorType) notification.getNewValue()).convertToJavaAnnotationValue());
break;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION :
- this.columnDefinitionAdapter.setValue(notification.getNewValue());
- break;
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
this.lengthAdapter.setValue(notification.getNewIntValue());
break;
@@ -253,89 +177,6 @@ public class JavaDiscriminatorColumn extends JavaEObject
}
/**
- * Returns the value of the '<em><b>Default Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default 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>Default Name</em>' attribute.
- * @see #setDefaultName(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIDiscriminatorColumn_DefaultName()
- * @model
- * @generated
- */
- public String getDefaultName() {
- return defaultName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn#getDefaultName <em>Default Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Default Name</em>' attribute.
- * @see #getDefaultName()
- * @generated
- */
- public void setDefaultName(String newDefaultName) {
- String oldDefaultName = defaultName;
- defaultName = newDefaultName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_NAME, oldDefaultName, defaultName));
- }
-
- /**
- * Returns the value of the '<em><b>Specified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified 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>Specified Name</em>' attribute.
- * @see #setSpecifiedName(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIDiscriminatorColumn_SpecifiedName()
- * @model
- * @generated
- */
- public String getSpecifiedName() {
- return specifiedName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn#getSpecifiedName <em>Specified Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Name</em>' attribute.
- * @see #getSpecifiedName()
- * @generated
- */
- public void setSpecifiedName(String newSpecifiedName) {
- String oldSpecifiedName = specifiedName;
- specifiedName = newSpecifiedName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_NAME, oldSpecifiedName, specifiedName));
- }
-
- /**
- * 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 org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIDiscriminatorColumn_Name()
- * @model transient="true" changeable="false" volatile="true" derived="true"
- * @generated NOT
- */
- public String getName() {
- return (this.getSpecifiedName() == null) ? getDefaultName() : this.getSpecifiedName();
- }
-
- /**
* Returns the value of the '<em><b>Discriminator Type</b></em>' attribute.
* The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.DiscriminatorType}.
* <!-- begin-user-doc -->
@@ -372,39 +213,6 @@ public class JavaDiscriminatorColumn extends JavaEObject
}
/**
- * Returns the value of the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column Definition</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column Definition</em>' attribute.
- * @see #setColumnDefinition(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIDiscriminatorColumn_ColumnDefinition()
- * @model
- * @generated
- */
- public String getColumnDefinition() {
- return columnDefinition;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn#getColumnDefinition <em>Column Definition</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Column Definition</em>' attribute.
- * @see #getColumnDefinition()
- * @generated
- */
- public void setColumnDefinition(String newColumnDefinition) {
- String oldColumnDefinition = columnDefinition;
- columnDefinition = newColumnDefinition;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION, oldColumnDefinition, columnDefinition));
- }
-
- /**
* Returns the value of the '<em><b>Default Length</b></em>' attribute.
* The default value is <code>"31"</code>.
* <!-- begin-user-doc -->
@@ -497,16 +305,8 @@ public class JavaDiscriminatorColumn extends JavaEObject
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_NAME :
- return getDefaultName();
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_NAME :
- return getSpecifiedName();
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__NAME :
- return getName();
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
return getDiscriminatorType();
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION :
- return getColumnDefinition();
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
return new Integer(getDefaultLength());
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
@@ -525,18 +325,9 @@ public class JavaDiscriminatorColumn extends JavaEObject
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_NAME :
- setDefaultName((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_NAME :
- setSpecifiedName((String) newValue);
- return;
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
setDiscriminatorType((DiscriminatorType) newValue);
return;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION :
- setColumnDefinition((String) newValue);
- return;
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
setDefaultLength(((Integer) newValue).intValue());
return;
@@ -555,18 +346,9 @@ public class JavaDiscriminatorColumn extends JavaEObject
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_NAME :
- setDefaultName(DEFAULT_NAME_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_NAME :
- setSpecifiedName(SPECIFIED_NAME_EDEFAULT);
- return;
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
setDiscriminatorType(DISCRIMINATOR_TYPE_EDEFAULT);
return;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION :
- setColumnDefinition(COLUMN_DEFINITION_EDEFAULT);
- return;
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
setDefaultLength(DEFAULT_LENGTH_EDEFAULT);
return;
@@ -585,16 +367,8 @@ public class JavaDiscriminatorColumn extends JavaEObject
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_NAME :
- return DEFAULT_NAME_EDEFAULT == null ? defaultName != null : !DEFAULT_NAME_EDEFAULT.equals(defaultName);
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_NAME :
- return SPECIFIED_NAME_EDEFAULT == null ? specifiedName != null : !SPECIFIED_NAME_EDEFAULT.equals(specifiedName);
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__NAME :
- return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName());
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
return discriminatorType != DISCRIMINATOR_TYPE_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION :
- return COLUMN_DEFINITION_EDEFAULT == null ? columnDefinition != null : !COLUMN_DEFINITION_EDEFAULT.equals(columnDefinition);
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
return defaultLength != DEFAULT_LENGTH_EDEFAULT;
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
@@ -614,16 +388,8 @@ public class JavaDiscriminatorColumn extends JavaEObject
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
if (baseClass == IDiscriminatorColumn.class) {
switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_NAME :
- return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DEFAULT_NAME;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_NAME :
- return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__SPECIFIED_NAME;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__NAME :
- return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__NAME;
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION :
- return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__COLUMN_DEFINITION;
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DEFAULT_LENGTH;
case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
@@ -646,16 +412,8 @@ public class JavaDiscriminatorColumn extends JavaEObject
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
if (baseClass == IDiscriminatorColumn.class) {
switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DEFAULT_NAME :
- return JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_NAME;
- case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__SPECIFIED_NAME :
- return JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_NAME;
- case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__NAME :
- return JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__NAME;
case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
return JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE;
- case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__COLUMN_DEFINITION :
- return JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION;
case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
return JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH;
case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
@@ -679,14 +437,8 @@ public class JavaDiscriminatorColumn extends JavaEObject
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
- result.append(" (defaultName: ");
- result.append(defaultName);
- result.append(", specifiedName: ");
- result.append(specifiedName);
- result.append(", discriminatorType: ");
+ result.append(" (discriminatorType: ");
result.append(discriminatorType);
- result.append(", columnDefinition: ");
- result.append(columnDefinition);
result.append(", defaultLength: ");
result.append(defaultLength);
result.append(", specifiedLength: ");
@@ -709,10 +461,9 @@ public class JavaDiscriminatorColumn extends JavaEObject
// ********** java annotations -> persistence model **********
public void updateFromJava(CompilationUnit astRoot) {
+ super.updateFromJava(astRoot);
setDiscriminatorType(DiscriminatorType.fromJavaAnnotationValue(this.discriminatorTypeAdapter.getValue(astRoot)));
- setSpecifiedName((String) this.nameAdapter.getValue(astRoot));
setSpecifiedLength(this.lengthAdapter.getValue(astRoot));
- setColumnDefinition((String) this.columnDefinitionAdapter.getValue(astRoot));
}
// ********** static methods **********
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsPackage.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsPackage.java
index a6906fb0ec..5e4c90be76 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsPackage.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsPackage.java
@@ -2483,13 +2483,13 @@ public class JpaJavaMappingsPackage extends EPackageImpl
public static final int JAVA_ASSOCIATION_OVERRIDE_FEATURE_COUNT = JAVA_OVERRIDE_FEATURE_COUNT + 3;
/**
- * The feature id for the '<em><b>Default Name</b></em>' attribute.
+ * The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int JAVA_DISCRIMINATOR_COLUMN__DEFAULT_NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 0;
+ public static final int JAVA_DISCRIMINATOR_COLUMN__NAME = JAVA_NAMED_COLUMN__NAME;
/**
* The feature id for the '<em><b>Specified Name</b></em>' attribute.
@@ -2498,34 +2498,34 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 1;
+ public static final int JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_NAME = JAVA_NAMED_COLUMN__SPECIFIED_NAME;
/**
- * The feature id for the '<em><b>Name</b></em>' attribute.
+ * The feature id for the '<em><b>Default Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int JAVA_DISCRIMINATOR_COLUMN__NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 2;
+ public static final int JAVA_DISCRIMINATOR_COLUMN__DEFAULT_NAME = JAVA_NAMED_COLUMN__DEFAULT_NAME;
/**
- * The feature id for the '<em><b>Discriminator Type</b></em>' attribute.
+ * The feature id for the '<em><b>Column Definition</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 3;
+ public static final int JAVA_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION = JAVA_NAMED_COLUMN__COLUMN_DEFINITION;
/**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
+ * The feature id for the '<em><b>Discriminator Type</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int JAVA_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 4;
+ public static final int JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = JAVA_NAMED_COLUMN_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Default Length</b></em>' attribute.
@@ -2534,7 +2534,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 5;
+ public static final int JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH = JAVA_NAMED_COLUMN_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Specified Length</b></em>' attribute.
@@ -2543,7 +2543,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 6;
+ public static final int JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH = JAVA_NAMED_COLUMN_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Length</b></em>' attribute.
@@ -2552,7 +2552,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_DISCRIMINATOR_COLUMN__LENGTH = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 7;
+ public static final int JAVA_DISCRIMINATOR_COLUMN__LENGTH = JAVA_NAMED_COLUMN_FEATURE_COUNT + 3;
/**
* The number of structural features of the '<em>Java Discriminator Column</em>' class.
@@ -2561,7 +2561,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_DISCRIMINATOR_COLUMN_FEATURE_COUNT = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 8;
+ public static final int JAVA_DISCRIMINATOR_COLUMN_FEATURE_COUNT = JAVA_NAMED_COLUMN_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
@@ -4338,7 +4338,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
javaAttributeOverrideEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIAttributeOverride());
javaAssociationOverrideEClass.getESuperTypes().add(this.getJavaOverride());
javaAssociationOverrideEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIAssociationOverride());
- javaDiscriminatorColumnEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject());
+ javaDiscriminatorColumnEClass.getESuperTypes().add(this.getJavaNamedColumn());
javaDiscriminatorColumnEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIDiscriminatorColumn());
javaPrimaryKeyJoinColumnEClass.getESuperTypes().add(this.getJavaNamedColumn());
javaPrimaryKeyJoinColumnEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIPrimaryKeyJoinColumn());
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java
index f4d27833fb..0fa731f99f 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java
@@ -911,10 +911,14 @@ public class JpaJavaMappingsSwitch<T>
JavaDiscriminatorColumn javaDiscriminatorColumn = (JavaDiscriminatorColumn) theEObject;
T result = caseJavaDiscriminatorColumn(javaDiscriminatorColumn);
if (result == null)
- result = caseJavaEObject(javaDiscriminatorColumn);
+ result = caseJavaNamedColumn(javaDiscriminatorColumn);
if (result == null)
result = caseIDiscriminatorColumn(javaDiscriminatorColumn);
if (result == null)
+ result = caseJavaEObject(javaDiscriminatorColumn);
+ if (result == null)
+ result = caseINamedColumn(javaDiscriminatorColumn);
+ if (result == null)
result = caseJpaEObject(javaDiscriminatorColumn);
if (result == null)
result = caseIJpaSourceObject(javaDiscriminatorColumn);
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 72c5ff5a68..70f8d4c847 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
@@ -4340,13 +4340,13 @@ public class OrmPackage extends EPackageImpl
public static final int XML_DISCRIMINATOR_COLUMN = 46;
/**
- * The feature id for the '<em><b>Default Name</b></em>' attribute.
+ * The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_DISCRIMINATOR_COLUMN__DEFAULT_NAME = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 0;
+ public static final int XML_DISCRIMINATOR_COLUMN__NAME = ABSTRACT_XML_NAMED_COLUMN__NAME;
/**
* The feature id for the '<em><b>Specified Name</b></em>' attribute.
@@ -4355,88 +4355,88 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 1;
+ public static final int XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME = ABSTRACT_XML_NAMED_COLUMN__SPECIFIED_NAME;
/**
- * The feature id for the '<em><b>Name</b></em>' attribute.
+ * The feature id for the '<em><b>Default Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_DISCRIMINATOR_COLUMN__NAME = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 2;
+ public static final int XML_DISCRIMINATOR_COLUMN__DEFAULT_NAME = ABSTRACT_XML_NAMED_COLUMN__DEFAULT_NAME;
/**
- * The feature id for the '<em><b>Discriminator Type</b></em>' attribute.
+ * The feature id for the '<em><b>Column Definition</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 3;
+ public static final int XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION = ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION;
/**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
+ * The feature id for the '<em><b>Specified Name For Xml</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 4;
+ public static final int XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME_FOR_XML = ABSTRACT_XML_NAMED_COLUMN__SPECIFIED_NAME_FOR_XML;
/**
- * The feature id for the '<em><b>Default Length</b></em>' attribute.
+ * The feature id for the '<em><b>Column Definition For Xml</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 5;
+ public static final int XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION_FOR_XML = ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION_FOR_XML;
/**
- * The feature id for the '<em><b>Specified Length</b></em>' attribute.
+ * The feature id for the '<em><b>Discriminator Type</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 6;
+ public static final int XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Length</b></em>' attribute.
+ * The feature id for the '<em><b>Default Length</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_DISCRIMINATOR_COLUMN__LENGTH = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 7;
+ public static final int XML_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 1;
/**
- * The feature id for the '<em><b>Specified Name For Xml</b></em>' attribute.
+ * The feature id for the '<em><b>Specified Length</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME_FOR_XML = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 8;
+ public static final int XML_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 2;
/**
- * The feature id for the '<em><b>Discriminator Type For Xml</b></em>' attribute.
+ * The feature id for the '<em><b>Length</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE_FOR_XML = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 9;
+ public static final int XML_DISCRIMINATOR_COLUMN__LENGTH = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 3;
/**
- * The feature id for the '<em><b>Column Definition For Xml</b></em>' attribute.
+ * The feature id for the '<em><b>Discriminator Type For Xml</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION_FOR_XML = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 10;
+ public static final int XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE_FOR_XML = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Specified Length For Xml</b></em>' attribute.
@@ -4445,7 +4445,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH_FOR_XML = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 11;
+ public static final int XML_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH_FOR_XML = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 5;
/**
* The number of structural features of the '<em>Xml Discriminator Column</em>' class.
@@ -4454,7 +4454,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_DISCRIMINATOR_COLUMN_FEATURE_COUNT = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 12;
+ public static final int XML_DISCRIMINATOR_COLUMN_FEATURE_COUNT = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 6;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlSecondaryTable <em>Xml Secondary Table</em>}' class.
@@ -7488,19 +7488,6 @@ public class OrmPackage extends EPackageImpl
}
/**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.content.orm.XmlDiscriminatorColumn#getSpecifiedNameForXml <em>Specified Name For Xml</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Specified Name For Xml</em>'.
- * @see org.eclipse.jpt.core.internal.content.orm.XmlDiscriminatorColumn#getSpecifiedNameForXml()
- * @see #getXmlDiscriminatorColumn()
- * @generated
- */
- public EAttribute getXmlDiscriminatorColumn_SpecifiedNameForXml() {
- return (EAttribute) xmlDiscriminatorColumnEClass.getEStructuralFeatures().get(0);
- }
-
- /**
* Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.content.orm.XmlDiscriminatorColumn#getDiscriminatorTypeForXml <em>Discriminator Type For Xml</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -7510,20 +7497,7 @@ public class OrmPackage extends EPackageImpl
* @generated
*/
public EAttribute getXmlDiscriminatorColumn_DiscriminatorTypeForXml() {
- return (EAttribute) xmlDiscriminatorColumnEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.content.orm.XmlDiscriminatorColumn#getColumnDefinitionForXml <em>Column Definition For Xml</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Column Definition For Xml</em>'.
- * @see org.eclipse.jpt.core.internal.content.orm.XmlDiscriminatorColumn#getColumnDefinitionForXml()
- * @see #getXmlDiscriminatorColumn()
- * @generated
- */
- public EAttribute getXmlDiscriminatorColumn_ColumnDefinitionForXml() {
- return (EAttribute) xmlDiscriminatorColumnEClass.getEStructuralFeatures().get(2);
+ return (EAttribute) xmlDiscriminatorColumnEClass.getEStructuralFeatures().get(0);
}
/**
@@ -7536,7 +7510,7 @@ public class OrmPackage extends EPackageImpl
* @generated
*/
public EAttribute getXmlDiscriminatorColumn_SpecifiedLengthForXml() {
- return (EAttribute) xmlDiscriminatorColumnEClass.getEStructuralFeatures().get(3);
+ return (EAttribute) xmlDiscriminatorColumnEClass.getEStructuralFeatures().get(1);
}
/**
@@ -7839,9 +7813,7 @@ public class OrmPackage extends EPackageImpl
xmlAttributeOverrideEClass = createEClass(XML_ATTRIBUTE_OVERRIDE);
xmlAssociationOverrideEClass = createEClass(XML_ASSOCIATION_OVERRIDE);
xmlDiscriminatorColumnEClass = createEClass(XML_DISCRIMINATOR_COLUMN);
- createEAttribute(xmlDiscriminatorColumnEClass, XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME_FOR_XML);
createEAttribute(xmlDiscriminatorColumnEClass, XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE_FOR_XML);
- createEAttribute(xmlDiscriminatorColumnEClass, XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION_FOR_XML);
createEAttribute(xmlDiscriminatorColumnEClass, XML_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH_FOR_XML);
xmlSecondaryTableEClass = createEClass(XML_SECONDARY_TABLE);
xmlPrimaryKeyJoinColumnEClass = createEClass(XML_PRIMARY_KEY_JOIN_COLUMN);
@@ -7973,7 +7945,7 @@ public class OrmPackage extends EPackageImpl
xmlAttributeOverrideEClass.getESuperTypes().add(this.getIXmlColumnMapping());
xmlAssociationOverrideEClass.getESuperTypes().add(this.getXmlOverride());
xmlAssociationOverrideEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIAssociationOverride());
- xmlDiscriminatorColumnEClass.getESuperTypes().add(theJpaCorePackage.getXmlEObject());
+ xmlDiscriminatorColumnEClass.getESuperTypes().add(this.getAbstractXmlNamedColumn());
xmlDiscriminatorColumnEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIDiscriminatorColumn());
xmlSecondaryTableEClass.getESuperTypes().add(this.getAbstractXmlTable());
xmlSecondaryTableEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getISecondaryTable());
@@ -8125,9 +8097,7 @@ public class OrmPackage extends EPackageImpl
initEClass(xmlAttributeOverrideEClass, XmlAttributeOverride.class, "XmlAttributeOverride", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(xmlAssociationOverrideEClass, XmlAssociationOverride.class, "XmlAssociationOverride", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(xmlDiscriminatorColumnEClass, XmlDiscriminatorColumn.class, "XmlDiscriminatorColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXmlDiscriminatorColumn_SpecifiedNameForXml(), ecorePackage.getEString(), "specifiedNameForXml", null, 0, 1, XmlDiscriminatorColumn.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getXmlDiscriminatorColumn_DiscriminatorTypeForXml(), theJpaCoreMappingsPackage.getDiscriminatorType(), "discriminatorTypeForXml", null, 0, 1, XmlDiscriminatorColumn.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlDiscriminatorColumn_ColumnDefinitionForXml(), ecorePackage.getEString(), "columnDefinitionForXml", null, 0, 1, XmlDiscriminatorColumn.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getXmlDiscriminatorColumn_SpecifiedLengthForXml(), theEcorePackage.getEInt(), "specifiedLengthForXml", null, 0, 1, XmlDiscriminatorColumn.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(xmlSecondaryTableEClass, XmlSecondaryTable.class, "XmlSecondaryTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(xmlPrimaryKeyJoinColumnEClass, XmlPrimaryKeyJoinColumn.class, "XmlPrimaryKeyJoinColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -9253,14 +9223,6 @@ public class OrmPackage extends EPackageImpl
public static final EClass XML_DISCRIMINATOR_COLUMN = eINSTANCE.getXmlDiscriminatorColumn();
/**
- * The meta object literal for the '<em><b>Specified Name For Xml</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME_FOR_XML = eINSTANCE.getXmlDiscriminatorColumn_SpecifiedNameForXml();
-
- /**
* The meta object literal for the '<em><b>Discriminator Type For Xml</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -9269,14 +9231,6 @@ public class OrmPackage extends EPackageImpl
public static final EAttribute XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE_FOR_XML = eINSTANCE.getXmlDiscriminatorColumn_DiscriminatorTypeForXml();
/**
- * The meta object literal for the '<em><b>Column Definition For Xml</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION_FOR_XML = eINSTANCE.getXmlDiscriminatorColumn_ColumnDefinitionForXml();
-
- /**
* The meta object literal for the '<em><b>Specified Length For Xml</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
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 2cb70e7d0b..8cfedf91ca 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
@@ -12,7 +12,6 @@ package org.eclipse.jpt.core.internal.content.orm;
import org.eclipse.emf.common.notify.Notification;
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.DiscriminatorType;
import org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn;
import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
@@ -26,9 +25,7 @@ import org.eclipse.jpt.db.internal.Table;
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlDiscriminatorColumn#getSpecifiedNameForXml <em>Specified Name For Xml</em>}</li>
* <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlDiscriminatorColumn#getDiscriminatorTypeForXml <em>Discriminator Type For Xml</em>}</li>
- * <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlDiscriminatorColumn#getColumnDefinitionForXml <em>Column Definition For Xml</em>}</li>
* <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlDiscriminatorColumn#getSpecifiedLengthForXml <em>Specified Length For Xml</em>}</li>
* </ul>
* </p>
@@ -37,60 +34,10 @@ import org.eclipse.jpt.db.internal.Table;
* @model kind="class"
* @generated
*/
-public class XmlDiscriminatorColumn extends XmlEObject
+public class XmlDiscriminatorColumn extends AbstractXmlNamedColumn
implements IDiscriminatorColumn
{
/**
- * The default value of the '{@link #getDefaultName() <em>Default Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultName()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultName() <em>Default Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultName()
- * @generated
- * @ordered
- */
- protected String defaultName = DEFAULT_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSpecifiedName() <em>Specified Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedName()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedName() <em>Specified Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedName()
- * @generated
- * @ordered
- */
- protected String specifiedName = SPECIFIED_NAME_EDEFAULT;
-
- /**
- * 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 default value of the '{@link #getDiscriminatorType() <em>Discriminator Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -111,26 +58,6 @@ public class XmlDiscriminatorColumn extends XmlEObject
protected DiscriminatorType discriminatorType = DISCRIMINATOR_TYPE_EDEFAULT;
/**
- * The default value of the '{@link #getColumnDefinition() <em>Column Definition</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumnDefinition()
- * @generated
- * @ordered
- */
- protected static final String COLUMN_DEFINITION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getColumnDefinition() <em>Column Definition</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumnDefinition()
- * @generated
- * @ordered
- */
- protected String columnDefinition = COLUMN_DEFINITION_EDEFAULT;
-
- /**
* The default value of the '{@link #getDefaultLength() <em>Default Length</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -181,16 +108,6 @@ public class XmlDiscriminatorColumn extends XmlEObject
protected static final int LENGTH_EDEFAULT = 0;
/**
- * The default value of the '{@link #getSpecifiedNameForXml() <em>Specified Name For Xml</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedNameForXml()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_NAME_FOR_XML_EDEFAULT = null;
-
- /**
* The default value of the '{@link #getDiscriminatorTypeForXml() <em>Discriminator Type For Xml</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -201,16 +118,6 @@ public class XmlDiscriminatorColumn extends XmlEObject
protected static final DiscriminatorType DISCRIMINATOR_TYPE_FOR_XML_EDEFAULT = DiscriminatorType.DEFAULT;
/**
- * The default value of the '{@link #getColumnDefinitionForXml() <em>Column Definition For Xml</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumnDefinitionForXml()
- * @generated
- * @ordered
- */
- protected static final String COLUMN_DEFINITION_FOR_XML_EDEFAULT = null;
-
- /**
* The default value of the '{@link #getSpecifiedLengthForXml() <em>Specified Length For Xml</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -239,72 +146,6 @@ public class XmlDiscriminatorColumn extends XmlEObject
return OrmPackage.Literals.XML_DISCRIMINATOR_COLUMN;
}
- /**
- * Returns the value of the '<em><b>Default Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default 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>Default Name</em>' attribute.
- * @see #setDefaultName(String)
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getIDiscriminatorColumn_DefaultName()
- * @model
- * @generated
- */
- public String getDefaultName() {
- return defaultName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlDiscriminatorColumn#getDefaultName <em>Default Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Default Name</em>' attribute.
- * @see #getDefaultName()
- * @generated
- */
- public void setDefaultName(String newDefaultName) {
- String oldDefaultName = defaultName;
- defaultName = newDefaultName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_DISCRIMINATOR_COLUMN__DEFAULT_NAME, oldDefaultName, defaultName));
- }
-
- /**
- * Returns the value of the '<em><b>Specified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified 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>Specified Name</em>' attribute.
- * @see #setSpecifiedName(String)
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getIDiscriminatorColumn_SpecifiedName()
- * @model
- * @generated
- */
- public String getSpecifiedName() {
- return specifiedName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlDiscriminatorColumn#getSpecifiedName <em>Specified Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Name</em>' attribute.
- * @see #getSpecifiedName()
- * @generated
- */
- public void setSpecifiedNameGen(String newSpecifiedName) {
- String oldSpecifiedName = specifiedName;
- specifiedName = newSpecifiedName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME, oldSpecifiedName, specifiedName));
- }
-
public void setSpecifiedName(String newSpecifiedName) {
setSpecifiedNameGen(newSpecifiedName);
if (newSpecifiedName != SPECIFIED_NAME_EDEFAULT) {
@@ -380,39 +221,6 @@ public class XmlDiscriminatorColumn extends XmlEObject
}
}
- /**
- * Returns the value of the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column Definition</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column Definition</em>' attribute.
- * @see #setColumnDefinition(String)
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getIDiscriminatorColumn_ColumnDefinition()
- * @model
- * @generated
- */
- public String getColumnDefinition() {
- return columnDefinition;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlDiscriminatorColumn#getColumnDefinition <em>Column Definition</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Column Definition</em>' attribute.
- * @see #getColumnDefinition()
- * @generated
- */
- public void setColumnDefinitionGen(String newColumnDefinition) {
- String oldColumnDefinition = columnDefinition;
- columnDefinition = newColumnDefinition;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION, oldColumnDefinition, columnDefinition));
- }
-
public void setColumnDefinition(String newColumnDefinition) {
setColumnDefinitionGen(newColumnDefinition);
if (newColumnDefinition != COLUMN_DEFINITION_EDEFAULT) {
@@ -663,28 +471,16 @@ public class XmlDiscriminatorColumn extends XmlEObject
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__DEFAULT_NAME :
- return getDefaultName();
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME :
- return getSpecifiedName();
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__NAME :
- return getName();
case OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
return getDiscriminatorType();
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION :
- return getColumnDefinition();
case OrmPackage.XML_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
return new Integer(getDefaultLength());
case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
return new Integer(getSpecifiedLength());
case OrmPackage.XML_DISCRIMINATOR_COLUMN__LENGTH :
return new Integer(getLength());
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME_FOR_XML :
- return getSpecifiedNameForXml();
case OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE_FOR_XML :
return getDiscriminatorTypeForXml();
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION_FOR_XML :
- return getColumnDefinitionForXml();
case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH_FOR_XML :
return new Integer(getSpecifiedLengthForXml());
}
@@ -699,33 +495,18 @@ public class XmlDiscriminatorColumn extends XmlEObject
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__DEFAULT_NAME :
- setDefaultName((String) newValue);
- return;
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME :
- setSpecifiedName((String) newValue);
- return;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
setDiscriminatorType((DiscriminatorType) newValue);
return;
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION :
- setColumnDefinition((String) newValue);
- return;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
setDefaultLength(((Integer) newValue).intValue());
return;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
setSpecifiedLength(((Integer) newValue).intValue());
return;
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME_FOR_XML :
- setSpecifiedNameForXml((String) newValue);
- return;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE_FOR_XML :
setDiscriminatorTypeForXml((DiscriminatorType) newValue);
return;
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION_FOR_XML :
- setColumnDefinitionForXml((String) newValue);
- return;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH_FOR_XML :
setSpecifiedLengthForXml(((Integer) newValue).intValue());
return;
@@ -741,33 +522,18 @@ public class XmlDiscriminatorColumn extends XmlEObject
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__DEFAULT_NAME :
- setDefaultName(DEFAULT_NAME_EDEFAULT);
- return;
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME :
- setSpecifiedName(SPECIFIED_NAME_EDEFAULT);
- return;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
setDiscriminatorType(DISCRIMINATOR_TYPE_EDEFAULT);
return;
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION :
- setColumnDefinition(COLUMN_DEFINITION_EDEFAULT);
- return;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
setDefaultLength(DEFAULT_LENGTH_EDEFAULT);
return;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
setSpecifiedLength(SPECIFIED_LENGTH_EDEFAULT);
return;
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME_FOR_XML :
- setSpecifiedNameForXml(SPECIFIED_NAME_FOR_XML_EDEFAULT);
- return;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE_FOR_XML :
setDiscriminatorTypeForXml(DISCRIMINATOR_TYPE_FOR_XML_EDEFAULT);
return;
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION_FOR_XML :
- setColumnDefinitionForXml(COLUMN_DEFINITION_FOR_XML_EDEFAULT);
- return;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH_FOR_XML :
setSpecifiedLengthForXml(SPECIFIED_LENGTH_FOR_XML_EDEFAULT);
return;
@@ -783,28 +549,16 @@ public class XmlDiscriminatorColumn extends XmlEObject
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__DEFAULT_NAME :
- return DEFAULT_NAME_EDEFAULT == null ? defaultName != null : !DEFAULT_NAME_EDEFAULT.equals(defaultName);
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME :
- return SPECIFIED_NAME_EDEFAULT == null ? specifiedName != null : !SPECIFIED_NAME_EDEFAULT.equals(specifiedName);
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__NAME :
- return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName());
case OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
return discriminatorType != DISCRIMINATOR_TYPE_EDEFAULT;
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION :
- return COLUMN_DEFINITION_EDEFAULT == null ? columnDefinition != null : !COLUMN_DEFINITION_EDEFAULT.equals(columnDefinition);
case OrmPackage.XML_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
return defaultLength != DEFAULT_LENGTH_EDEFAULT;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
return specifiedLength != SPECIFIED_LENGTH_EDEFAULT;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__LENGTH :
return getLength() != LENGTH_EDEFAULT;
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME_FOR_XML :
- return SPECIFIED_NAME_FOR_XML_EDEFAULT == null ? getSpecifiedNameForXml() != null : !SPECIFIED_NAME_FOR_XML_EDEFAULT.equals(getSpecifiedNameForXml());
case OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE_FOR_XML :
return getDiscriminatorTypeForXml() != DISCRIMINATOR_TYPE_FOR_XML_EDEFAULT;
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION_FOR_XML :
- return COLUMN_DEFINITION_FOR_XML_EDEFAULT == null ? getColumnDefinitionForXml() != null : !COLUMN_DEFINITION_FOR_XML_EDEFAULT.equals(getColumnDefinitionForXml());
case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH_FOR_XML :
return getSpecifiedLengthForXml() != SPECIFIED_LENGTH_FOR_XML_EDEFAULT;
}
@@ -820,16 +574,8 @@ public class XmlDiscriminatorColumn extends XmlEObject
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
if (baseClass == IDiscriminatorColumn.class) {
switch (derivedFeatureID) {
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__DEFAULT_NAME :
- return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DEFAULT_NAME;
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME :
- return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__SPECIFIED_NAME;
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__NAME :
- return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__NAME;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE;
- case OrmPackage.XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION :
- return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__COLUMN_DEFINITION;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DEFAULT_LENGTH;
case OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
@@ -852,16 +598,8 @@ public class XmlDiscriminatorColumn extends XmlEObject
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
if (baseClass == IDiscriminatorColumn.class) {
switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DEFAULT_NAME :
- return OrmPackage.XML_DISCRIMINATOR_COLUMN__DEFAULT_NAME;
- case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__SPECIFIED_NAME :
- return OrmPackage.XML_DISCRIMINATOR_COLUMN__SPECIFIED_NAME;
- case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__NAME :
- return OrmPackage.XML_DISCRIMINATOR_COLUMN__NAME;
case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
return OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE;
- case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__COLUMN_DEFINITION :
- return OrmPackage.XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION;
case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
return OrmPackage.XML_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH;
case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
@@ -885,14 +623,8 @@ public class XmlDiscriminatorColumn extends XmlEObject
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
- result.append(" (defaultName: ");
- result.append(defaultName);
- result.append(", specifiedName: ");
- result.append(specifiedName);
- result.append(", discriminatorType: ");
+ result.append(" (discriminatorType: ");
result.append(discriminatorType);
- result.append(", columnDefinition: ");
- result.append(columnDefinition);
result.append(", defaultLength: ");
result.append(defaultLength);
result.append(", specifiedLength: ");
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/DiscriminatorColumnTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/DiscriminatorColumnTranslator.java
index 5704e676f2..b71ef5541f 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/DiscriminatorColumnTranslator.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/DiscriminatorColumnTranslator.java
@@ -16,30 +16,15 @@ import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
import org.eclipse.wst.common.internal.emf.resource.IDTranslator;
import org.eclipse.wst.common.internal.emf.resource.Translator;
-public class DiscriminatorColumnTranslator extends Translator
+public class DiscriminatorColumnTranslator extends AbstractColumnTranslator
implements OrmXmlMapper
{
- private Translator[] children;
-
- protected static final OrmPackage JPA_CORE_XML_PKG =
- OrmPackage.eINSTANCE;
- protected static final OrmFactory JPA_CORE_XML_FACTORY =
- OrmFactory.eINSTANCE;
- protected static final JpaCoreMappingsPackage MAPPINGS_PKG =
- JpaCoreMappingsPackage.eINSTANCE;
private IEntity entity;
public DiscriminatorColumnTranslator() {
- super(ENTITY__DISCRIMINATOR_COLUMN, JPA_CORE_XML_PKG.getXmlEntityForXml_DiscriminatorColumnForXml(), END_TAG_NO_INDENT);
- }
- public Translator[] getChildren(Object target, int versionID) {
- if (children == null) {
- children = createChildren();
- }
- return children;
- }
-
+ super(ENTITY__DISCRIMINATOR_COLUMN, JPA_CORE_XML_PKG.getXmlEntityForXml_DiscriminatorColumnForXml());
+ }
protected IEntity getEntity() {
return this.entity;
@@ -59,23 +44,15 @@ public class DiscriminatorColumnTranslator extends Translator
IDTranslator.INSTANCE,
createNameTranslator(),
createDiscrminiatorTypeTranslator(),
- createColumnDefinitationTranslator(),
+ createColumnDefinitionTranslator(),
createLengthTranslator(),
};
}
-
- protected Translator createNameTranslator() {
- return new Translator(DISCRIMINATOR_COLUMN__NAME, JPA_CORE_XML_PKG.getXmlDiscriminatorColumn_SpecifiedNameForXml(), DOM_ATTRIBUTE);
- }
protected Translator createDiscrminiatorTypeTranslator() {
return new EnumeratorTranslator(DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE, JPA_CORE_XML_PKG.getXmlDiscriminatorColumn_DiscriminatorTypeForXml(), DOM_ATTRIBUTE);
}
- protected Translator createColumnDefinitationTranslator() {
- return new Translator(DISCRIMINATOR_COLUMN__COLUMN_DEFINITION, JPA_CORE_XML_PKG.getXmlDiscriminatorColumn_ColumnDefinitionForXml(), DOM_ATTRIBUTE);
- }
-
protected Translator createLengthTranslator() {
return new Translator(DISCRIMINATOR_COLUMN__LENGTH, JPA_CORE_XML_PKG.getXmlDiscriminatorColumn_SpecifiedLengthForXml(), DOM_ATTRIBUTE);
}
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 8be16c0ebc..7775b9b796 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
@@ -1183,10 +1183,14 @@ public class OrmSwitch<T>
XmlDiscriminatorColumn xmlDiscriminatorColumn = (XmlDiscriminatorColumn) theEObject;
T result = caseXmlDiscriminatorColumn(xmlDiscriminatorColumn);
if (result == null)
- result = caseXmlEObject(xmlDiscriminatorColumn);
+ result = caseAbstractXmlNamedColumn(xmlDiscriminatorColumn);
if (result == null)
result = caseIDiscriminatorColumn(xmlDiscriminatorColumn);
if (result == null)
+ result = caseXmlEObject(xmlDiscriminatorColumn);
+ if (result == null)
+ result = caseINamedColumn(xmlDiscriminatorColumn);
+ if (result == null)
result = caseJpaEObject(xmlDiscriminatorColumn);
if (result == null)
result = caseIXmlEObject(xmlDiscriminatorColumn);
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IDiscriminatorColumn.java
index 3fd206495d..3c9aa72e95 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IDiscriminatorColumn.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.mappings;
-import org.eclipse.jpt.core.internal.IJpaSourceObject;
import org.eclipse.jpt.db.internal.Table;
/**
@@ -20,11 +19,7 @@ import org.eclipse.jpt.db.internal.Table;
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getDefaultName <em>Default Name</em>}</li>
- * <li>{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getSpecifiedName <em>Specified Name</em>}</li>
- * <li>{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getName <em>Name</em>}</li>
* <li>{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getDiscriminatorType <em>Discriminator Type</em>}</li>
- * <li>{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getColumnDefinition <em>Column Definition</em>}</li>
* <li>{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getDefaultLength <em>Default Length</em>}</li>
* <li>{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getSpecifiedLength <em>Specified Length</em>}</li>
* <li>{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getLength <em>Length</em>}</li>
@@ -35,76 +30,9 @@ import org.eclipse.jpt.db.internal.Table;
* @model kind="class" interface="true" abstract="true"
* @generated
*/
-public interface IDiscriminatorColumn extends IJpaSourceObject
+public interface IDiscriminatorColumn extends INamedColumn
{
/**
- * Returns the value of the '<em><b>Default Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default 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>Default Name</em>' attribute.
- * @see #setDefaultName(String)
- * @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getIDiscriminatorColumn_DefaultName()
- * @model
- * @generated
- */
- String getDefaultName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getDefaultName <em>Default Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Default Name</em>' attribute.
- * @see #getDefaultName()
- * @generated
- */
- void setDefaultName(String value);
-
- /**
- * Returns the value of the '<em><b>Specified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified 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>Specified Name</em>' attribute.
- * @see #setSpecifiedName(String)
- * @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getIDiscriminatorColumn_SpecifiedName()
- * @model
- * @generated
- */
- String getSpecifiedName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getSpecifiedName <em>Specified Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Name</em>' attribute.
- * @see #getSpecifiedName()
- * @generated
- */
- void setSpecifiedName(String value);
-
- /**
- * 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 org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getIDiscriminatorColumn_Name()
- * @model transient="true" changeable="false" volatile="true" derived="true"
- * @generated
- */
- String getName();
-
- /**
* Returns the value of the '<em><b>Discriminator Type</b></em>' attribute.
* The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.DiscriminatorType}.
* <!-- begin-user-doc -->
@@ -134,32 +62,6 @@ public interface IDiscriminatorColumn extends IJpaSourceObject
void setDiscriminatorType(DiscriminatorType value);
/**
- * Returns the value of the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column Definition</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column Definition</em>' attribute.
- * @see #setColumnDefinition(String)
- * @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getIDiscriminatorColumn_ColumnDefinition()
- * @model
- * @generated
- */
- String getColumnDefinition();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getColumnDefinition <em>Column Definition</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Column Definition</em>' attribute.
- * @see #getColumnDefinition()
- * @generated
- */
- void setColumnDefinition(String value);
-
- /**
* Returns the value of the '<em><b>Default Length</b></em>' attribute.
* The default value is <code>"31"</code>.
* <!-- begin-user-doc -->
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/JpaCoreMappingsPackage.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/JpaCoreMappingsPackage.java
index 7bce0ac7a8..423d112dcd 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/JpaCoreMappingsPackage.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/JpaCoreMappingsPackage.java
@@ -2262,13 +2262,13 @@ public class JpaCoreMappingsPackage extends EPackageImpl
public static final int IDISCRIMINATOR_COLUMN = 28;
/**
- * The feature id for the '<em><b>Default Name</b></em>' attribute.
+ * The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int IDISCRIMINATOR_COLUMN__DEFAULT_NAME = JpaCorePackage.IJPA_SOURCE_OBJECT_FEATURE_COUNT + 0;
+ public static final int IDISCRIMINATOR_COLUMN__NAME = INAMED_COLUMN__NAME;
/**
* The feature id for the '<em><b>Specified Name</b></em>' attribute.
@@ -2277,34 +2277,34 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IDISCRIMINATOR_COLUMN__SPECIFIED_NAME = JpaCorePackage.IJPA_SOURCE_OBJECT_FEATURE_COUNT + 1;
+ public static final int IDISCRIMINATOR_COLUMN__SPECIFIED_NAME = INAMED_COLUMN__SPECIFIED_NAME;
/**
- * The feature id for the '<em><b>Name</b></em>' attribute.
+ * The feature id for the '<em><b>Default Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int IDISCRIMINATOR_COLUMN__NAME = JpaCorePackage.IJPA_SOURCE_OBJECT_FEATURE_COUNT + 2;
+ public static final int IDISCRIMINATOR_COLUMN__DEFAULT_NAME = INAMED_COLUMN__DEFAULT_NAME;
/**
- * The feature id for the '<em><b>Discriminator Type</b></em>' attribute.
+ * The feature id for the '<em><b>Column Definition</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int IDISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = JpaCorePackage.IJPA_SOURCE_OBJECT_FEATURE_COUNT + 3;
+ public static final int IDISCRIMINATOR_COLUMN__COLUMN_DEFINITION = INAMED_COLUMN__COLUMN_DEFINITION;
/**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
+ * The feature id for the '<em><b>Discriminator Type</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int IDISCRIMINATOR_COLUMN__COLUMN_DEFINITION = JpaCorePackage.IJPA_SOURCE_OBJECT_FEATURE_COUNT + 4;
+ public static final int IDISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = INAMED_COLUMN_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Default Length</b></em>' attribute.
@@ -2313,7 +2313,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IDISCRIMINATOR_COLUMN__DEFAULT_LENGTH = JpaCorePackage.IJPA_SOURCE_OBJECT_FEATURE_COUNT + 5;
+ public static final int IDISCRIMINATOR_COLUMN__DEFAULT_LENGTH = INAMED_COLUMN_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Specified Length</b></em>' attribute.
@@ -2322,7 +2322,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IDISCRIMINATOR_COLUMN__SPECIFIED_LENGTH = JpaCorePackage.IJPA_SOURCE_OBJECT_FEATURE_COUNT + 6;
+ public static final int IDISCRIMINATOR_COLUMN__SPECIFIED_LENGTH = INAMED_COLUMN_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Length</b></em>' attribute.
@@ -2331,7 +2331,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IDISCRIMINATOR_COLUMN__LENGTH = JpaCorePackage.IJPA_SOURCE_OBJECT_FEATURE_COUNT + 7;
+ public static final int IDISCRIMINATOR_COLUMN__LENGTH = INAMED_COLUMN_FEATURE_COUNT + 3;
/**
* The number of structural features of the '<em>IDiscriminator Column</em>' class.
@@ -2340,7 +2340,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IDISCRIMINATOR_COLUMN_FEATURE_COUNT = JpaCorePackage.IJPA_SOURCE_OBJECT_FEATURE_COUNT + 8;
+ public static final int IDISCRIMINATOR_COLUMN_FEATURE_COUNT = INAMED_COLUMN_FEATURE_COUNT + 4;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.mappings.ISecondaryTable <em>ISecondary Table</em>}' class.
@@ -5265,45 +5265,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
}
/**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getDefaultName <em>Default Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Default Name</em>'.
- * @see org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getDefaultName()
- * @see #getIDiscriminatorColumn()
- * @generated
- */
- public EAttribute getIDiscriminatorColumn_DefaultName() {
- return (EAttribute) iDiscriminatorColumnEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getSpecifiedName <em>Specified Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Specified Name</em>'.
- * @see org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getSpecifiedName()
- * @see #getIDiscriminatorColumn()
- * @generated
- */
- public EAttribute getIDiscriminatorColumn_SpecifiedName() {
- return (EAttribute) iDiscriminatorColumnEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#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.mappings.IDiscriminatorColumn#getName()
- * @see #getIDiscriminatorColumn()
- * @generated
- */
- public EAttribute getIDiscriminatorColumn_Name() {
- return (EAttribute) iDiscriminatorColumnEClass.getEStructuralFeatures().get(2);
- }
-
- /**
* Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getDiscriminatorType <em>Discriminator Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -5313,20 +5274,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EAttribute getIDiscriminatorColumn_DiscriminatorType() {
- return (EAttribute) iDiscriminatorColumnEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getColumnDefinition <em>Column Definition</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Column Definition</em>'.
- * @see org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn#getColumnDefinition()
- * @see #getIDiscriminatorColumn()
- * @generated
- */
- public EAttribute getIDiscriminatorColumn_ColumnDefinition() {
- return (EAttribute) iDiscriminatorColumnEClass.getEStructuralFeatures().get(4);
+ return (EAttribute) iDiscriminatorColumnEClass.getEStructuralFeatures().get(0);
}
/**
@@ -5339,7 +5287,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EAttribute getIDiscriminatorColumn_DefaultLength() {
- return (EAttribute) iDiscriminatorColumnEClass.getEStructuralFeatures().get(5);
+ return (EAttribute) iDiscriminatorColumnEClass.getEStructuralFeatures().get(1);
}
/**
@@ -5352,7 +5300,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EAttribute getIDiscriminatorColumn_SpecifiedLength() {
- return (EAttribute) iDiscriminatorColumnEClass.getEStructuralFeatures().get(6);
+ return (EAttribute) iDiscriminatorColumnEClass.getEStructuralFeatures().get(2);
}
/**
@@ -5365,7 +5313,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EAttribute getIDiscriminatorColumn_Length() {
- return (EAttribute) iDiscriminatorColumnEClass.getEStructuralFeatures().get(7);
+ return (EAttribute) iDiscriminatorColumnEClass.getEStructuralFeatures().get(3);
}
/**
@@ -6312,11 +6260,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
createEReference(iAssociationOverrideEClass, IASSOCIATION_OVERRIDE__SPECIFIED_JOIN_COLUMNS);
createEReference(iAssociationOverrideEClass, IASSOCIATION_OVERRIDE__DEFAULT_JOIN_COLUMNS);
iDiscriminatorColumnEClass = createEClass(IDISCRIMINATOR_COLUMN);
- createEAttribute(iDiscriminatorColumnEClass, IDISCRIMINATOR_COLUMN__DEFAULT_NAME);
- createEAttribute(iDiscriminatorColumnEClass, IDISCRIMINATOR_COLUMN__SPECIFIED_NAME);
- createEAttribute(iDiscriminatorColumnEClass, IDISCRIMINATOR_COLUMN__NAME);
createEAttribute(iDiscriminatorColumnEClass, IDISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE);
- createEAttribute(iDiscriminatorColumnEClass, IDISCRIMINATOR_COLUMN__COLUMN_DEFINITION);
createEAttribute(iDiscriminatorColumnEClass, IDISCRIMINATOR_COLUMN__DEFAULT_LENGTH);
createEAttribute(iDiscriminatorColumnEClass, IDISCRIMINATOR_COLUMN__SPECIFIED_LENGTH);
createEAttribute(iDiscriminatorColumnEClass, IDISCRIMINATOR_COLUMN__LENGTH);
@@ -6447,7 +6391,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
iAttributeOverrideEClass.getESuperTypes().add(this.getIOverride());
iAttributeOverrideEClass.getESuperTypes().add(this.getIColumnMapping());
iAssociationOverrideEClass.getESuperTypes().add(this.getIOverride());
- iDiscriminatorColumnEClass.getESuperTypes().add(theJpaCorePackage.getIJpaSourceObject());
+ iDiscriminatorColumnEClass.getESuperTypes().add(this.getINamedColumn());
iSecondaryTableEClass.getESuperTypes().add(this.getITable());
iPrimaryKeyJoinColumnEClass.getESuperTypes().add(this.getIAbstractJoinColumn());
iGeneratorEClass.getESuperTypes().add(theJpaCorePackage.getIJpaSourceObject());
@@ -6584,11 +6528,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
initEReference(getIAssociationOverride_SpecifiedJoinColumns(), this.getIJoinColumn(), null, "specifiedJoinColumns", null, 0, -1, IAssociationOverride.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getIAssociationOverride_DefaultJoinColumns(), this.getIJoinColumn(), null, "defaultJoinColumns", null, 0, -1, IAssociationOverride.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(iDiscriminatorColumnEClass, IDiscriminatorColumn.class, "IDiscriminatorColumn", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getIDiscriminatorColumn_DefaultName(), theEcorePackage.getEString(), "defaultName", null, 0, 1, IDiscriminatorColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getIDiscriminatorColumn_SpecifiedName(), theEcorePackage.getEString(), "specifiedName", null, 0, 1, IDiscriminatorColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getIDiscriminatorColumn_Name(), theEcorePackage.getEString(), "name", null, 0, 1, IDiscriminatorColumn.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
initEAttribute(getIDiscriminatorColumn_DiscriminatorType(), this.getDiscriminatorType(), "discriminatorType", null, 0, 1, IDiscriminatorColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getIDiscriminatorColumn_ColumnDefinition(), ecorePackage.getEString(), "columnDefinition", null, 0, 1, IDiscriminatorColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getIDiscriminatorColumn_DefaultLength(), theEcorePackage.getEInt(), "defaultLength", "31", 0, 1, IDiscriminatorColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getIDiscriminatorColumn_SpecifiedLength(), theEcorePackage.getEInt(), "specifiedLength", "-1", 0, 1, IDiscriminatorColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getIDiscriminatorColumn_Length(), theEcorePackage.getEInt(), "length", null, 0, 1, IDiscriminatorColumn.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
@@ -7694,30 +7634,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
public static final EClass IDISCRIMINATOR_COLUMN = eINSTANCE.getIDiscriminatorColumn();
/**
- * The meta object literal for the '<em><b>Default Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute IDISCRIMINATOR_COLUMN__DEFAULT_NAME = eINSTANCE.getIDiscriminatorColumn_DefaultName();
-
- /**
- * The meta object literal for the '<em><b>Specified Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute IDISCRIMINATOR_COLUMN__SPECIFIED_NAME = eINSTANCE.getIDiscriminatorColumn_SpecifiedName();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute IDISCRIMINATOR_COLUMN__NAME = eINSTANCE.getIDiscriminatorColumn_Name();
-
- /**
* The meta object literal for the '<em><b>Discriminator Type</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -7726,14 +7642,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
public static final EAttribute IDISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = eINSTANCE.getIDiscriminatorColumn_DiscriminatorType();
/**
- * The meta object literal for the '<em><b>Column Definition</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EAttribute IDISCRIMINATOR_COLUMN__COLUMN_DEFINITION = eINSTANCE.getIDiscriminatorColumn_ColumnDefinition();
-
- /**
* The meta object literal for the '<em><b>Default Length</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/util/JpaCoreMappingsSwitch.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/util/JpaCoreMappingsSwitch.java
index 52aa95c6fb..29866ec1e4 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/util/JpaCoreMappingsSwitch.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/util/JpaCoreMappingsSwitch.java
@@ -530,6 +530,8 @@ public class JpaCoreMappingsSwitch<T>
IDiscriminatorColumn iDiscriminatorColumn = (IDiscriminatorColumn) theEObject;
T result = caseIDiscriminatorColumn(iDiscriminatorColumn);
if (result == null)
+ result = caseINamedColumn(iDiscriminatorColumn);
+ if (result == null)
result = caseIJpaSourceObject(iDiscriminatorColumn);
if (result == null)
result = caseIJpaEObject(iDiscriminatorColumn);
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InheritanceComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InheritanceComposite.java
index 6bc0b7424b..58fe69ec4d 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InheritanceComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/InheritanceComposite.java
@@ -523,6 +523,9 @@ public class InheritanceComposite extends BaseJpaComposite {
final String columnName = (String) notification.getNewValue();
Display.getDefault().asyncExec(new Runnable() {
public void run() {
+ if (getControl().isDisposed()) {
+ return;
+ }
if (discriminatorValueCombo.getText() == null || !discriminatorValueCombo.getText().equals(columnName)) {
if (columnName == null) {
discriminatorValueCombo.select(0);
@@ -537,6 +540,9 @@ public class InheritanceComposite extends BaseJpaComposite {
else if (notification.getFeatureID(IEntity.class) == JpaCoreMappingsPackage.IENTITY__DEFAULT_DISCRIMINATOR_VALUE) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
+ if (getControl().isDisposed()) {
+ return;
+ }
populateDiscriminatorValueCombo();
}
});

Back to the top