Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Taal2013-04-01 12:54:38 +0000
committerMartin Taal2013-04-01 12:54:38 +0000
commitd661b9debc28ec318a30501670cdde68a7dde178 (patch)
tree7e9926c47e4576084034cda28410e7dc6785d97c /hibernate
parenta511b901ec692737795071396413e38cfc74cd63 (diff)
downloadorg.eclipse.emf.teneo-d661b9debc28ec318a30501670cdde68a7dde178.tar.gz
org.eclipse.emf.teneo-d661b9debc28ec318a30501670cdde68a7dde178.tar.xz
org.eclipse.emf.teneo-d661b9debc28ec318a30501670cdde68a7dde178.zip
Fixes issue [395163]
Diffstat (limited to 'hibernate')
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbannotation.genmodel2
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbmodel.ecore2
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedEReference.java26
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedETypeElement.java28
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbmodelPackage.java85
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEAttributeImpl.java63
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEReferenceImpl.java36
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbmodelPackageImpl.java33
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/AbstractMapper.java17
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/ManyAttributeMapper.java1
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/ManyToOneMapper.java3
-rw-r--r--hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/TypedEReferenceMapper.java1
12 files changed, 193 insertions, 104 deletions
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbannotation.genmodel b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbannotation.genmodel
index 5e9015761..dc7a0fe6a 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbannotation.genmodel
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbannotation.genmodel
@@ -192,6 +192,7 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hbmodel.ecore#//HbAnnotatedETypeElement/formula"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hbmodel.ecore#//HbAnnotatedETypeElement/hbFetch"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hbmodel.ecore#//HbAnnotatedETypeElement/batchSize"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hbmodel.ecore#//HbAnnotatedETypeElement/hbOnDelete"/>
</genClasses>
<genClasses ecoreClass="hbmodel.ecore#//HbAnnotatedEAttribute">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hbmodel.ecore#//HbAnnotatedEAttribute/hbType"/>
@@ -225,7 +226,6 @@
</genClasses>
<genClasses ecoreClass="hbmodel.ecore#//HbAnnotatedEReference">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hbmodel.ecore#//HbAnnotatedEReference/hbCache"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hbmodel.ecore#//HbAnnotatedEReference/hbOnDelete"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hbmodel.ecore#//HbAnnotatedEReference/naturalId"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hbmodel.ecore#//HbAnnotatedEReference/immutable"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hbmodel.ecore#//HbAnnotatedEReference/notFound"/>
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbmodel.ecore b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbmodel.ecore
index e260d3cc5..92c6f1be8 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbmodel.ecore
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbmodel.ecore
@@ -33,6 +33,7 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="formula" eType="ecore:EClass hbannotation.ecore#//Formula"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="hbFetch" eType="ecore:EClass hbannotation.ecore#//Fetch"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="batchSize" eType="ecore:EClass hbannotation.ecore#//BatchSize"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="hbOnDelete" eType="ecore:EClass hbannotation.ecore#//OnDelete"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="HbAnnotatedEAttribute" eSuperTypes="../../org.eclipse.emf.teneo.annotations/model/pamodel.ecore#//PAnnotatedEAttribute #//HbAnnotatedETypeElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="hbType" eType="ecore:EClass hbannotation.ecore#//Type"
@@ -85,7 +86,6 @@
<eClassifiers xsi:type="ecore:EClass" name="HbAnnotatedEReference" eSuperTypes="../../org.eclipse.emf.teneo.annotations/model/pamodel.ecore#//PAnnotatedEReference #//HbAnnotatedETypeElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="hbCache" eType="ecore:EClass hbannotation.ecore#//Cache"
containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="hbOnDelete" eType="ecore:EClass hbannotation.ecore#//OnDelete"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="naturalId" eType="ecore:EClass hbannotation.ecore#//NaturalId"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="immutable" eType="ecore:EClass hbannotation.ecore#//Immutable"
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedEReference.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedEReference.java
index cfa9733f4..b63ccae77 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedEReference.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedEReference.java
@@ -26,7 +26,6 @@ import org.eclipse.emf.teneo.hibernate.hbannotation.Type;
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEReference#getHbCache <em>Hb Cache</em>}</li>
- * <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEReference#getHbOnDelete <em>Hb On Delete</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEReference#getNaturalId <em>Natural Id</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEReference#getImmutable <em>Immutable</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEReference#getNotFound <em>Not Found</em>}</li>
@@ -68,31 +67,6 @@ public interface HbAnnotatedEReference extends PAnnotatedEReference, HbAnnotated
void setHbCache(Cache value);
/**
- * Returns the value of the '<em><b>Hb On Delete</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Hb On Delete</em>' reference isn't clear, there really should be
- * more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Hb On Delete</em>' reference.
- * @see #setHbOnDelete(OnDelete)
- * @see org.eclipse.emf.teneo.hibernate.hbmodel.HbmodelPackage#getHbAnnotatedEReference_HbOnDelete()
- * @model
- * @generated
- */
- OnDelete getHbOnDelete();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEReference#getHbOnDelete <em>Hb On Delete</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Hb On Delete</em>' reference.
- * @see #getHbOnDelete()
- * @generated
- */
- void setHbOnDelete(OnDelete value);
-
- /**
* Returns the value of the '<em><b>Natural Id</b></em>' containment reference. <!--
* begin-user-doc -->
* <p>
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedETypeElement.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedETypeElement.java
index 9e572902c..3acdc2ef4 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedETypeElement.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedETypeElement.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.teneo.hibernate.hbannotation.HbMapKey;
import org.eclipse.emf.teneo.hibernate.hbannotation.IdBag;
import org.eclipse.emf.teneo.hibernate.hbannotation.Index;
import org.eclipse.emf.teneo.hibernate.hbannotation.MapKeyManyToMany;
+import org.eclipse.emf.teneo.hibernate.hbannotation.OnDelete;
import org.eclipse.emf.teneo.hibernate.hbannotation.Where;
/**
@@ -40,6 +41,7 @@ import org.eclipse.emf.teneo.hibernate.hbannotation.Where;
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedETypeElement#getFormula <em>Formula</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedETypeElement#getHbFetch <em>Hb Fetch</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedETypeElement#getBatchSize <em>Batch Size</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedETypeElement#getHbOnDelete <em>Hb On Delete</em>}</li>
* </ul>
* </p>
*
@@ -343,4 +345,30 @@ public interface HbAnnotatedETypeElement extends PAnnotatedEStructuralFeature,
*/
void setBatchSize(BatchSize value);
+ /**
+ * Returns the value of the '<em><b>Hb On Delete</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Hb On Delete</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Hb On Delete</em>' reference.
+ * @see #setHbOnDelete(OnDelete)
+ * @see org.eclipse.emf.teneo.hibernate.hbmodel.HbmodelPackage#getHbAnnotatedETypeElement_HbOnDelete()
+ * @model
+ * @generated
+ */
+ OnDelete getHbOnDelete();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedETypeElement#getHbOnDelete <em>Hb On Delete</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Hb On Delete</em>' reference.
+ * @see #getHbOnDelete()
+ * @generated
+ */
+ void setHbOnDelete(OnDelete value);
+
} // HbAnnotatedETypeElement
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbmodelPackage.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbmodelPackage.java
index 14dff4ac0..66ce9642d 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbmodelPackage.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbmodelPackage.java
@@ -343,13 +343,22 @@ public interface HbmodelPackage extends EPackage {
int HB_ANNOTATED_ETYPE_ELEMENT__BATCH_SIZE = PamodelPackage.PANNOTATED_ESTRUCTURAL_FEATURE_FEATURE_COUNT + 11;
/**
+ * The feature id for the '<em><b>Hb On Delete</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HB_ANNOTATED_ETYPE_ELEMENT__HB_ON_DELETE = PamodelPackage.PANNOTATED_ESTRUCTURAL_FEATURE_FEATURE_COUNT + 12;
+
+ /**
* The number of structural features of the ' <em>Hb Annotated EType Element</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @generated
* @ordered
*/
- int HB_ANNOTATED_ETYPE_ELEMENT_FEATURE_COUNT = PamodelPackage.PANNOTATED_ESTRUCTURAL_FEATURE_FEATURE_COUNT + 12;
+ int HB_ANNOTATED_ETYPE_ELEMENT_FEATURE_COUNT = PamodelPackage.PANNOTATED_ESTRUCTURAL_FEATURE_FEATURE_COUNT + 13;
/**
* The meta object id for the '{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEAttributeImpl <em>Hb Annotated EAttribute</em>}' class.
@@ -703,13 +712,22 @@ public interface HbmodelPackage extends EPackage {
int HB_ANNOTATED_EATTRIBUTE__BATCH_SIZE = PamodelPackage.PANNOTATED_EATTRIBUTE_FEATURE_COUNT + 11;
/**
+ * The feature id for the '<em><b>Hb On Delete</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HB_ANNOTATED_EATTRIBUTE__HB_ON_DELETE = PamodelPackage.PANNOTATED_EATTRIBUTE_FEATURE_COUNT + 12;
+
+ /**
* The feature id for the '<em><b>Hb Type</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int HB_ANNOTATED_EATTRIBUTE__HB_TYPE = PamodelPackage.PANNOTATED_EATTRIBUTE_FEATURE_COUNT + 12;
+ int HB_ANNOTATED_EATTRIBUTE__HB_TYPE = PamodelPackage.PANNOTATED_EATTRIBUTE_FEATURE_COUNT + 13;
/**
* The feature id for the '<em><b>Generated</b></em>' containment reference.
@@ -718,7 +736,7 @@ public interface HbmodelPackage extends EPackage {
* @generated
* @ordered
*/
- int HB_ANNOTATED_EATTRIBUTE__GENERATED = PamodelPackage.PANNOTATED_EATTRIBUTE_FEATURE_COUNT + 13;
+ int HB_ANNOTATED_EATTRIBUTE__GENERATED = PamodelPackage.PANNOTATED_EATTRIBUTE_FEATURE_COUNT + 14;
/**
* The feature id for the '<em><b>Natural Id</b></em>' containment reference.
@@ -727,7 +745,7 @@ public interface HbmodelPackage extends EPackage {
* @generated
* @ordered
*/
- int HB_ANNOTATED_EATTRIBUTE__NATURAL_ID = PamodelPackage.PANNOTATED_EATTRIBUTE_FEATURE_COUNT + 14;
+ int HB_ANNOTATED_EATTRIBUTE__NATURAL_ID = PamodelPackage.PANNOTATED_EATTRIBUTE_FEATURE_COUNT + 15;
/**
* The feature id for the '<em><b>Any</b></em>' reference.
@@ -736,7 +754,7 @@ public interface HbmodelPackage extends EPackage {
* @generated
* @ordered
*/
- int HB_ANNOTATED_EATTRIBUTE__ANY = PamodelPackage.PANNOTATED_EATTRIBUTE_FEATURE_COUNT + 15;
+ int HB_ANNOTATED_EATTRIBUTE__ANY = PamodelPackage.PANNOTATED_EATTRIBUTE_FEATURE_COUNT + 16;
/**
* The feature id for the '<em><b>Any Meta Def</b></em>' reference.
@@ -745,7 +763,7 @@ public interface HbmodelPackage extends EPackage {
* @generated
* @ordered
*/
- int HB_ANNOTATED_EATTRIBUTE__ANY_META_DEF = PamodelPackage.PANNOTATED_EATTRIBUTE_FEATURE_COUNT + 16;
+ int HB_ANNOTATED_EATTRIBUTE__ANY_META_DEF = PamodelPackage.PANNOTATED_EATTRIBUTE_FEATURE_COUNT + 17;
/**
* The number of structural features of the '<em>Hb Annotated EAttribute</em>' class. <!--
@@ -754,7 +772,7 @@ public interface HbmodelPackage extends EPackage {
* @generated
* @ordered
*/
- int HB_ANNOTATED_EATTRIBUTE_FEATURE_COUNT = PamodelPackage.PANNOTATED_EATTRIBUTE_FEATURE_COUNT + 17;
+ int HB_ANNOTATED_EATTRIBUTE_FEATURE_COUNT = PamodelPackage.PANNOTATED_EATTRIBUTE_FEATURE_COUNT + 18;
/**
* The meta object id for the '{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEClassImpl <em>Hb Annotated EClass</em>}' class.
@@ -1734,22 +1752,22 @@ public interface HbmodelPackage extends EPackage {
int HB_ANNOTATED_EREFERENCE__BATCH_SIZE = PamodelPackage.PANNOTATED_EREFERENCE_FEATURE_COUNT + 11;
/**
- * The feature id for the '<em><b>Hb Cache</b></em>' containment reference.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
+ * The feature id for the '<em><b>Hb On Delete</b></em>' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
* @generated
* @ordered
*/
- int HB_ANNOTATED_EREFERENCE__HB_CACHE = PamodelPackage.PANNOTATED_EREFERENCE_FEATURE_COUNT + 12;
+ int HB_ANNOTATED_EREFERENCE__HB_ON_DELETE = PamodelPackage.PANNOTATED_EREFERENCE_FEATURE_COUNT + 12;
/**
- * The feature id for the '<em><b>Hb On Delete</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
+ * The feature id for the '<em><b>Hb Cache</b></em>' containment reference.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
* @generated
* @ordered
*/
- int HB_ANNOTATED_EREFERENCE__HB_ON_DELETE = PamodelPackage.PANNOTATED_EREFERENCE_FEATURE_COUNT + 13;
+ int HB_ANNOTATED_EREFERENCE__HB_CACHE = PamodelPackage.PANNOTATED_EREFERENCE_FEATURE_COUNT + 13;
/**
* The feature id for the '<em><b>Natural Id</b></em>' containment reference.
@@ -2135,6 +2153,17 @@ public interface HbmodelPackage extends EPackage {
EReference getHbAnnotatedETypeElement_BatchSize();
/**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedETypeElement#getHbOnDelete <em>Hb On Delete</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Hb On Delete</em>'.
+ * @see org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedETypeElement#getHbOnDelete()
+ * @see #getHbAnnotatedETypeElement()
+ * @generated
+ */
+ EReference getHbAnnotatedETypeElement_HbOnDelete();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEAttribute <em>Hb Annotated EAttribute</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the meta object for class '<em>Hb Annotated EAttribute</em>'.
@@ -2420,16 +2449,6 @@ public interface HbmodelPackage extends EPackage {
EReference getHbAnnotatedEReference_HbCache();
/**
- * Returns the meta object for the reference '{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEReference#getHbOnDelete <em>Hb On Delete</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Hb On Delete</em>'.
- * @see org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEReference#getHbOnDelete()
- * @see #getHbAnnotatedEReference()
- * @generated
- */
- EReference getHbAnnotatedEReference_HbOnDelete();
-
- /**
* Returns the meta object for the containment reference '{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEReference#getNaturalId <em>Natural Id</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Natural Id</em>'.
@@ -2678,6 +2697,14 @@ public interface HbmodelPackage extends EPackage {
EReference HB_ANNOTATED_ETYPE_ELEMENT__BATCH_SIZE = eINSTANCE.getHbAnnotatedETypeElement_BatchSize();
/**
+ * The meta object literal for the '<em><b>Hb On Delete</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference HB_ANNOTATED_ETYPE_ELEMENT__HB_ON_DELETE = eINSTANCE.getHbAnnotatedETypeElement_HbOnDelete();
+
+ /**
* The meta object literal for the '{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEAttributeImpl <em>Hb Annotated EAttribute</em>}' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEAttributeImpl
@@ -2905,14 +2932,6 @@ public interface HbmodelPackage extends EPackage {
EReference HB_ANNOTATED_EREFERENCE__HB_CACHE = eINSTANCE.getHbAnnotatedEReference_HbCache();
/**
- * The meta object literal for the '<em><b>Hb On Delete</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference HB_ANNOTATED_EREFERENCE__HB_ON_DELETE = eINSTANCE.getHbAnnotatedEReference_HbOnDelete();
-
- /**
* The meta object literal for the '<em><b>Natural Id</b></em>' containment reference feature.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEAttributeImpl.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEAttributeImpl.java
index 330fd41d8..c16dcde8c 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEAttributeImpl.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEAttributeImpl.java
@@ -33,6 +33,7 @@ import org.eclipse.emf.teneo.hibernate.hbannotation.IdBag;
import org.eclipse.emf.teneo.hibernate.hbannotation.Index;
import org.eclipse.emf.teneo.hibernate.hbannotation.MapKeyManyToMany;
import org.eclipse.emf.teneo.hibernate.hbannotation.NaturalId;
+import org.eclipse.emf.teneo.hibernate.hbannotation.OnDelete;
import org.eclipse.emf.teneo.hibernate.hbannotation.Type;
import org.eclipse.emf.teneo.hibernate.hbannotation.Where;
import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEAttribute;
@@ -58,6 +59,7 @@ import org.eclipse.emf.teneo.hibernate.hbmodel.HbmodelPackage;
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEAttributeImpl#getFormula <em>Formula</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEAttributeImpl#getHbFetch <em>Hb Fetch</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEAttributeImpl#getBatchSize <em>Batch Size</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEAttributeImpl#getHbOnDelete <em>Hb On Delete</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEAttributeImpl#getHbType <em>Hb Type</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEAttributeImpl#getGenerated <em>Generated</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEAttributeImpl#getNaturalId <em>Natural Id</em>}</li>
@@ -187,6 +189,16 @@ public class HbAnnotatedEAttributeImpl extends PAnnotatedEAttributeImpl implemen
protected BatchSize batchSize;
/**
+ * The cached value of the '{@link #getHbOnDelete() <em>Hb On Delete</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getHbOnDelete()
+ * @generated
+ * @ordered
+ */
+ protected OnDelete hbOnDelete;
+
+ /**
* The cached value of the '{@link #getHbType() <em>Hb Type</em>}' containment reference. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
@@ -662,6 +674,44 @@ public class HbAnnotatedEAttributeImpl extends PAnnotatedEAttributeImpl implemen
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public OnDelete getHbOnDelete() {
+ if (hbOnDelete != null && hbOnDelete.eIsProxy()) {
+ InternalEObject oldHbOnDelete = (InternalEObject)hbOnDelete;
+ hbOnDelete = (OnDelete)eResolveProxy(oldHbOnDelete);
+ if (hbOnDelete != oldHbOnDelete) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__HB_ON_DELETE, oldHbOnDelete, hbOnDelete));
+ }
+ }
+ return hbOnDelete;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public OnDelete basicGetHbOnDelete() {
+ return hbOnDelete;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setHbOnDelete(OnDelete newHbOnDelete) {
+ OnDelete oldHbOnDelete = hbOnDelete;
+ hbOnDelete = newHbOnDelete;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__HB_ON_DELETE, oldHbOnDelete, hbOnDelete));
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -918,6 +968,9 @@ public class HbAnnotatedEAttributeImpl extends PAnnotatedEAttributeImpl implemen
case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__BATCH_SIZE:
if (resolve) return getBatchSize();
return basicGetBatchSize();
+ case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__HB_ON_DELETE:
+ if (resolve) return getHbOnDelete();
+ return basicGetHbOnDelete();
case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__HB_TYPE:
return getHbType();
case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__GENERATED:
@@ -980,6 +1033,9 @@ public class HbAnnotatedEAttributeImpl extends PAnnotatedEAttributeImpl implemen
case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__BATCH_SIZE:
setBatchSize((BatchSize)newValue);
return;
+ case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__HB_ON_DELETE:
+ setHbOnDelete((OnDelete)newValue);
+ return;
case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__HB_TYPE:
setHbType((Type)newValue);
return;
@@ -1042,6 +1098,9 @@ public class HbAnnotatedEAttributeImpl extends PAnnotatedEAttributeImpl implemen
case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__BATCH_SIZE:
setBatchSize((BatchSize)null);
return;
+ case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__HB_ON_DELETE:
+ setHbOnDelete((OnDelete)null);
+ return;
case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__HB_TYPE:
setHbType((Type)null);
return;
@@ -1092,6 +1151,8 @@ public class HbAnnotatedEAttributeImpl extends PAnnotatedEAttributeImpl implemen
return hbFetch != null;
case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__BATCH_SIZE:
return batchSize != null;
+ case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__HB_ON_DELETE:
+ return hbOnDelete != null;
case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__HB_TYPE:
return hbType != null;
case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__GENERATED:
@@ -1131,6 +1192,7 @@ public class HbAnnotatedEAttributeImpl extends PAnnotatedEAttributeImpl implemen
case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__FORMULA: return HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__FORMULA;
case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__HB_FETCH: return HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__HB_FETCH;
case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__BATCH_SIZE: return HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__BATCH_SIZE;
+ case HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__HB_ON_DELETE: return HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__HB_ON_DELETE;
default: return -1;
}
}
@@ -1162,6 +1224,7 @@ public class HbAnnotatedEAttributeImpl extends PAnnotatedEAttributeImpl implemen
case HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__FORMULA: return HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__FORMULA;
case HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__HB_FETCH: return HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__HB_FETCH;
case HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__BATCH_SIZE: return HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__BATCH_SIZE;
+ case HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__HB_ON_DELETE: return HbmodelPackage.HB_ANNOTATED_EATTRIBUTE__HB_ON_DELETE;
default: return -1;
}
}
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEReferenceImpl.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEReferenceImpl.java
index 335f37936..5f99d0ff3 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEReferenceImpl.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEReferenceImpl.java
@@ -61,8 +61,8 @@ import org.eclipse.emf.teneo.hibernate.hbmodel.HbmodelPackage;
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEReferenceImpl#getFormula <em>Formula</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEReferenceImpl#getHbFetch <em>Hb Fetch</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEReferenceImpl#getBatchSize <em>Batch Size</em>}</li>
- * <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEReferenceImpl#getHbCache <em>Hb Cache</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEReferenceImpl#getHbOnDelete <em>Hb On Delete</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEReferenceImpl#getHbCache <em>Hb Cache</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEReferenceImpl#getNaturalId <em>Natural Id</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEReferenceImpl#getImmutable <em>Immutable</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEReferenceImpl#getNotFound <em>Not Found</em>}</li>
@@ -193,24 +193,24 @@ public class HbAnnotatedEReferenceImpl extends PAnnotatedEReferenceImpl implemen
protected BatchSize batchSize;
/**
- * The cached value of the '{@link #getHbCache() <em>Hb Cache</em>}' containment reference. <!--
+ * The cached value of the '{@link #getHbOnDelete() <em>Hb On Delete</em>}' reference. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
- * @see #getHbCache()
+ * @see #getHbOnDelete()
* @generated
* @ordered
*/
- protected Cache hbCache;
+ protected OnDelete hbOnDelete;
/**
- * The cached value of the '{@link #getHbOnDelete() <em>Hb On Delete</em>}' reference. <!--
+ * The cached value of the '{@link #getHbCache() <em>Hb Cache</em>}' containment reference. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
- * @see #getHbOnDelete()
+ * @see #getHbCache()
* @generated
* @ordered
*/
- protected OnDelete hbOnDelete;
+ protected Cache hbCache;
/**
* The cached value of the '{@link #getNaturalId() <em>Natural Id</em>}' containment reference.
@@ -1067,11 +1067,11 @@ public class HbAnnotatedEReferenceImpl extends PAnnotatedEReferenceImpl implemen
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__BATCH_SIZE:
if (resolve) return getBatchSize();
return basicGetBatchSize();
- case HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_CACHE:
- return getHbCache();
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_ON_DELETE:
if (resolve) return getHbOnDelete();
return basicGetHbOnDelete();
+ case HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_CACHE:
+ return getHbCache();
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__NATURAL_ID:
return getNaturalId();
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__IMMUTABLE:
@@ -1136,12 +1136,12 @@ public class HbAnnotatedEReferenceImpl extends PAnnotatedEReferenceImpl implemen
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__BATCH_SIZE:
setBatchSize((BatchSize)newValue);
return;
- case HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_CACHE:
- setHbCache((Cache)newValue);
- return;
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_ON_DELETE:
setHbOnDelete((OnDelete)newValue);
return;
+ case HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_CACHE:
+ setHbCache((Cache)newValue);
+ return;
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__NATURAL_ID:
setNaturalId((NaturalId)newValue);
return;
@@ -1207,12 +1207,12 @@ public class HbAnnotatedEReferenceImpl extends PAnnotatedEReferenceImpl implemen
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__BATCH_SIZE:
setBatchSize((BatchSize)null);
return;
- case HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_CACHE:
- setHbCache((Cache)null);
- return;
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_ON_DELETE:
setHbOnDelete((OnDelete)null);
return;
+ case HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_CACHE:
+ setHbCache((Cache)null);
+ return;
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__NATURAL_ID:
setNaturalId((NaturalId)null);
return;
@@ -1266,10 +1266,10 @@ public class HbAnnotatedEReferenceImpl extends PAnnotatedEReferenceImpl implemen
return hbFetch != null;
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__BATCH_SIZE:
return batchSize != null;
- case HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_CACHE:
- return hbCache != null;
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_ON_DELETE:
return hbOnDelete != null;
+ case HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_CACHE:
+ return hbCache != null;
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__NATURAL_ID:
return naturalId != null;
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__IMMUTABLE:
@@ -1311,6 +1311,7 @@ public class HbAnnotatedEReferenceImpl extends PAnnotatedEReferenceImpl implemen
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__FORMULA: return HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__FORMULA;
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_FETCH: return HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__HB_FETCH;
case HbmodelPackage.HB_ANNOTATED_EREFERENCE__BATCH_SIZE: return HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__BATCH_SIZE;
+ case HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_ON_DELETE: return HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__HB_ON_DELETE;
default: return -1;
}
}
@@ -1342,6 +1343,7 @@ public class HbAnnotatedEReferenceImpl extends PAnnotatedEReferenceImpl implemen
case HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__FORMULA: return HbmodelPackage.HB_ANNOTATED_EREFERENCE__FORMULA;
case HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__HB_FETCH: return HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_FETCH;
case HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__BATCH_SIZE: return HbmodelPackage.HB_ANNOTATED_EREFERENCE__BATCH_SIZE;
+ case HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT__HB_ON_DELETE: return HbmodelPackage.HB_ANNOTATED_EREFERENCE__HB_ON_DELETE;
default: return -1;
}
}
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbmodelPackageImpl.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbmodelPackageImpl.java
index a8fff04e4..99a529466 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbmodelPackageImpl.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbmodelPackageImpl.java
@@ -245,6 +245,15 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getHbAnnotatedETypeElement_HbOnDelete() {
+ return (EReference)hbAnnotatedETypeElementEClass.getEStructuralFeatures().get(12);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -480,16 +489,8 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
- public EReference getHbAnnotatedEReference_HbOnDelete() {
- return (EReference)hbAnnotatedEReferenceEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
public EReference getHbAnnotatedEReference_NaturalId() {
- return (EReference)hbAnnotatedEReferenceEClass.getEStructuralFeatures().get(2);
+ return (EReference)hbAnnotatedEReferenceEClass.getEStructuralFeatures().get(1);
}
/**
@@ -497,7 +498,7 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
* @generated
*/
public EReference getHbAnnotatedEReference_Immutable() {
- return (EReference)hbAnnotatedEReferenceEClass.getEStructuralFeatures().get(3);
+ return (EReference)hbAnnotatedEReferenceEClass.getEStructuralFeatures().get(2);
}
/**
@@ -505,7 +506,7 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
* @generated
*/
public EReference getHbAnnotatedEReference_NotFound() {
- return (EReference)hbAnnotatedEReferenceEClass.getEStructuralFeatures().get(4);
+ return (EReference)hbAnnotatedEReferenceEClass.getEStructuralFeatures().get(3);
}
/**
@@ -513,7 +514,7 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
* @generated
*/
public EReference getHbAnnotatedEReference_HbType() {
- return (EReference)hbAnnotatedEReferenceEClass.getEStructuralFeatures().get(5);
+ return (EReference)hbAnnotatedEReferenceEClass.getEStructuralFeatures().get(4);
}
/**
@@ -521,7 +522,7 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
* @generated
*/
public EReference getHbAnnotatedEReference_Any() {
- return (EReference)hbAnnotatedEReferenceEClass.getEStructuralFeatures().get(6);
+ return (EReference)hbAnnotatedEReferenceEClass.getEStructuralFeatures().get(5);
}
/**
@@ -529,7 +530,7 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
* @generated
*/
public EReference getHbAnnotatedEReference_AnyMetaDef() {
- return (EReference)hbAnnotatedEReferenceEClass.getEStructuralFeatures().get(7);
+ return (EReference)hbAnnotatedEReferenceEClass.getEStructuralFeatures().get(6);
}
/**
@@ -626,6 +627,7 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
createEReference(hbAnnotatedETypeElementEClass, HB_ANNOTATED_ETYPE_ELEMENT__FORMULA);
createEReference(hbAnnotatedETypeElementEClass, HB_ANNOTATED_ETYPE_ELEMENT__HB_FETCH);
createEReference(hbAnnotatedETypeElementEClass, HB_ANNOTATED_ETYPE_ELEMENT__BATCH_SIZE);
+ createEReference(hbAnnotatedETypeElementEClass, HB_ANNOTATED_ETYPE_ELEMENT__HB_ON_DELETE);
hbAnnotatedEAttributeEClass = createEClass(HB_ANNOTATED_EATTRIBUTE);
createEReference(hbAnnotatedEAttributeEClass, HB_ANNOTATED_EATTRIBUTE__HB_TYPE);
@@ -660,7 +662,6 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
hbAnnotatedEReferenceEClass = createEClass(HB_ANNOTATED_EREFERENCE);
createEReference(hbAnnotatedEReferenceEClass, HB_ANNOTATED_EREFERENCE__HB_CACHE);
- createEReference(hbAnnotatedEReferenceEClass, HB_ANNOTATED_EREFERENCE__HB_ON_DELETE);
createEReference(hbAnnotatedEReferenceEClass, HB_ANNOTATED_EREFERENCE__NATURAL_ID);
createEReference(hbAnnotatedEReferenceEClass, HB_ANNOTATED_EREFERENCE__IMMUTABLE);
createEReference(hbAnnotatedEReferenceEClass, HB_ANNOTATED_EREFERENCE__NOT_FOUND);
@@ -734,6 +735,7 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
initEReference(getHbAnnotatedETypeElement_Formula(), theHbannotationPackage.getFormula(), null, "formula", null, 0, 1, HbAnnotatedETypeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getHbAnnotatedETypeElement_HbFetch(), theHbannotationPackage.getFetch(), null, "hbFetch", null, 0, 1, HbAnnotatedETypeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getHbAnnotatedETypeElement_BatchSize(), theHbannotationPackage.getBatchSize(), null, "batchSize", null, 0, 1, HbAnnotatedETypeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getHbAnnotatedETypeElement_HbOnDelete(), theHbannotationPackage.getOnDelete(), null, "hbOnDelete", null, 0, 1, HbAnnotatedETypeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(hbAnnotatedEAttributeEClass, HbAnnotatedEAttribute.class, "HbAnnotatedEAttribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getHbAnnotatedEAttribute_HbType(), theHbannotationPackage.getType(), null, "hbType", null, 0, 1, HbAnnotatedEAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -768,7 +770,6 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
initEClass(hbAnnotatedEReferenceEClass, HbAnnotatedEReference.class, "HbAnnotatedEReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getHbAnnotatedEReference_HbCache(), theHbannotationPackage.getCache(), null, "hbCache", null, 0, 1, HbAnnotatedEReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getHbAnnotatedEReference_HbOnDelete(), theHbannotationPackage.getOnDelete(), null, "hbOnDelete", null, 0, 1, HbAnnotatedEReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getHbAnnotatedEReference_NaturalId(), theHbannotationPackage.getNaturalId(), null, "naturalId", null, 0, 1, HbAnnotatedEReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getHbAnnotatedEReference_Immutable(), theHbannotationPackage.getImmutable(), null, "immutable", null, 0, 1, HbAnnotatedEReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getHbAnnotatedEReference_NotFound(), theHbannotationPackage.getNotFound(), null, "notFound", null, 0, 1, HbAnnotatedEReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/AbstractMapper.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/AbstractMapper.java
index d2190ffda..01fcd4f15 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/AbstractMapper.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/AbstractMapper.java
@@ -42,6 +42,7 @@ import org.eclipse.emf.teneo.hibernate.hbannotation.HbCascadeType;
import org.eclipse.emf.teneo.hibernate.hbannotation.HbannotationFactory;
import org.eclipse.emf.teneo.hibernate.hbannotation.Index;
import org.eclipse.emf.teneo.hibernate.hbannotation.OnDelete;
+import org.eclipse.emf.teneo.hibernate.hbannotation.OnDeleteAction;
import org.eclipse.emf.teneo.hibernate.hbannotation.Parameter;
import org.eclipse.emf.teneo.hibernate.hbannotation.Type;
import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEAttribute;
@@ -894,15 +895,13 @@ public abstract class AbstractMapper {
/** Add the ondelete mapping to the key */
protected void handleOndelete(Element keyElement, OnDelete onDelete) {
- // if (true || onDelete == null) {
- // return;
- // }
- //
- // if (onDelete.getAction().equals(OnDeleteAction.CASCADE)) {
- // keyElement.addAttribute("on-delete", "cascade");
- // } else {
- // keyElement.addAttribute("on-delete", "noaction");
- // }
+ if (onDelete == null) {
+ return;
+ }
+
+ if (onDelete.getAction().equals(OnDeleteAction.CASCADE)) {
+ keyElement.addAttribute("on-delete", "cascade");
+ }
}
/** Returns true if the target is the general EObject type */
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/ManyAttributeMapper.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/ManyAttributeMapper.java
index 086579c61..782f6ea5b 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/ManyAttributeMapper.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/ManyAttributeMapper.java
@@ -61,6 +61,7 @@ public class ManyAttributeMapper extends AbstractAssociationMapper implements Ex
final Element collElement = addCollectionElement(paAttribute);
final Element keyElement = collElement.addElement("key");
+ handleOndelete(keyElement, hbAttribute.getHbOnDelete());
final JoinTable jt = paAttribute.getCollectionTable() != null ? paAttribute
.getCollectionTable() : paAttribute.getJoinTable();
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/ManyToOneMapper.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/ManyToOneMapper.java
index 84b7023b4..de9759e7b 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/ManyToOneMapper.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/ManyToOneMapper.java
@@ -99,7 +99,8 @@ public class ManyToOneMapper extends AbstractAssociationMapper implements Extens
if (joinTable != null) {
final Element keyElement = currentElement.addElement("key");
-
+ handleOndelete(keyElement, hbReference.getHbOnDelete());
+
addKeyColumns((HbAnnotatedETypeElement) paReference, keyElement,
joinTable.getInverseJoinColumns());
}
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/TypedEReferenceMapper.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/TypedEReferenceMapper.java
index 1dcbae9b1..7143d9ecc 100644
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/TypedEReferenceMapper.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/TypedEReferenceMapper.java
@@ -51,6 +51,7 @@ public class TypedEReferenceMapper extends AbstractAssociationMapper implements
final Element collElement = addCollectionElement(paEFeature);
final Element keyElement = collElement.addElement("key");
addForeignKeyAttribute(keyElement, paEFeature);
+ handleOndelete(keyElement, hbReference.getHbOnDelete());
final JoinTable jt = paEFeature.getJoinTable();
final List<JoinColumn> jcs = paEFeature.getJoinColumns() == null ? new ArrayList<JoinColumn>()

Back to the top