summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Butzke2013-02-19 12:47:56 (EST)
committerKaren Butzke2013-02-19 12:47:56 (EST)
commit7486ba1de96a7d5f9896208e0ef32b95704cdc32 (patch)
treec470ef9a2788b1e0236815d34e35209f0b5b21fc
parent3398fe350259a15e6ea38401fa546db57e54dc9d (diff)
downloadwebtools.dali-7486ba1de96a7d5f9896208e0ef32b95704cdc32.zip
webtools.dali-7486ba1de96a7d5f9896208e0ef32b95704cdc32.tar.gz
webtools.dali-7486ba1de96a7d5f9896208e0ef32b95704cdc32.tar.bz2
updated orm_2_1.xsd and xml resource model for JPA 2.1 Proposed Final Draft changesv201302192355
-rw-r--r--common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/orm_2_1.xsd32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/model/jpaResourceModels.genmodel7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/model/orm.ecore7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/OrmPackage.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/XmlForeignKey.java122
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/ConstraintMode_2_1.java263
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/OrmV2_1Factory.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/OrmV2_1Package.java83
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/XmlForeignKey_2_1.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/JPA2_1.java2
10 files changed, 485 insertions, 114 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/orm_2_1.xsd b/common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/orm_2_1.xsd
index 774d39a..f1bcaa1 100644
--- a/common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/orm_2_1.xsd
+++ b/common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/orm_2_1.xsd
@@ -9,7 +9,7 @@
<xsd:annotation>
<xsd:documentation>
- @(#)orm_2_1.xsd 2.1 February 4 2013
+ @(#)orm_2_1.xsd 2.1 February 15 2013
</xsd:documentation>
</xsd:annotation>
@@ -26,7 +26,7 @@
http://www.eclipse.org/org/documents/edl-v10.php.
Contributors:
- Linda DeMichiel - Java Persistence 2.1, Version 2.1 (February 4, 2013)
+ Linda DeMichiel - Java Persistence 2.1, Version 2.1 (February 15, 2013)
Specification available from http://jcp.org/en/jsr/detail?id=338
</xsd:documentation>
@@ -561,6 +561,24 @@
<!-- **************************************************** -->
+ <xsd:simpleType name="constraint-mode">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ public enum ConstraintMode {CONSTRAINT, NO_CONSTRAINT, PROVIDER_DEFAULT};
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="CONSTRAINT"/>
+ <xsd:enumeration value="NO_CONSTRAINT"/>
+ <xsd:enumeration value="PROVIDER_DEFAULT"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+<!-- **************************************************** -->
+
+
<xsd:complexType name="constructor-result">
<xsd:annotation>
<xsd:documentation>
@@ -1009,8 +1027,12 @@
@Target({}) @Retention(RUNTIME)
public @interface ForeignKey {
String name() default "";
+ ConstraintMode value() default CONSTRAINT;
String foreign-key-definition() default "";
- boolean disable-foreign-key() default false;
+
+ Note that the elements that embed the use of the annotation
+ default this use as @ForeignKey(PROVIDER_DEFAULT).
+
}
</xsd:documentation>
@@ -1019,8 +1041,8 @@
<xsd:element name="description" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="constraint-mode" type="orm:constraint-mode"/>
<xsd:attribute name="foreign-key-definition" type="xsd:string"/>
- <xsd:attribute name="disable-foreign-key" type="xsd:boolean"/>
</xsd:complexType>
<!-- **************************************************** -->
@@ -2311,4 +2333,4 @@
<xsd:attribute name="access" type="orm:access-type"/>
</xsd:complexType>
-</xsd:schema>
+</xsd:schema> \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/model/jpaResourceModels.genmodel b/jpa/plugins/org.eclipse.jpt.jpa.core/model/jpaResourceModels.genmodel
index 4a60752..9ed1e0b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/model/jpaResourceModels.genmodel
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/model/jpaResourceModels.genmodel
@@ -462,6 +462,11 @@
<genEnumLiterals ecoreEnumLiteral="orm.ecore#//v2_1/ParameterMode_2_1/OUT"/>
<genEnumLiterals ecoreEnumLiteral="orm.ecore#//v2_1/ParameterMode_2_1/REF_CURSOR"/>
</genEnums>
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="orm.ecore#//v2_1/ConstraintMode_2_1">
+ <genEnumLiterals ecoreEnumLiteral="orm.ecore#//v2_1/ConstraintMode_2_1/CONSTRAINT"/>
+ <genEnumLiterals ecoreEnumLiteral="orm.ecore#//v2_1/ConstraintMode_2_1/NO_CONSTRAINT"/>
+ <genEnumLiterals ecoreEnumLiteral="orm.ecore#//v2_1/ConstraintMode_2_1/PROVIDER_DEFAULT"/>
+ </genEnums>
<genClasses image="false" ecoreClass="orm.ecore#//v2_1/ColumnResult_2_1">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_1/ColumnResult_2_1/className"/>
</genClasses>
@@ -510,8 +515,8 @@
<genClasses image="false" ecoreClass="orm.ecore#//v2_1/XmlForeignKey_2_1">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_1/XmlForeignKey_2_1/description"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_1/XmlForeignKey_2_1/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_1/XmlForeignKey_2_1/constraintMode"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_1/XmlForeignKey_2_1/foreignKeyDefinition"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_1/XmlForeignKey_2_1/disableForeignKey"/>
</genClasses>
<genClasses image="false" ecoreClass="orm.ecore#//v2_1/XmlIndex_2_1">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_1/XmlIndex_2_1/description"/>
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/model/orm.ecore b/jpa/plugins/org.eclipse.jpt.jpa.core/model/orm.ecore
index a5e122a..d1f21b0 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/model/orm.ecore
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/model/orm.ecore
@@ -669,9 +669,9 @@
interface="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="constraintMode" eType="#//v2_1/ConstraintMode_2_1"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="foreignKeyDefinition"
eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="disableForeignKey" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="XmlIndex_2_1" abstract="true" interface="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
@@ -798,5 +798,10 @@
<eLiterals name="OUT" value="2"/>
<eLiterals name="REF_CURSOR" value="3"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="ConstraintMode_2_1">
+ <eLiterals name="CONSTRAINT"/>
+ <eLiterals name="NO_CONSTRAINT" value="1"/>
+ <eLiterals name="PROVIDER_DEFAULT" value="2"/>
+ </eClassifiers>
</eSubpackages>
</ecore:EPackage>
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/OrmPackage.java b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/OrmPackage.java
index e6e6677..7e56dfe 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/OrmPackage.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/OrmPackage.java
@@ -3854,22 +3854,22 @@ public class OrmPackage extends EPackageImpl
public static final int XML_FOREIGN_KEY__NAME = OrmV2_1Package.XML_FOREIGN_KEY_21__NAME;
/**
- * The feature id for the '<em><b>Foreign Key Definition</b></em>' attribute.
+ * The feature id for the '<em><b>Constraint Mode</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_FOREIGN_KEY__FOREIGN_KEY_DEFINITION = OrmV2_1Package.XML_FOREIGN_KEY_21__FOREIGN_KEY_DEFINITION;
+ public static final int XML_FOREIGN_KEY__CONSTRAINT_MODE = OrmV2_1Package.XML_FOREIGN_KEY_21__CONSTRAINT_MODE;
/**
- * The feature id for the '<em><b>Disable Foreign Key</b></em>' attribute.
+ * The feature id for the '<em><b>Foreign Key Definition</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_FOREIGN_KEY__DISABLE_FOREIGN_KEY = OrmV2_1Package.XML_FOREIGN_KEY_21__DISABLE_FOREIGN_KEY;
+ public static final int XML_FOREIGN_KEY__FOREIGN_KEY_DEFINITION = OrmV2_1Package.XML_FOREIGN_KEY_21__FOREIGN_KEY_DEFINITION;
/**
* The number of structural features of the '<em>Xml Foreign Key</em>' class.
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/XmlForeignKey.java b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/XmlForeignKey.java
index cebdc39..031576c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/XmlForeignKey.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/XmlForeignKey.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
import org.eclipse.jpt.common.core.resource.xml.EBaseObjectImpl;
+import org.eclipse.jpt.jpa.core.resource.orm.v2_1.ConstraintMode_2_1;
import org.eclipse.jpt.jpa.core.resource.orm.v2_1.JPA2_1;
import org.eclipse.jpt.jpa.core.resource.orm.v2_1.OrmV2_1Package;
import org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1;
@@ -83,44 +84,40 @@ public class XmlForeignKey extends EBaseObjectImpl implements XmlForeignKey_2_1
protected String name = NAME_EDEFAULT;
/**
- * The default value of the '{@link #getForeignKeyDefinition() <em>Foreign Key Definition</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getForeignKeyDefinition()
- * @generated
- * @ordered
+ * changed this to null and removed the generated flag so emf won't generate over it
+ * we don't want a default for enums, just null if the tag does not exist
*/
- protected static final String FOREIGN_KEY_DEFINITION_EDEFAULT = null;
+ protected static final ConstraintMode_2_1 CONSTRAINT_MODE_EDEFAULT = null;
/**
- * The cached value of the '{@link #getForeignKeyDefinition() <em>Foreign Key Definition</em>}' attribute.
+ * The cached value of the '{@link #getConstraintMode() <em>Constraint Mode</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see #getForeignKeyDefinition()
+ * @see #getConstraintMode()
* @generated
* @ordered
*/
- protected String foreignKeyDefinition = FOREIGN_KEY_DEFINITION_EDEFAULT;
+ protected ConstraintMode_2_1 constraintMode = CONSTRAINT_MODE_EDEFAULT;
/**
- * The default value of the '{@link #getDisableForeignKey() <em>Disable Foreign Key</em>}' attribute.
+ * The default value of the '{@link #getForeignKeyDefinition() <em>Foreign Key Definition</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see #getDisableForeignKey()
+ * @see #getForeignKeyDefinition()
* @generated
* @ordered
*/
- protected static final Boolean DISABLE_FOREIGN_KEY_EDEFAULT = null;
+ protected static final String FOREIGN_KEY_DEFINITION_EDEFAULT = null;
/**
- * The cached value of the '{@link #getDisableForeignKey() <em>Disable Foreign Key</em>}' attribute.
+ * The cached value of the '{@link #getForeignKeyDefinition() <em>Foreign Key Definition</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see #getDisableForeignKey()
+ * @see #getForeignKeyDefinition()
* @generated
* @ordered
*/
- protected Boolean disableForeignKey = DISABLE_FOREIGN_KEY_EDEFAULT;
+ protected String foreignKeyDefinition = FOREIGN_KEY_DEFINITION_EDEFAULT;
/**
* <!-- begin-user-doc -->
@@ -214,73 +211,76 @@ public class XmlForeignKey extends EBaseObjectImpl implements XmlForeignKey_2_1
}
/**
- * Returns the value of the '<em><b>Foreign Key Definition</b></em>' attribute.
+ * Returns the value of the '<em><b>Constraint Mode</b></em>' attribute.
+ * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.ConstraintMode_2_1}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Foreign Key Definition</em>' attribute isn't clear,
+ * If the meaning of the '<em>Constraint Mode</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Foreign Key Definition</em>' attribute.
- * @see #setForeignKeyDefinition(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlForeignKey_2_1_ForeignKeyDefinition()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+ * @return the value of the '<em>Constraint Mode</em>' attribute.
+ * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.ConstraintMode_2_1
+ * @see #setConstraintMode(ConstraintMode_2_1)
+ * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlForeignKey_2_1_ConstraintMode()
+ * @model
* @generated
*/
- public String getForeignKeyDefinition()
+ public ConstraintMode_2_1 getConstraintMode()
{
- return foreignKeyDefinition;
+ return constraintMode;
}
/**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlForeignKey#getForeignKeyDefinition <em>Foreign Key Definition</em>}' attribute.
+ * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlForeignKey#getConstraintMode <em>Constraint Mode</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Foreign Key Definition</em>' attribute.
- * @see #getForeignKeyDefinition()
+ * @param value the new value of the '<em>Constraint Mode</em>' attribute.
+ * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.ConstraintMode_2_1
+ * @see #getConstraintMode()
* @generated
*/
- public void setForeignKeyDefinition(String newForeignKeyDefinition)
+ public void setConstraintMode(ConstraintMode_2_1 newConstraintMode)
{
- String oldForeignKeyDefinition = foreignKeyDefinition;
- foreignKeyDefinition = newForeignKeyDefinition;
+ ConstraintMode_2_1 oldConstraintMode = constraintMode;
+ constraintMode = newConstraintMode == null ? CONSTRAINT_MODE_EDEFAULT : newConstraintMode;
if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_FOREIGN_KEY__FOREIGN_KEY_DEFINITION, oldForeignKeyDefinition, foreignKeyDefinition));
+ eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_FOREIGN_KEY__CONSTRAINT_MODE, oldConstraintMode, constraintMode));
}
/**
- * Returns the value of the '<em><b>Disable Foreign Key</b></em>' attribute.
+ * Returns the value of the '<em><b>Foreign Key Definition</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Disable Foreign Key</em>' attribute isn't clear,
+ * If the meaning of the '<em>Foreign Key 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>Disable Foreign Key</em>' attribute.
- * @see #setDisableForeignKey(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlForeignKey_2_1_DisableForeignKey()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+ * @return the value of the '<em>Foreign Key Definition</em>' attribute.
+ * @see #setForeignKeyDefinition(String)
+ * @see org.eclipse.jpt.jpa.core.resource.orm.OrmPackage#getXmlForeignKey_2_1_ForeignKeyDefinition()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String"
* @generated
*/
- public Boolean getDisableForeignKey()
+ public String getForeignKeyDefinition()
{
- return disableForeignKey;
+ return foreignKeyDefinition;
}
/**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlForeignKey#getDisableForeignKey <em>Disable Foreign Key</em>}' attribute.
+ * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.XmlForeignKey#getForeignKeyDefinition <em>Foreign Key Definition</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Disable Foreign Key</em>' attribute.
- * @see #getDisableForeignKey()
+ * @param value the new value of the '<em>Foreign Key Definition</em>' attribute.
+ * @see #getForeignKeyDefinition()
* @generated
*/
- public void setDisableForeignKey(Boolean newDisableForeignKey)
+ public void setForeignKeyDefinition(String newForeignKeyDefinition)
{
- Boolean oldDisableForeignKey = disableForeignKey;
- disableForeignKey = newDisableForeignKey;
+ String oldForeignKeyDefinition = foreignKeyDefinition;
+ foreignKeyDefinition = newForeignKeyDefinition;
if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_FOREIGN_KEY__DISABLE_FOREIGN_KEY, oldDisableForeignKey, disableForeignKey));
+ eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_FOREIGN_KEY__FOREIGN_KEY_DEFINITION, oldForeignKeyDefinition, foreignKeyDefinition));
}
/**
@@ -297,10 +297,10 @@ public class XmlForeignKey extends EBaseObjectImpl implements XmlForeignKey_2_1
return getDescription();
case OrmPackage.XML_FOREIGN_KEY__NAME:
return getName();
+ case OrmPackage.XML_FOREIGN_KEY__CONSTRAINT_MODE:
+ return getConstraintMode();
case OrmPackage.XML_FOREIGN_KEY__FOREIGN_KEY_DEFINITION:
return getForeignKeyDefinition();
- case OrmPackage.XML_FOREIGN_KEY__DISABLE_FOREIGN_KEY:
- return getDisableForeignKey();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -321,12 +321,12 @@ public class XmlForeignKey extends EBaseObjectImpl implements XmlForeignKey_2_1
case OrmPackage.XML_FOREIGN_KEY__NAME:
setName((String)newValue);
return;
+ case OrmPackage.XML_FOREIGN_KEY__CONSTRAINT_MODE:
+ setConstraintMode((ConstraintMode_2_1)newValue);
+ return;
case OrmPackage.XML_FOREIGN_KEY__FOREIGN_KEY_DEFINITION:
setForeignKeyDefinition((String)newValue);
return;
- case OrmPackage.XML_FOREIGN_KEY__DISABLE_FOREIGN_KEY:
- setDisableForeignKey((Boolean)newValue);
- return;
}
super.eSet(featureID, newValue);
}
@@ -347,12 +347,12 @@ public class XmlForeignKey extends EBaseObjectImpl implements XmlForeignKey_2_1
case OrmPackage.XML_FOREIGN_KEY__NAME:
setName(NAME_EDEFAULT);
return;
+ case OrmPackage.XML_FOREIGN_KEY__CONSTRAINT_MODE:
+ setConstraintMode(CONSTRAINT_MODE_EDEFAULT);
+ return;
case OrmPackage.XML_FOREIGN_KEY__FOREIGN_KEY_DEFINITION:
setForeignKeyDefinition(FOREIGN_KEY_DEFINITION_EDEFAULT);
return;
- case OrmPackage.XML_FOREIGN_KEY__DISABLE_FOREIGN_KEY:
- setDisableForeignKey(DISABLE_FOREIGN_KEY_EDEFAULT);
- return;
}
super.eUnset(featureID);
}
@@ -371,10 +371,10 @@ public class XmlForeignKey extends EBaseObjectImpl implements XmlForeignKey_2_1
return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
case OrmPackage.XML_FOREIGN_KEY__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case OrmPackage.XML_FOREIGN_KEY__CONSTRAINT_MODE:
+ return constraintMode != CONSTRAINT_MODE_EDEFAULT;
case OrmPackage.XML_FOREIGN_KEY__FOREIGN_KEY_DEFINITION:
return FOREIGN_KEY_DEFINITION_EDEFAULT == null ? foreignKeyDefinition != null : !FOREIGN_KEY_DEFINITION_EDEFAULT.equals(foreignKeyDefinition);
- case OrmPackage.XML_FOREIGN_KEY__DISABLE_FOREIGN_KEY:
- return DISABLE_FOREIGN_KEY_EDEFAULT == null ? disableForeignKey != null : !DISABLE_FOREIGN_KEY_EDEFAULT.equals(disableForeignKey);
}
return super.eIsSet(featureID);
}
@@ -394,10 +394,10 @@ public class XmlForeignKey extends EBaseObjectImpl implements XmlForeignKey_2_1
result.append(description);
result.append(", name: ");
result.append(name);
+ result.append(", constraintMode: ");
+ result.append(constraintMode);
result.append(", foreignKeyDefinition: ");
result.append(foreignKeyDefinition);
- result.append(", disableForeignKey: ");
- result.append(disableForeignKey);
result.append(')');
return result.toString();
}
@@ -416,8 +416,8 @@ public class XmlForeignKey extends EBaseObjectImpl implements XmlForeignKey_2_1
private static Translator[] buildTranslatorChildren() {
return new Translator[] {
buildNameTranslator(),
+ buildConstraintModeTranslator(),
buildForeignKeyDefinitionTranslator(),
- buildDisableForeignKeyTranslator(),
buildDescriptionTranslator(),
};
}
@@ -430,8 +430,8 @@ public class XmlForeignKey extends EBaseObjectImpl implements XmlForeignKey_2_1
return new Translator(JPA2_1.FOREIGN_KEY_DEFINITION, OrmV2_1Package.eINSTANCE.getXmlForeignKey_2_1_ForeignKeyDefinition(), Translator.DOM_ATTRIBUTE);
}
- protected static Translator buildDisableForeignKeyTranslator() {
- return new Translator(JPA2_1.DISABLE_FOREIGN_KEY, OrmV2_1Package.eINSTANCE.getXmlForeignKey_2_1_DisableForeignKey(), Translator.DOM_ATTRIBUTE);
+ protected static Translator buildConstraintModeTranslator() {
+ return new Translator(JPA2_1.CONSTRAINT_MODE, OrmV2_1Package.eINSTANCE.getXmlForeignKey_2_1_ConstraintMode(), Translator.DOM_ATTRIBUTE);
}
protected static Translator buildDescriptionTranslator() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/ConstraintMode_2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/ConstraintMode_2_1.java
new file mode 100644
index 0000000..9f3012d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/ConstraintMode_2_1.java
@@ -0,0 +1,263 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.jpa.core.resource.orm.v2_1;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Constraint Mode 21</b></em>',
+ * and utility methods for working with them.
+ *
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.OrmV2_1Package#getConstraintMode_2_1()
+ * @model
+ * @generated
+ */
+public enum ConstraintMode_2_1 implements Enumerator
+{
+ /**
+ * The '<em><b>CONSTRAINT</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #CONSTRAINT_VALUE
+ * @generated
+ * @ordered
+ */
+ CONSTRAINT(0, "CONSTRAINT", "CONSTRAINT"),
+
+ /**
+ * The '<em><b>NO CONSTRAINT</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #NO_CONSTRAINT_VALUE
+ * @generated
+ * @ordered
+ */
+ NO_CONSTRAINT(1, "NO_CONSTRAINT", "NO_CONSTRAINT"),
+
+ /**
+ * The '<em><b>PROVIDER DEFAULT</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #PROVIDER_DEFAULT_VALUE
+ * @generated
+ * @ordered
+ */
+ PROVIDER_DEFAULT(2, "PROVIDER_DEFAULT", "PROVIDER_DEFAULT");
+
+ /**
+ * The '<em><b>CONSTRAINT</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>CONSTRAINT</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #CONSTRAINT
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int CONSTRAINT_VALUE = 0;
+
+ /**
+ * The '<em><b>NO CONSTRAINT</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>NO CONSTRAINT</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #NO_CONSTRAINT
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int NO_CONSTRAINT_VALUE = 1;
+
+ /**
+ * The '<em><b>PROVIDER DEFAULT</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>PROVIDER DEFAULT</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #PROVIDER_DEFAULT
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int PROVIDER_DEFAULT_VALUE = 2;
+
+ /**
+ * An array of all the '<em><b>Constraint Mode 21</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final ConstraintMode_2_1[] VALUES_ARRAY =
+ new ConstraintMode_2_1[]
+ {
+ CONSTRAINT,
+ NO_CONSTRAINT,
+ PROVIDER_DEFAULT,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Constraint Mode 21</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<ConstraintMode_2_1> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Constraint Mode 21</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ConstraintMode_2_1 get(String literal)
+ {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ ConstraintMode_2_1 result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Constraint Mode 21</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ConstraintMode_2_1 getByName(String name)
+ {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ ConstraintMode_2_1 result = VALUES_ARRAY[i];
+ if (result.getName().equals(name))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Constraint Mode 21</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ConstraintMode_2_1 get(int value)
+ {
+ switch (value)
+ {
+ case CONSTRAINT_VALUE: return CONSTRAINT;
+ case NO_CONSTRAINT_VALUE: return NO_CONSTRAINT;
+ case PROVIDER_DEFAULT_VALUE: return PROVIDER_DEFAULT;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private ConstraintMode_2_1(int value, String name, String literal)
+ {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue()
+ {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral()
+ {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ return literal;
+ }
+
+} //ConstraintMode_2_1
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/OrmV2_1Factory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/OrmV2_1Factory.java
index eb3426a..48a04e6 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/OrmV2_1Factory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/OrmV2_1Factory.java
@@ -103,6 +103,8 @@ public class OrmV2_1Factory extends EFactoryImpl
{
case OrmV2_1Package.PARAMETER_MODE_21:
return createParameterMode_2_1FromString(eDataType, initialValue);
+ case OrmV2_1Package.CONSTRAINT_MODE_21:
+ return createConstraintMode_2_1FromString(eDataType, initialValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
@@ -120,6 +122,8 @@ public class OrmV2_1Factory extends EFactoryImpl
{
case OrmV2_1Package.PARAMETER_MODE_21:
return convertParameterMode_2_1ToString(eDataType, instanceValue);
+ case OrmV2_1Package.CONSTRAINT_MODE_21:
+ return convertConstraintMode_2_1ToString(eDataType, instanceValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
@@ -152,6 +156,28 @@ public class OrmV2_1Factory extends EFactoryImpl
* <!-- end-user-doc -->
* @generated
*/
+ public ConstraintMode_2_1 createConstraintMode_2_1FromString(EDataType eDataType, String initialValue)
+ {
+ ConstraintMode_2_1 result = ConstraintMode_2_1.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertConstraintMode_2_1ToString(EDataType eDataType, Object instanceValue)
+ {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public OrmV2_1Package getOrmV2_1Package()
{
return (OrmV2_1Package)getEPackage();
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/OrmV2_1Package.java b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/OrmV2_1Package.java
index 96b95d4..eb46655 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/OrmV2_1Package.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/OrmV2_1Package.java
@@ -727,22 +727,22 @@ public class OrmV2_1Package extends EPackageImpl
public static final int XML_FOREIGN_KEY_21__NAME = 1;
/**
- * The feature id for the '<em><b>Foreign Key Definition</b></em>' attribute.
+ * The feature id for the '<em><b>Constraint Mode</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_FOREIGN_KEY_21__FOREIGN_KEY_DEFINITION = 2;
+ public static final int XML_FOREIGN_KEY_21__CONSTRAINT_MODE = 2;
/**
- * The feature id for the '<em><b>Disable Foreign Key</b></em>' attribute.
+ * The feature id for the '<em><b>Foreign Key Definition</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_FOREIGN_KEY_21__DISABLE_FOREIGN_KEY = 3;
+ public static final int XML_FOREIGN_KEY_21__FOREIGN_KEY_DEFINITION = 3;
/**
* The number of structural features of the '<em>Xml Foreign Key 21</em>' class.
@@ -1259,6 +1259,16 @@ public class OrmV2_1Package extends EPackageImpl
public static final int PARAMETER_MODE_21 = 29;
/**
+ * The meta object id for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.ConstraintMode_2_1 <em>Constraint Mode 21</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.ConstraintMode_2_1
+ * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.OrmV2_1Package#getConstraintMode_2_1()
+ * @generated
+ */
+ public static final int CONSTRAINT_MODE_21 = 30;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -1445,6 +1455,13 @@ public class OrmV2_1Package extends EPackageImpl
* <!-- end-user-doc -->
* @generated
*/
+ private EEnum constraintMode_2_1EEnum = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
private EClass xmlConverterContainer_2_1EClass = null;
/**
@@ -1857,30 +1874,30 @@ public class OrmV2_1Package extends EPackageImpl
/**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getForeignKeyDefinition <em>Foreign Key Definition</em>}'.
+ * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getConstraintMode <em>Constraint Mode</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Foreign Key Definition</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getForeignKeyDefinition()
+ * @return the meta object for the attribute '<em>Constraint Mode</em>'.
+ * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getConstraintMode()
* @see #getXmlForeignKey_2_1()
* @generated
*/
- public EAttribute getXmlForeignKey_2_1_ForeignKeyDefinition()
+ public EAttribute getXmlForeignKey_2_1_ConstraintMode()
{
return (EAttribute)xmlForeignKey_2_1EClass.getEStructuralFeatures().get(2);
}
/**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getDisableForeignKey <em>Disable Foreign Key</em>}'.
+ * Returns the meta object for the attribute '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getForeignKeyDefinition <em>Foreign Key Definition</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Disable Foreign Key</em>'.
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getDisableForeignKey()
+ * @return the meta object for the attribute '<em>Foreign Key Definition</em>'.
+ * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getForeignKeyDefinition()
* @see #getXmlForeignKey_2_1()
* @generated
*/
- public EAttribute getXmlForeignKey_2_1_DisableForeignKey()
+ public EAttribute getXmlForeignKey_2_1_ForeignKeyDefinition()
{
return (EAttribute)xmlForeignKey_2_1EClass.getEStructuralFeatures().get(3);
}
@@ -2769,6 +2786,20 @@ public class OrmV2_1Package extends EPackageImpl
/**
+ * Returns the meta object for enum '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.ConstraintMode_2_1 <em>Constraint Mode 21</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Constraint Mode 21</em>'.
+ * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.ConstraintMode_2_1
+ * @generated
+ */
+ public EEnum getConstraintMode_2_1()
+ {
+ return constraintMode_2_1EEnum;
+ }
+
+
+ /**
* Returns the meta object for class '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlConverterContainer_2_1 <em>Xml Converter Container 21</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -3023,8 +3054,8 @@ public class OrmV2_1Package extends EPackageImpl
xmlForeignKey_2_1EClass = createEClass(XML_FOREIGN_KEY_21);
createEAttribute(xmlForeignKey_2_1EClass, XML_FOREIGN_KEY_21__DESCRIPTION);
createEAttribute(xmlForeignKey_2_1EClass, XML_FOREIGN_KEY_21__NAME);
+ createEAttribute(xmlForeignKey_2_1EClass, XML_FOREIGN_KEY_21__CONSTRAINT_MODE);
createEAttribute(xmlForeignKey_2_1EClass, XML_FOREIGN_KEY_21__FOREIGN_KEY_DEFINITION);
- createEAttribute(xmlForeignKey_2_1EClass, XML_FOREIGN_KEY_21__DISABLE_FOREIGN_KEY);
xmlIndex_2_1EClass = createEClass(XML_INDEX_21);
createEAttribute(xmlIndex_2_1EClass, XML_INDEX_21__DESCRIPTION);
@@ -3101,6 +3132,7 @@ public class OrmV2_1Package extends EPackageImpl
// Create enums
parameterMode_2_1EEnum = createEEnum(PARAMETER_MODE_21);
+ constraintMode_2_1EEnum = createEEnum(CONSTRAINT_MODE_21);
}
/**
@@ -3188,8 +3220,8 @@ public class OrmV2_1Package extends EPackageImpl
initEClass(xmlForeignKey_2_1EClass, XmlForeignKey_2_1.class, "XmlForeignKey_2_1", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getXmlForeignKey_2_1_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlForeignKey_2_1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getXmlForeignKey_2_1_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, XmlForeignKey_2_1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getXmlForeignKey_2_1_ConstraintMode(), this.getConstraintMode_2_1(), "constraintMode", null, 0, 1, XmlForeignKey_2_1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getXmlForeignKey_2_1_ForeignKeyDefinition(), theXMLTypePackage.getString(), "foreignKeyDefinition", null, 0, 1, XmlForeignKey_2_1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getXmlForeignKey_2_1_DisableForeignKey(), theXMLTypePackage.getBooleanObject(), "disableForeignKey", null, 0, 1, XmlForeignKey_2_1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(xmlIndex_2_1EClass, XmlIndex_2_1.class, "XmlIndex_2_1", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getXmlIndex_2_1_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlIndex_2_1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -3270,6 +3302,11 @@ public class OrmV2_1Package extends EPackageImpl
addEEnumLiteral(parameterMode_2_1EEnum, ParameterMode_2_1.INOUT);
addEEnumLiteral(parameterMode_2_1EEnum, ParameterMode_2_1.OUT);
addEEnumLiteral(parameterMode_2_1EEnum, ParameterMode_2_1.REF_CURSOR);
+
+ initEEnum(constraintMode_2_1EEnum, ConstraintMode_2_1.class, "ConstraintMode_2_1");
+ addEEnumLiteral(constraintMode_2_1EEnum, ConstraintMode_2_1.CONSTRAINT);
+ addEEnumLiteral(constraintMode_2_1EEnum, ConstraintMode_2_1.NO_CONSTRAINT);
+ addEEnumLiteral(constraintMode_2_1EEnum, ConstraintMode_2_1.PROVIDER_DEFAULT);
}
/**
@@ -3471,20 +3508,20 @@ public class OrmV2_1Package extends EPackageImpl
public static final EAttribute XML_FOREIGN_KEY_21__NAME = eINSTANCE.getXmlForeignKey_2_1_Name();
/**
- * The meta object literal for the '<em><b>Foreign Key Definition</b></em>' attribute feature.
+ * The meta object literal for the '<em><b>Constraint Mode</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public static final EAttribute XML_FOREIGN_KEY_21__FOREIGN_KEY_DEFINITION = eINSTANCE.getXmlForeignKey_2_1_ForeignKeyDefinition();
+ public static final EAttribute XML_FOREIGN_KEY_21__CONSTRAINT_MODE = eINSTANCE.getXmlForeignKey_2_1_ConstraintMode();
/**
- * The meta object literal for the '<em><b>Disable Foreign Key</b></em>' attribute feature.
+ * The meta object literal for the '<em><b>Foreign Key Definition</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public static final EAttribute XML_FOREIGN_KEY_21__DISABLE_FOREIGN_KEY = eINSTANCE.getXmlForeignKey_2_1_DisableForeignKey();
+ public static final EAttribute XML_FOREIGN_KEY_21__FOREIGN_KEY_DEFINITION = eINSTANCE.getXmlForeignKey_2_1_ForeignKeyDefinition();
/**
* The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlIndex_2_1 <em>Xml Index 21</em>}' class.
@@ -4003,6 +4040,16 @@ public class OrmV2_1Package extends EPackageImpl
public static final EEnum PARAMETER_MODE_21 = eINSTANCE.getParameterMode_2_1();
/**
+ * The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.ConstraintMode_2_1 <em>Constraint Mode 21</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.ConstraintMode_2_1
+ * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.OrmV2_1Package#getConstraintMode_2_1()
+ * @generated
+ */
+ public static final EEnum CONSTRAINT_MODE_21 = eINSTANCE.getConstraintMode_2_1();
+
+ /**
* The meta object literal for the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlConverterContainer_2_1 <em>Xml Converter Container 21</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/XmlForeignKey_2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/XmlForeignKey_2_1.java
index 0f728a2..d9e0601 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/XmlForeignKey_2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/XmlForeignKey_2_1.java
@@ -27,8 +27,8 @@ import org.eclipse.jpt.common.core.resource.xml.EBaseObject;
* <ul>
* <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getDescription <em>Description</em>}</li>
* <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getConstraintMode <em>Constraint Mode</em>}</li>
* <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getForeignKeyDefinition <em>Foreign Key Definition</em>}</li>
- * <li>{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getDisableForeignKey <em>Disable Foreign Key</em>}</li>
* </ul>
* </p>
*
@@ -92,55 +92,58 @@ public interface XmlForeignKey_2_1 extends EBaseObject
void setName(String value);
/**
- * Returns the value of the '<em><b>Foreign Key Definition</b></em>' attribute.
+ * Returns the value of the '<em><b>Constraint Mode</b></em>' attribute.
+ * The literals are from the enumeration {@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.ConstraintMode_2_1}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Foreign Key Definition</em>' attribute isn't clear,
+ * If the meaning of the '<em>Constraint Mode</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Foreign Key Definition</em>' attribute.
- * @see #setForeignKeyDefinition(String)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.OrmV2_1Package#getXmlForeignKey_2_1_ForeignKeyDefinition()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+ * @return the value of the '<em>Constraint Mode</em>' attribute.
+ * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.ConstraintMode_2_1
+ * @see #setConstraintMode(ConstraintMode_2_1)
+ * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.OrmV2_1Package#getXmlForeignKey_2_1_ConstraintMode()
+ * @model
* @generated
*/
- String getForeignKeyDefinition();
+ ConstraintMode_2_1 getConstraintMode();
/**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getForeignKeyDefinition <em>Foreign Key Definition</em>}' attribute.
+ * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getConstraintMode <em>Constraint Mode</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Foreign Key Definition</em>' attribute.
- * @see #getForeignKeyDefinition()
+ * @param value the new value of the '<em>Constraint Mode</em>' attribute.
+ * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.ConstraintMode_2_1
+ * @see #getConstraintMode()
* @generated
*/
- void setForeignKeyDefinition(String value);
+ void setConstraintMode(ConstraintMode_2_1 value);
/**
- * Returns the value of the '<em><b>Disable Foreign Key</b></em>' attribute.
+ * Returns the value of the '<em><b>Foreign Key Definition</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Disable Foreign Key</em>' attribute isn't clear,
+ * If the meaning of the '<em>Foreign Key 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>Disable Foreign Key</em>' attribute.
- * @see #setDisableForeignKey(Boolean)
- * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.OrmV2_1Package#getXmlForeignKey_2_1_DisableForeignKey()
- * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+ * @return the value of the '<em>Foreign Key Definition</em>' attribute.
+ * @see #setForeignKeyDefinition(String)
+ * @see org.eclipse.jpt.jpa.core.resource.orm.v2_1.OrmV2_1Package#getXmlForeignKey_2_1_ForeignKeyDefinition()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String"
* @generated
*/
- Boolean getDisableForeignKey();
+ String getForeignKeyDefinition();
/**
- * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getDisableForeignKey <em>Disable Foreign Key</em>}' attribute.
+ * Sets the value of the '{@link org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlForeignKey_2_1#getForeignKeyDefinition <em>Foreign Key Definition</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Disable Foreign Key</em>' attribute.
- * @see #getDisableForeignKey()
+ * @param value the new value of the '<em>Foreign Key Definition</em>' attribute.
+ * @see #getForeignKeyDefinition()
* @generated
*/
- void setDisableForeignKey(Boolean value);
+ void setForeignKeyDefinition(String value);
} // XmlForeignKey_2_1
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/JPA2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/JPA2_1.java
index 267221e..9d3872a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/JPA2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/JPA2_1.java
@@ -37,11 +37,11 @@ public interface JPA2_1
String ATTRIBUTE_NAME = "attribute-name";
String AUTO_APPLY = "auto-apply";
String COLUMN_LIST = "column-list";
+ String CONSTRAINT_MODE = "constraint-mode";
String CONSTRUCTOR_RESULT = "constructor-result";
String CONVERT = "convert";
String CONVERTER = "converter";
String DISABLE_CONVERSION = "disable-conversion";
- String DISABLE_FOREIGN_KEY = "disable-foreign-key";
String FOREIGN_KEY = "foreign-key";
String FOREIGN_KEY_DEFINITION = "foreign-key-definition";
String INCLUDE_ALL_ATTRIBUTES = "include-all-attributes";