Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Taal2011-12-06 06:01:09 -0500
committerMartin Taal2011-12-06 06:01:09 -0500
commit197f7688266bb2d114cc989d3595f0b4940f5c3e (patch)
tree0c0604bdde79a532dcfdcf9c508f2a5ed249315d
parent3f4b1cf30440b375770f5e66d2a690a92bebb186 (diff)
downloadorg.eclipse.emf.teneo-197f7688266bb2d114cc989d3595f0b4940f5c3e.tar.gz
org.eclipse.emf.teneo-197f7688266bb2d114cc989d3595f0b4940f5c3e.tar.xz
org.eclipse.emf.teneo-197f7688266bb2d114cc989d3595f0b4940f5c3e.zip
Fixes issue [365675] - add support for @Type for EReferences
-rwxr-xr-xcore/org.eclipse.emf.teneo/src/org/eclipse/emf/teneo/extension/ExtensionUtil.java3
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/.classpath2
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbannotation.genmodel1
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbmodel.ecore2
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/plugin.properties2
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/HbannotationPackage.java288
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/HbannotationFactoryImpl.java1
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/HbannotationPackageImpl.java23
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationAdapterFactory.java1
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationSwitch.java39
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationValidator.java94
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedEClass.java28
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbmodelPackage.java93
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEClassImpl.java67
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbmodelFactoryImpl.java1
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbmodelPackageImpl.java34
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/util/HbmodelSwitch.java36
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/AbstractAssociationMapper.java2
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/AbstractMapper.java69
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/FeatureMapper.java27
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/HibernateMappingGenerator.java6
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/MappingContext.java2
-rw-r--r--hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/TypedEReferenceMapper.java85
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbEntityDataStore.java2
-rw-r--r--tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_e_o_hibernate.hbm.xml16
-rw-r--r--tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_h_o_hibernate.hbm.xml16
-rw-r--r--tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_e_o_hibernate.hbm.xml2
-rw-r--r--tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_h_o_hibernate.hbm.xml2
-rwxr-xr-xtests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/annotations/AllTests.java2
-rwxr-xr-xtests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/annotations/UserTypeAction.java26
-rw-r--r--tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/Certificate.java83
-rw-r--r--tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/CertificateType.java78
-rwxr-xr-xtests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/Person.java45
-rwxr-xr-xtests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/UsertypeFactory.java9
-rwxr-xr-xtests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/UsertypePackage.java163
-rw-r--r--tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/CertificateImpl.java215
-rwxr-xr-xtests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/PersonImpl.java96
-rwxr-xr-xtests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypeFactoryImpl.java11
-rwxr-xr-xtests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypePackageImpl.java105
-rwxr-xr-xtests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/model/UserType.genmodel6
-rwxr-xr-xtests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/model/usertype.ecore30
-rwxr-xr-xtests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeAdapterFactory.java17
-rwxr-xr-xtests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeSwitch.java21
43 files changed, 1731 insertions, 120 deletions
diff --git a/core/org.eclipse.emf.teneo/src/org/eclipse/emf/teneo/extension/ExtensionUtil.java b/core/org.eclipse.emf.teneo/src/org/eclipse/emf/teneo/extension/ExtensionUtil.java
index 315ad62d8..77e3d53f7 100755
--- a/core/org.eclipse.emf.teneo/src/org/eclipse/emf/teneo/extension/ExtensionUtil.java
+++ b/core/org.eclipse.emf.teneo/src/org/eclipse/emf/teneo/extension/ExtensionUtil.java
@@ -245,6 +245,9 @@ public class ExtensionUtil {
em.registerExtension(createExtension(
"org.eclipse.emf.teneo.hibernate.mapper.OneToOneMapper", false));
em.registerExtension(createExtension(
+ "org.eclipse.emf.teneo.hibernate.mapper.TypedEReferenceMapper",
+ false));
+ em.registerExtension(createExtension(
"org.eclipse.emf.teneo.hibernate.mapper.ManyExternalReferenceMapper",
false));
em.registerExtension(createExtension(
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/.classpath b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/.classpath
index 64c5e31b7..304e86186 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/.classpath
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
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 e58b55197..c0382ccce 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbannotation.genmodel
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbannotation.genmodel
@@ -213,6 +213,7 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hbmodel.ecore#//HbAnnotatedEClass/immutable"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hbmodel.ecore#//HbAnnotatedEClass/hbEntity"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hbmodel.ecore#//HbAnnotatedEClass/batchSize"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hbmodel.ecore#//HbAnnotatedEClass/hbType"/>
</genClasses>
<genClasses image="false" ecoreClass="hbmodel.ecore#//HbAnnotatedEModelElement"/>
<genClasses ecoreClass="hbmodel.ecore#//HbAnnotatedEPackage">
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 eca189239..5db760b50 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbmodel.ecore
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/model/hbmodel.ecore
@@ -64,6 +64,8 @@
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="hbEntity" eType="ecore:EClass hbannotation.ecore#//HbEntity"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="batchSize" eType="ecore:EClass hbannotation.ecore#//BatchSize"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="hbType" eType="ecore:EClass hbannotation.ecore#//Type"
+ containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="HbAnnotatedEModelElement" abstract="true"
interface="true" eSuperTypes="../../org.eclipse.emf.teneo.annotations/model/pamodel.ecore#//PAnnotatedEModelElement"/>
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/plugin.properties b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/plugin.properties
index 166bda0ca..bcada1264 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/plugin.properties
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/plugin.properties
@@ -31,3 +31,5 @@ Plugin.providerName = Eclipse Modeling Project
# %%% END OF TRANSLATED PROPERTIES %%%
# The above properties have been shipped for translation.
# ==============================================================================
+pluginName = Hbannotation Model
+providerName = www.example.org
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/HbannotationPackage.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/HbannotationPackage.java
index 55263399b..b5f639226 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/HbannotationPackage.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/HbannotationPackage.java
@@ -76,6 +76,15 @@ public interface HbannotationPackage extends EPackage {
int HB_ANNOTATION__EMODEL_ELEMENT = PannotationPackage.PANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HB_ANNOTATION__GENERATED = PannotationPackage.PANNOTATION__GENERATED;
+
+ /**
* The number of structural features of the '<em>Hb Annotation</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
@@ -103,6 +112,15 @@ public interface HbannotationPackage extends EPackage {
int CASCADE__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CASCADE__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Value</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -139,6 +157,15 @@ public interface HbannotationPackage extends EPackage {
int COLLECTION_OF_ELEMENTS__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COLLECTION_OF_ELEMENTS__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Target Element</b></em>' attribute.
* <!-- begin-user-doc
* --> <!-- end-user-doc -->
@@ -185,6 +212,15 @@ public interface HbannotationPackage extends EPackage {
int HB_MAP_KEY__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HB_MAP_KEY__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Columns</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -221,6 +257,15 @@ public interface HbannotationPackage extends EPackage {
int PARAMETER__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAMETER__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
@@ -266,6 +311,15 @@ public interface HbannotationPackage extends EPackage {
int TYPE__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Type</b></em>' attribute.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
@@ -311,6 +365,15 @@ public interface HbannotationPackage extends EPackage {
int WHERE__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WHERE__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Clause</b></em>' attribute.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
@@ -347,6 +410,15 @@ public interface HbannotationPackage extends EPackage {
int ID_BAG__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ID_BAG__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Generator</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -401,6 +473,15 @@ public interface HbannotationPackage extends EPackage {
int GENERIC_GENERATOR__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GENERIC_GENERATOR__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
@@ -455,6 +536,15 @@ public interface HbannotationPackage extends EPackage {
int CACHE__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CACHE__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Usage</b></em>' attribute.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
@@ -509,6 +599,15 @@ public interface HbannotationPackage extends EPackage {
int TYPE_DEF__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DEF__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
@@ -563,6 +662,15 @@ public interface HbannotationPackage extends EPackage {
int FETCH__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FETCH__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Value</b></em>' attribute.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
@@ -599,6 +707,15 @@ public interface HbannotationPackage extends EPackage {
int ON_DELETE__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ON_DELETE__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Action</b></em>' attribute.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
@@ -635,6 +752,15 @@ public interface HbannotationPackage extends EPackage {
int PROXY__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROXY__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Proxy Class</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -680,6 +806,15 @@ public interface HbannotationPackage extends EPackage {
int INDEX__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INDEX__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
@@ -717,6 +852,15 @@ public interface HbannotationPackage extends EPackage {
int GENERATED__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GENERATED__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Value</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -754,6 +898,15 @@ public interface HbannotationPackage extends EPackage {
int NAMED_QUERY__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NAMED_QUERY__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -800,6 +953,15 @@ public interface HbannotationPackage extends EPackage {
int FILTER__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FILTER__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -846,6 +1008,15 @@ public interface HbannotationPackage extends EPackage {
int PARAM_DEF__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAM_DEF__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -892,6 +1063,15 @@ public interface HbannotationPackage extends EPackage {
int FILTER_DEF__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FILTER_DEF__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -947,6 +1127,15 @@ public interface HbannotationPackage extends EPackage {
int DISCRIMINATOR_FORMULA__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DISCRIMINATOR_FORMULA__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Value</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -984,6 +1173,15 @@ public interface HbannotationPackage extends EPackage {
int NATURAL_ID__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NATURAL_ID__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Mutable</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1021,6 +1219,15 @@ public interface HbannotationPackage extends EPackage {
int MAP_KEY_MANY_TO_MANY__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAP_KEY_MANY_TO_MANY__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1067,6 +1274,15 @@ public interface HbannotationPackage extends EPackage {
int FORCE_DISCRIMINATOR__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FORCE_DISCRIMINATOR__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The number of structural features of the '<em>Force Discriminator</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1095,6 +1311,15 @@ public interface HbannotationPackage extends EPackage {
int IMMUTABLE__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IMMUTABLE__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The number of structural features of the '<em>Immutable</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1123,6 +1348,15 @@ public interface HbannotationPackage extends EPackage {
int FORMULA__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FORMULA__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Value</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1160,6 +1394,15 @@ public interface HbannotationPackage extends EPackage {
int NOT_FOUND__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NOT_FOUND__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Action</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1197,6 +1440,15 @@ public interface HbannotationPackage extends EPackage {
int HB_ENTITY__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HB_ENTITY__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Dynamic Insert</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1288,6 +1540,15 @@ public interface HbannotationPackage extends EPackage {
int BATCH_SIZE__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BATCH_SIZE__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Size</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1325,6 +1586,15 @@ public interface HbannotationPackage extends EPackage {
int ANY__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ANY__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Meta Def</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1389,6 +1659,15 @@ public interface HbannotationPackage extends EPackage {
int META_VALUE__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int META_VALUE__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Target Entity</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1435,6 +1714,15 @@ public interface HbannotationPackage extends EPackage {
int ANY_META_DEF__EMODEL_ELEMENT = HB_ANNOTATION__EMODEL_ELEMENT;
/**
+ * The feature id for the '<em><b>Generated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ANY_META_DEF__GENERATED = HB_ANNOTATION__GENERATED;
+
+ /**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/HbannotationFactoryImpl.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/HbannotationFactoryImpl.java
index 61f26463a..7e7bba0bf 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/HbannotationFactoryImpl.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/HbannotationFactoryImpl.java
@@ -12,6 +12,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.emf.teneo.hibernate.hbannotation.*;
import org.eclipse.emf.teneo.hibernate.hbannotation.Any;
import org.eclipse.emf.teneo.hibernate.hbannotation.AnyMetaDef;
import org.eclipse.emf.teneo.hibernate.hbannotation.BatchSize;
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/HbannotationPackageImpl.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/HbannotationPackageImpl.java
index 24f1c60da..8eaf38db7 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/HbannotationPackageImpl.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/HbannotationPackageImpl.java
@@ -354,20 +354,10 @@ public class HbannotationPackageImpl extends EPackageImpl implements Hbannotatio
private static boolean isInited = false;
/**
- * Creates, registers, and initializes the <b>Package</b> for this
- * model, and for any others upon which it depends. Simple
- * dependencies are satisfied by calling this method on all
- * dependent packages before doing anything else. This method drives
- * initialization for interdependent packages directly, in parallel
- * with this package, itself.
- * <p>Of this package and its interdependencies, all packages which
- * have not yet been registered by their URI values are first created
- * and registered. The packages are then initialized in two steps:
- * meta-model objects for all of the packages are created before any
- * are initialized, since one package's meta-model objects may refer to
- * those of another.
- * <p>Invocation of this method will not affect any packages that have
- * already been initialized.
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link HbannotationPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
@@ -378,7 +368,7 @@ public class HbannotationPackageImpl extends EPackageImpl implements Hbannotatio
if (isInited) return (HbannotationPackage)EPackage.Registry.INSTANCE.getEPackage(HbannotationPackage.eNS_URI);
// Obtain or create and register package
- HbannotationPackageImpl theHbannotationPackage = (HbannotationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof HbannotationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new HbannotationPackageImpl());
+ HbannotationPackageImpl theHbannotationPackage = (HbannotationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof HbannotationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new HbannotationPackageImpl());
isInited = true;
@@ -409,6 +399,9 @@ public class HbannotationPackageImpl extends EPackageImpl implements Hbannotatio
// Mark meta-data to indicate it can't be changed
theHbannotationPackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(HbannotationPackage.eNS_URI, theHbannotationPackage);
return theHbannotationPackage;
}
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationAdapterFactory.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationAdapterFactory.java
index 3658d6b33..f9c8c2641 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationAdapterFactory.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationAdapterFactory.java
@@ -11,6 +11,7 @@ import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.teneo.annotations.pannotation.PAnnotation;
+import org.eclipse.emf.teneo.hibernate.hbannotation.*;
import org.eclipse.emf.teneo.hibernate.hbannotation.Any;
import org.eclipse.emf.teneo.hibernate.hbannotation.AnyMetaDef;
import org.eclipse.emf.teneo.hibernate.hbannotation.BatchSize;
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationSwitch.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationSwitch.java
index 20406d7bb..eac2ff54f 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationSwitch.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationSwitch.java
@@ -10,7 +10,10 @@ import java.util.List;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
import org.eclipse.emf.teneo.annotations.pannotation.PAnnotation;
+import org.eclipse.emf.teneo.hibernate.hbannotation.*;
import org.eclipse.emf.teneo.hibernate.hbannotation.Any;
import org.eclipse.emf.teneo.hibernate.hbannotation.AnyMetaDef;
import org.eclipse.emf.teneo.hibernate.hbannotation.BatchSize;
@@ -54,7 +57,7 @@ import org.eclipse.emf.teneo.hibernate.hbannotation.Where;
* @see org.eclipse.emf.teneo.hibernate.hbannotation.HbannotationPackage
* @generated
*/
-public class HbannotationSwitch<T> {
+public class HbannotationSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -74,32 +77,16 @@ public class HbannotationSwitch<T> {
}
/**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- public T doSwitch(EObject theEObject) {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
* @generated
*/
- protected T doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch(eSuperTypes.get(0), theEObject);
- }
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
}
/**
@@ -108,6 +95,7 @@ public class HbannotationSwitch<T> {
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
+ @Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case HbannotationPackage.HB_ANNOTATION: {
@@ -863,6 +851,7 @@ public class HbannotationSwitch<T> {
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
+ @Override
public T defaultCase(EObject object) {
return null;
}
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationValidator.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationValidator.java
index a7f4da2f9..037272ed5 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationValidator.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/util/HbannotationValidator.java
@@ -8,11 +8,13 @@ package org.eclipse.emf.teneo.hibernate.hbannotation.util;
import java.util.Map;
+import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.EObjectValidator;
import org.eclipse.emf.teneo.annotations.pannotation.util.PannotationValidator;
+import org.eclipse.emf.teneo.hibernate.hbannotation.*;
import org.eclipse.emf.teneo.hibernate.hbannotation.Any;
import org.eclipse.emf.teneo.hibernate.hbannotation.AnyMetaDef;
import org.eclipse.emf.teneo.hibernate.hbannotation.BatchSize;
@@ -225,9 +227,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateHbAnnotation(HbAnnotation hbAnnotation,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(hbAnnotation, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(hbAnnotation, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(hbAnnotation, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(hbAnnotation, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(hbAnnotation, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(hbAnnotation, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(hbAnnotation, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(hbAnnotation, diagnostics, context);
@@ -250,6 +254,20 @@ public class HbannotationValidator extends EObjectValidator {
// -> specify the condition that violates the constraint
// -> verify the diagnostic details, including severity, code, and message
// Ensure that you remove @generated or mark it @generated NOT
+ if (false) {
+ if (diagnostics != null) {
+ diagnostics.add
+ (createDiagnostic
+ (Diagnostic.ERROR,
+ DIAGNOSTIC_SOURCE,
+ 0,
+ "_UI_GenericConstraint_diagnostic",
+ new Object[] { "CompatibleEModelElementType", getObjectLabel(hbAnnotation, context) },
+ new Object[] { hbAnnotation },
+ context));
+ }
+ return false;
+ }
return pannotationValidator.validatePAnnotation_CompatibleEModelElementType(hbAnnotation, diagnostics, context);
}
@@ -266,6 +284,20 @@ public class HbannotationValidator extends EObjectValidator {
// -> specify the condition that violates the constraint
// -> verify the diagnostic details, including severity, code, and message
// Ensure that you remove @generated or mark it @generated NOT
+ if (false) {
+ if (diagnostics != null) {
+ diagnostics.add
+ (createDiagnostic
+ (Diagnostic.ERROR,
+ DIAGNOSTIC_SOURCE,
+ 0,
+ "_UI_GenericConstraint_diagnostic",
+ new Object[] { "AnnotationIsSupported", getObjectLabel(hbAnnotation, context) },
+ new Object[] { hbAnnotation },
+ context));
+ }
+ return false;
+ }
return pannotationValidator.validatePAnnotation_AnnotationIsSupported(hbAnnotation, diagnostics, context);
}
@@ -275,9 +307,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateCascade(Cascade cascade,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(cascade, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(cascade, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(cascade, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(cascade, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(cascade, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(cascade, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(cascade, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(cascade, diagnostics, context);
@@ -294,9 +328,11 @@ public class HbannotationValidator extends EObjectValidator {
public boolean validateCollectionOfElements(
CollectionOfElements collectionOfElements,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(collectionOfElements, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(collectionOfElements, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(collectionOfElements, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(collectionOfElements, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(collectionOfElements, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(collectionOfElements, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(collectionOfElements, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(collectionOfElements, diagnostics, context);
@@ -312,9 +348,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateHbMapKey(HbMapKey hbMapKey,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(hbMapKey, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(hbMapKey, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(hbMapKey, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(hbMapKey, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(hbMapKey, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(hbMapKey, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(hbMapKey, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(hbMapKey, diagnostics, context);
@@ -330,9 +368,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateParameter(Parameter parameter,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(parameter, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(parameter, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(parameter, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(parameter, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(parameter, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(parameter, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(parameter, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(parameter, diagnostics, context);
@@ -348,9 +388,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateType(Type type, DiagnosticChain diagnostics,
Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(type, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(type, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(type, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(type, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(type, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(type, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(type, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(type, diagnostics, context);
@@ -366,9 +408,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateWhere(Where where, DiagnosticChain diagnostics,
Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(where, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(where, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(where, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(where, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(where, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(where, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(where, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(where, diagnostics, context);
@@ -384,9 +428,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateIdBag(IdBag idBag, DiagnosticChain diagnostics,
Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(idBag, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(idBag, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(idBag, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(idBag, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(idBag, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(idBag, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(idBag, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(idBag, diagnostics, context);
@@ -402,9 +448,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateGenericGenerator(GenericGenerator genericGenerator,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(genericGenerator, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(genericGenerator, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(genericGenerator, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(genericGenerator, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(genericGenerator, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(genericGenerator, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(genericGenerator, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(genericGenerator, diagnostics, context);
@@ -420,9 +468,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateCache(Cache cache, DiagnosticChain diagnostics,
Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(cache, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(cache, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(cache, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(cache, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(cache, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(cache, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(cache, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(cache, diagnostics, context);
@@ -438,9 +488,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateTypeDef(TypeDef typeDef,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(typeDef, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(typeDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(typeDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(typeDef, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(typeDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(typeDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(typeDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(typeDef, diagnostics, context);
@@ -456,9 +508,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateFetch(Fetch fetch, DiagnosticChain diagnostics,
Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(fetch, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(fetch, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(fetch, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(fetch, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(fetch, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(fetch, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(fetch, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(fetch, diagnostics, context);
@@ -474,9 +528,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateOnDelete(OnDelete onDelete,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(onDelete, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(onDelete, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(onDelete, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(onDelete, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(onDelete, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(onDelete, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(onDelete, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(onDelete, diagnostics, context);
@@ -492,9 +548,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateProxy(Proxy proxy, DiagnosticChain diagnostics,
Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(proxy, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(proxy, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(proxy, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(proxy, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(proxy, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(proxy, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(proxy, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(proxy, diagnostics, context);
@@ -510,9 +568,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateNamedQuery(NamedQuery namedQuery,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(namedQuery, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(namedQuery, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(namedQuery, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(namedQuery, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(namedQuery, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(namedQuery, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(namedQuery, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(namedQuery, diagnostics, context);
@@ -528,9 +588,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateFilter(Filter filter, DiagnosticChain diagnostics,
Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(filter, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(filter, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(filter, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(filter, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(filter, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(filter, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(filter, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(filter, diagnostics, context);
@@ -546,9 +608,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateParamDef(ParamDef paramDef,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(paramDef, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(paramDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(paramDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(paramDef, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(paramDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(paramDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(paramDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(paramDef, diagnostics, context);
@@ -564,9 +628,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateFilterDef(FilterDef filterDef,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(filterDef, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(filterDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(filterDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(filterDef, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(filterDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(filterDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(filterDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(filterDef, diagnostics, context);
@@ -583,9 +649,11 @@ public class HbannotationValidator extends EObjectValidator {
public boolean validateDiscriminatorFormula(
DiscriminatorFormula discriminatorFormula,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(discriminatorFormula, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(discriminatorFormula, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(discriminatorFormula, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(discriminatorFormula, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(discriminatorFormula, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(discriminatorFormula, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(discriminatorFormula, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(discriminatorFormula, diagnostics, context);
@@ -601,9 +669,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateNaturalId(NaturalId naturalId,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(naturalId, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(naturalId, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(naturalId, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(naturalId, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(naturalId, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(naturalId, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(naturalId, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(naturalId, diagnostics, context);
@@ -619,9 +689,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateMapKeyManyToMany(MapKeyManyToMany mapKeyManyToMany,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(mapKeyManyToMany, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(mapKeyManyToMany, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(mapKeyManyToMany, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(mapKeyManyToMany, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(mapKeyManyToMany, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(mapKeyManyToMany, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(mapKeyManyToMany, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(mapKeyManyToMany, diagnostics, context);
@@ -638,9 +710,11 @@ public class HbannotationValidator extends EObjectValidator {
public boolean validateForceDiscriminator(
ForceDiscriminator forceDiscriminator, DiagnosticChain diagnostics,
Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(forceDiscriminator, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(forceDiscriminator, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(forceDiscriminator, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(forceDiscriminator, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(forceDiscriminator, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(forceDiscriminator, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(forceDiscriminator, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(forceDiscriminator, diagnostics, context);
@@ -656,9 +730,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateImmutable(Immutable immutable,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(immutable, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(immutable, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(immutable, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(immutable, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(immutable, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(immutable, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(immutable, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(immutable, diagnostics, context);
@@ -674,9 +750,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateFormula(Formula formula,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(formula, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(formula, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(formula, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(formula, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(formula, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(formula, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(formula, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(formula, diagnostics, context);
@@ -692,9 +770,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateNotFound(NotFound notFound,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(notFound, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(notFound, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(notFound, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(notFound, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(notFound, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(notFound, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(notFound, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(notFound, diagnostics, context);
@@ -710,9 +790,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateHbEntity(HbEntity hbEntity,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(hbEntity, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(hbEntity, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(hbEntity, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(hbEntity, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(hbEntity, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(hbEntity, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(hbEntity, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(hbEntity, diagnostics, context);
@@ -728,9 +810,11 @@ public class HbannotationValidator extends EObjectValidator {
* @generated
*/
public boolean validateBatchSize(BatchSize batchSize, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(batchSize, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(batchSize, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(batchSize, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(batchSize, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(batchSize, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(batchSize, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(batchSize, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(batchSize, diagnostics, context);
@@ -746,9 +830,11 @@ public class HbannotationValidator extends EObjectValidator {
* @generated
*/
public boolean validateAny(Any any, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(any, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(any, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(any, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(any, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(any, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(any, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(any, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(any, diagnostics, context);
@@ -764,9 +850,11 @@ public class HbannotationValidator extends EObjectValidator {
* @generated
*/
public boolean validateMetaValue(MetaValue metaValue, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(metaValue, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(metaValue, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(metaValue, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(metaValue, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(metaValue, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(metaValue, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(metaValue, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(metaValue, diagnostics, context);
@@ -782,9 +870,11 @@ public class HbannotationValidator extends EObjectValidator {
* @generated
*/
public boolean validateAnyMetaDef(AnyMetaDef anyMetaDef, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(anyMetaDef, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(anyMetaDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(anyMetaDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(anyMetaDef, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(anyMetaDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(anyMetaDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(anyMetaDef, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(anyMetaDef, diagnostics, context);
@@ -800,9 +890,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateIndex(Index index, DiagnosticChain diagnostics,
Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(index, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(index, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(index, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(index, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(index, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(index, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(index, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(index, diagnostics, context);
@@ -818,9 +910,11 @@ public class HbannotationValidator extends EObjectValidator {
*/
public boolean validateGenerated(Generated generated,
DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(generated, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(generated, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(generated, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(generated, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(generated, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(generated, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(generated, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(generated, diagnostics, context);
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedEClass.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedEClass.java
index d4429cfd1..d6e6540c6 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedEClass.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/HbAnnotatedEClass.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.teneo.hibernate.hbannotation.Immutable;
import org.eclipse.emf.teneo.hibernate.hbannotation.NamedQuery;
import org.eclipse.emf.teneo.hibernate.hbannotation.OnDelete;
import org.eclipse.emf.teneo.hibernate.hbannotation.Proxy;
+import org.eclipse.emf.teneo.hibernate.hbannotation.Type;
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.HbAnnotatedEClass#getImmutable <em>Immutable</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEClass#getHbEntity <em>Hb Entity</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEClass#getBatchSize <em>Batch Size</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEClass#getHbType <em>Hb Type</em>}</li>
* </ul>
* </p>
*
@@ -329,4 +331,30 @@ public interface HbAnnotatedEClass extends PAnnotatedEClass {
*/
void setBatchSize(BatchSize value);
+ /**
+ * Returns the value of the '<em><b>Hb Type</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Hb Type</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Hb Type</em>' containment reference.
+ * @see #setHbType(Type)
+ * @see org.eclipse.emf.teneo.hibernate.hbmodel.HbmodelPackage#getHbAnnotatedEClass_HbType()
+ * @model containment="true"
+ * @generated
+ */
+ Type getHbType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEClass#getHbType <em>Hb Type</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Hb Type</em>' containment reference.
+ * @see #getHbType()
+ * @generated
+ */
+ void setHbType(Type value);
+
} // HbAnnotatedEClass
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 562ae6b25..7e990fee7 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
@@ -178,6 +178,15 @@ public interface HbmodelPackage extends EPackage {
int HB_ANNOTATED_ETYPE_ELEMENT__FOREIGN_KEY = PamodelPackage.PANNOTATED_ESTRUCTURAL_FEATURE__FOREIGN_KEY;
/**
+ * The feature id for the '<em><b>List Index Column</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HB_ANNOTATED_ETYPE_ELEMENT__LIST_INDEX_COLUMN = PamodelPackage.PANNOTATED_ESTRUCTURAL_FEATURE__LIST_INDEX_COLUMN;
+
+ /**
* The feature id for the '<em><b>Hb Where</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -395,6 +404,15 @@ public interface HbmodelPackage extends EPackage {
int HB_ANNOTATED_EATTRIBUTE__FOREIGN_KEY = PamodelPackage.PANNOTATED_EATTRIBUTE__FOREIGN_KEY;
/**
+ * The feature id for the '<em><b>List Index Column</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HB_ANNOTATED_EATTRIBUTE__LIST_INDEX_COLUMN = PamodelPackage.PANNOTATED_EATTRIBUTE__LIST_INDEX_COLUMN;
+
+ /**
* The feature id for the '<em><b>Model EAttribute</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -783,6 +801,42 @@ public interface HbmodelPackage extends EPackage {
int HB_ANNOTATED_ECLASS__ASSOCIATION_OVERRIDES = PamodelPackage.PANNOTATED_ECLASS__ASSOCIATION_OVERRIDES;
/**
+ * The feature id for the '<em><b>Eav Mapping</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HB_ANNOTATED_ECLASS__EAV_MAPPING = PamodelPackage.PANNOTATED_ECLASS__EAV_MAPPING;
+
+ /**
+ * The feature id for the '<em><b>No EAV Mapping</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HB_ANNOTATED_ECLASS__NO_EAV_MAPPING = PamodelPackage.PANNOTATED_ECLASS__NO_EAV_MAPPING;
+
+ /**
+ * The feature id for the '<em><b>Sequence Generators</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HB_ANNOTATED_ECLASS__SEQUENCE_GENERATORS = PamodelPackage.PANNOTATED_ECLASS__SEQUENCE_GENERATORS;
+
+ /**
+ * The feature id for the '<em><b>External</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HB_ANNOTATED_ECLASS__EXTERNAL = PamodelPackage.PANNOTATED_ECLASS__EXTERNAL;
+
+ /**
* The feature id for the '<em><b>Hb Cache</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -891,13 +945,22 @@ public interface HbmodelPackage extends EPackage {
int HB_ANNOTATED_ECLASS__BATCH_SIZE = PamodelPackage.PANNOTATED_ECLASS_FEATURE_COUNT + 11;
/**
+ * The feature id for the '<em><b>Hb Type</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HB_ANNOTATED_ECLASS__HB_TYPE = PamodelPackage.PANNOTATED_ECLASS_FEATURE_COUNT + 12;
+
+ /**
* The number of structural features of the '<em>Hb Annotated EClass</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int HB_ANNOTATED_ECLASS_FEATURE_COUNT = PamodelPackage.PANNOTATED_ECLASS_FEATURE_COUNT + 12;
+ int HB_ANNOTATED_ECLASS_FEATURE_COUNT = PamodelPackage.PANNOTATED_ECLASS_FEATURE_COUNT + 13;
/**
* The meta object id for the '{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEModelElement <em>Hb Annotated EModel Element</em>}' class.
@@ -1200,6 +1263,15 @@ public interface HbmodelPackage extends EPackage {
int HB_ANNOTATED_EREFERENCE__FOREIGN_KEY = PamodelPackage.PANNOTATED_EREFERENCE__FOREIGN_KEY;
/**
+ * The feature id for the '<em><b>List Index Column</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HB_ANNOTATED_EREFERENCE__LIST_INDEX_COLUMN = PamodelPackage.PANNOTATED_EREFERENCE__LIST_INDEX_COLUMN;
+
+ /**
* The feature id for the '<em><b>Model EReference</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1997,6 +2069,17 @@ public interface HbmodelPackage extends EPackage {
EReference getHbAnnotatedEClass_BatchSize();
/**
+ * Returns the meta object for the containment reference '{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEClass#getHbType <em>Hb Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Hb Type</em>'.
+ * @see org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEClass#getHbType()
+ * @see #getHbAnnotatedEClass()
+ * @generated
+ */
+ EReference getHbAnnotatedEClass_HbType();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEModelElement <em>Hb Annotated EModel Element</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2536,6 +2619,14 @@ public interface HbmodelPackage extends EPackage {
EReference HB_ANNOTATED_ECLASS__BATCH_SIZE = eINSTANCE.getHbAnnotatedEClass_BatchSize();
/**
+ * The meta object literal for the '<em><b>Hb Type</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference HB_ANNOTATED_ECLASS__HB_TYPE = eINSTANCE.getHbAnnotatedEClass_HbType();
+
+ /**
* The meta object literal for the '{@link org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEModelElement <em>Hb Annotated EModel Element</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEClassImpl.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEClassImpl.java
index 7ed3ce056..ffedab3ba 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEClassImpl.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbAnnotatedEClassImpl.java
@@ -27,6 +27,7 @@ import org.eclipse.emf.teneo.hibernate.hbannotation.Immutable;
import org.eclipse.emf.teneo.hibernate.hbannotation.NamedQuery;
import org.eclipse.emf.teneo.hibernate.hbannotation.OnDelete;
import org.eclipse.emf.teneo.hibernate.hbannotation.Proxy;
+import org.eclipse.emf.teneo.hibernate.hbannotation.Type;
import org.eclipse.emf.teneo.hibernate.hbannotation.Where;
import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEClass;
import org.eclipse.emf.teneo.hibernate.hbmodel.HbmodelPackage;
@@ -49,6 +50,7 @@ import org.eclipse.emf.teneo.hibernate.hbmodel.HbmodelPackage;
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEClassImpl#getImmutable <em>Immutable</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEClassImpl#getHbEntity <em>Hb Entity</em>}</li>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEClassImpl#getBatchSize <em>Batch Size</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.hibernate.hbmodel.impl.HbAnnotatedEClassImpl#getHbType <em>Hb Type</em>}</li>
* </ul>
* </p>
*
@@ -176,6 +178,16 @@ public class HbAnnotatedEClassImpl extends PAnnotatedEClassImpl implements HbAnn
protected BatchSize batchSize;
/**
+ * The cached value of the '{@link #getHbType() <em>Hb Type</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getHbType()
+ * @generated
+ * @ordered
+ */
+ protected Type hbType;
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -593,6 +605,49 @@ public class HbAnnotatedEClassImpl extends PAnnotatedEClassImpl implements HbAnn
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Type getHbType() {
+ return hbType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetHbType(Type newHbType, NotificationChain msgs) {
+ Type oldHbType = hbType;
+ hbType = newHbType;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, HbmodelPackage.HB_ANNOTATED_ECLASS__HB_TYPE, oldHbType, newHbType);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setHbType(Type newHbType) {
+ if (newHbType != hbType) {
+ NotificationChain msgs = null;
+ if (hbType != null)
+ msgs = ((InternalEObject)hbType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - HbmodelPackage.HB_ANNOTATED_ECLASS__HB_TYPE, null, msgs);
+ if (newHbType != null)
+ msgs = ((InternalEObject)newHbType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - HbmodelPackage.HB_ANNOTATED_ECLASS__HB_TYPE, null, msgs);
+ msgs = basicSetHbType(newHbType, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HbmodelPackage.HB_ANNOTATED_ECLASS__HB_TYPE, newHbType, newHbType));
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -609,6 +664,8 @@ public class HbAnnotatedEClassImpl extends PAnnotatedEClassImpl implements HbAnn
return basicSetForceDiscriminator(null, msgs);
case HbmodelPackage.HB_ANNOTATED_ECLASS__IMMUTABLE:
return basicSetImmutable(null, msgs);
+ case HbmodelPackage.HB_ANNOTATED_ECLASS__HB_TYPE:
+ return basicSetHbType(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -648,6 +705,8 @@ public class HbAnnotatedEClassImpl extends PAnnotatedEClassImpl implements HbAnn
case HbmodelPackage.HB_ANNOTATED_ECLASS__BATCH_SIZE:
if (resolve) return getBatchSize();
return basicGetBatchSize();
+ case HbmodelPackage.HB_ANNOTATED_ECLASS__HB_TYPE:
+ return getHbType();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -699,6 +758,9 @@ public class HbAnnotatedEClassImpl extends PAnnotatedEClassImpl implements HbAnn
case HbmodelPackage.HB_ANNOTATED_ECLASS__BATCH_SIZE:
setBatchSize((BatchSize)newValue);
return;
+ case HbmodelPackage.HB_ANNOTATED_ECLASS__HB_TYPE:
+ setHbType((Type)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -746,6 +808,9 @@ public class HbAnnotatedEClassImpl extends PAnnotatedEClassImpl implements HbAnn
case HbmodelPackage.HB_ANNOTATED_ECLASS__BATCH_SIZE:
setBatchSize((BatchSize)null);
return;
+ case HbmodelPackage.HB_ANNOTATED_ECLASS__HB_TYPE:
+ setHbType((Type)null);
+ return;
}
super.eUnset(featureID);
}
@@ -781,6 +846,8 @@ public class HbAnnotatedEClassImpl extends PAnnotatedEClassImpl implements HbAnn
return hbEntity != null;
case HbmodelPackage.HB_ANNOTATED_ECLASS__BATCH_SIZE:
return batchSize != null;
+ case HbmodelPackage.HB_ANNOTATED_ECLASS__HB_TYPE:
+ return hbType != null;
}
return super.eIsSet(featureID);
}
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbmodelFactoryImpl.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbmodelFactoryImpl.java
index 57d286a71..4582aab06 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbmodelFactoryImpl.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/impl/HbmodelFactoryImpl.java
@@ -11,6 +11,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.emf.teneo.hibernate.hbmodel.*;
import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEAttribute;
import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEClass;
import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEDataType;
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 48f4adf5b..69e4555e3 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
@@ -107,20 +107,10 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
private static boolean isInited = false;
/**
- * Creates, registers, and initializes the <b>Package</b> for this
- * model, and for any others upon which it depends. Simple
- * dependencies are satisfied by calling this method on all
- * dependent packages before doing anything else. This method drives
- * initialization for interdependent packages directly, in parallel
- * with this package, itself.
- * <p>Of this package and its interdependencies, all packages which
- * have not yet been registered by their URI values are first created
- * and registered. The packages are then initialized in two steps:
- * meta-model objects for all of the packages are created before any
- * are initialized, since one package's meta-model objects may refer to
- * those of another.
- * <p>Invocation of this method will not affect any packages that have
- * already been initialized.
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link HbmodelPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
@@ -132,7 +122,7 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
if (isInited) return (HbmodelPackage)EPackage.Registry.INSTANCE.getEPackage(HbmodelPackage.eNS_URI);
// Obtain or create and register package
- HbmodelPackageImpl theHbmodelPackage = (HbmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof HbmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new HbmodelPackageImpl());
+ HbmodelPackageImpl theHbmodelPackage = (HbmodelPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof HbmodelPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new HbmodelPackageImpl());
isInited = true;
@@ -154,6 +144,9 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
// Mark meta-data to indicate it can't be changed
theHbmodelPackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(HbmodelPackage.eNS_URI, theHbmodelPackage);
return theHbmodelPackage;
}
@@ -432,6 +425,15 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
* <!-- end-user-doc -->
* @generated
*/
+ public EReference getHbAnnotatedEClass_HbType() {
+ return (EReference)hbAnnotatedEClassEClass.getEStructuralFeatures().get(12);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getHbAnnotatedEModelElement() {
return hbAnnotatedEModelElementEClass;
}
@@ -712,6 +714,7 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
createEReference(hbAnnotatedEClassEClass, HB_ANNOTATED_ECLASS__IMMUTABLE);
createEReference(hbAnnotatedEClassEClass, HB_ANNOTATED_ECLASS__HB_ENTITY);
createEReference(hbAnnotatedEClassEClass, HB_ANNOTATED_ECLASS__BATCH_SIZE);
+ createEReference(hbAnnotatedEClassEClass, HB_ANNOTATED_ECLASS__HB_TYPE);
hbAnnotatedEModelElementEClass = createEClass(HB_ANNOTATED_EMODEL_ELEMENT);
@@ -821,6 +824,7 @@ public class HbmodelPackageImpl extends EPackageImpl implements HbmodelPackage {
initEReference(getHbAnnotatedEClass_Immutable(), theHbannotationPackage.getImmutable(), null, "immutable", null, 0, 1, HbAnnotatedEClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getHbAnnotatedEClass_HbEntity(), theHbannotationPackage.getHbEntity(), null, "hbEntity", null, 0, 1, HbAnnotatedEClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getHbAnnotatedEClass_BatchSize(), theHbannotationPackage.getBatchSize(), null, "batchSize", null, 0, 1, HbAnnotatedEClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getHbAnnotatedEClass_HbType(), theHbannotationPackage.getType(), null, "hbType", null, 0, 1, HbAnnotatedEClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(hbAnnotatedEModelElementEClass, HbAnnotatedEModelElement.class, "HbAnnotatedEModelElement", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/util/HbmodelSwitch.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/util/HbmodelSwitch.java
index 886c9f058..237f94270 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/util/HbmodelSwitch.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbmodel/util/HbmodelSwitch.java
@@ -11,6 +11,8 @@ import java.util.List;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
import org.eclipse.emf.teneo.annotations.pamodel.PAnnotatedEAttribute;
import org.eclipse.emf.teneo.annotations.pamodel.PAnnotatedEClass;
import org.eclipse.emf.teneo.annotations.pamodel.PAnnotatedEDataType;
@@ -35,7 +37,7 @@ import org.eclipse.emf.teneo.hibernate.hbmodel.*;
* @see org.eclipse.emf.teneo.hibernate.hbmodel.HbmodelPackage
* @generated
*/
-public class HbmodelSwitch<T> {
+public class HbmodelSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
@@ -57,34 +59,16 @@ public class HbmodelSwitch<T> {
}
/**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
* @generated
*/
- public T doSwitch(EObject theEObject) {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch(eSuperTypes.get(0), theEObject);
- }
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
}
/**
@@ -94,6 +78,7 @@ public class HbmodelSwitch<T> {
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
+ @Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case HbmodelPackage.HB_ANNOTATED_ETYPE_ELEMENT: {
@@ -402,6 +387,7 @@ public class HbmodelSwitch<T> {
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
+ @Override
public T defaultCase(EObject object) {
return null;
}
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/AbstractAssociationMapper.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/AbstractAssociationMapper.java
index 566cf70d2..8592b591f 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/AbstractAssociationMapper.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/AbstractAssociationMapper.java
@@ -813,7 +813,6 @@ public abstract class AbstractAssociationMapper extends AbstractMapper {
// MT: the target type name is ignored for a many element, it is always
// recomputed
elElement = collElement.addElement("element");
- setType(paFeature, elElement);
// } else { // in this case the defaultannotator has set the
// targetentity!
// elElement = collElement.addElement("element").addAttribute("type",
@@ -823,6 +822,7 @@ public abstract class AbstractAssociationMapper extends AbstractMapper {
addColumnsAndFormula(elElement, paFeature, columns, getHbmContext()
.isCurrentElementFeatureMap(), true);
}
+ setType(paFeature, elElement);
return elElement;
}
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 37f536660..cd91b1d47 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
@@ -41,7 +41,9 @@ 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.Parameter;
+import org.eclipse.emf.teneo.hibernate.hbannotation.Type;
import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEAttribute;
+import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEClass;
import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEDataType;
import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEReference;
import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedETypeElement;
@@ -123,33 +125,54 @@ public abstract class AbstractMapper {
/** Handles the External annotation */
protected void setType(PAnnotatedEReference paReference, Element propElement) {
final External external = paReference.getExternal();
- if (external == null) {
+ final Element typeElement = propElement.addElement("type");
+ if (external != null) {
+ if (external.getType() == null) { // standard external
+ typeElement.addAttribute("name", getHbmContext()
+ .getExternalUserType());
+ } else {
+ typeElement.addAttribute("name", external.getType());
+ }
+ typeElement
+ .addElement("param")
+ .addAttribute("name", HbMapperConstants.ECLASS_NAME_META)
+ .addText(
+ paReference.getModelEReference()
+ .getEReferenceType().getName());
+ typeElement
+ .addElement("param")
+ .addAttribute("name", HbMapperConstants.EPACKAGE_PARAM)
+ .addText(
+ paReference.getModelEReference()
+ .getEReferenceType().getEPackage()
+ .getNsURI());
+ return;
+ }
+
+ // there must be a type element
+ final HbAnnotatedEReference hbReference = (HbAnnotatedEReference) paReference;
+ Type type = hbReference.getHbType();
+ if (type == null) {
+ type = ((HbAnnotatedEClass) hbReference.getPaEClass()).getHbType();
+ }
+ if (type == null || type.getType() == null ) {
throw new MappingException(
- "External annotation not set on eReference "
+ "No external or type annotation set (or type has no name) on eReference "
+ StoreUtil.toString(paReference
.getModelEReference()));
}
-
- final Element typeElement = propElement.addElement("type");
- if (external.getType() == null) { // standard external
- typeElement.addAttribute("name", getHbmContext()
- .getExternalUserType());
- } else {
- typeElement.addAttribute("name", external.getType());
- }
- typeElement
- .addElement("param")
- .addAttribute("name", HbMapperConstants.ECLASS_NAME_META)
- .addText(
- paReference.getModelEReference().getEReferenceType()
- .getName());
- typeElement
- .addElement("param")
- .addAttribute("name", HbMapperConstants.EPACKAGE_PARAM)
- .addText(
- paReference.getModelEReference().getEReferenceType()
- .getEPackage().getNsURI());
-
+ final String name = type.getType();
+ final List<Parameter> params = type.getParameters();
+ if (name != null) {
+ typeElement.addAttribute("name", name);
+ if (params != null) {
+ for (Parameter param : params) {
+ typeElement.addElement("param")
+ .addAttribute("name", param.getName())
+ .addText(param.getValue());
+ }
+ }
+ }
}
/** Handles the type or typedef annotations */
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/FeatureMapper.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/FeatureMapper.java
index 315e26743..93d50b55c 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/FeatureMapper.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/FeatureMapper.java
@@ -18,11 +18,14 @@ package org.eclipse.emf.teneo.hibernate.mapper;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.teneo.annotations.pamodel.PAnnotatedEAttribute;
import org.eclipse.emf.teneo.annotations.pamodel.PAnnotatedEReference;
import org.eclipse.emf.teneo.annotations.pamodel.PAnnotatedEStructuralFeature;
import org.eclipse.emf.teneo.annotations.pamodel.PamodelPackage;
import org.eclipse.emf.teneo.extension.ExtensionPoint;
+import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEClass;
+import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEReference;
/**
* Dispatch events to the appropriate Mapper.
@@ -69,6 +72,8 @@ public class FeatureMapper implements ExtensionPoint {
private OneToManyMapper oneToManyMapper = null;
+ private TypedEReferenceMapper typedEReferenceMapper = null;
+
private OneToOneMapper oneToOneMapper = null;
private ManyExternalReferenceMapper manyExternalReferenceMapper;
@@ -151,6 +156,19 @@ public class FeatureMapper implements ExtensionPoint {
/** Process the ereference */
private void processPAnnotatedEReference(
PAnnotatedEReference pAnnotatedEReference) {
+
+ final HbAnnotatedEReference hbReference = (HbAnnotatedEReference) pAnnotatedEReference;
+ final HbAnnotatedEClass hbClass = hbReference.getTransient() == null ? (HbAnnotatedEClass) pAnnotatedEReference
+ .getAReferenceType() : null;
+ if (hbReference.getHbType() != null
+ || (hbClass != null && hbClass.getHbType() != null)) {
+ if (hbReference.getHbType() == null) {
+ hbReference.setHbType(EcoreUtil.copy(hbClass.getHbType()));
+ }
+ getTypedEReferenceMapper().process(pAnnotatedEReference);
+ return;
+ }
+
final EStructuralFeature discrFeature;
if (pAnnotatedEReference.getAnnotations().isEmpty()) {
discrFeature = PamodelPackage.eINSTANCE
@@ -276,4 +294,13 @@ public class FeatureMapper implements ExtensionPoint {
ManyExternalReferenceMapper manyExternalReferenceMapper) {
this.manyExternalReferenceMapper = manyExternalReferenceMapper;
}
+
+ public TypedEReferenceMapper getTypedEReferenceMapper() {
+ return typedEReferenceMapper;
+ }
+
+ public void setTypedEReferenceMapper(
+ TypedEReferenceMapper typedEReferenceMapper) {
+ this.typedEReferenceMapper = typedEReferenceMapper;
+ }
} \ No newline at end of file
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/HibernateMappingGenerator.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/HibernateMappingGenerator.java
index a132d4f2c..f1972c953 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/HibernateMappingGenerator.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/HibernateMappingGenerator.java
@@ -234,9 +234,15 @@ public class HibernateMappingGenerator implements ExtensionPoint,
return;
}
+ // persisted externally
if (paEClass.getExternal() != null) {
return;
}
+
+ // it has a type is persisted differently
+ if (((HbAnnotatedEClass)paEClass).getHbType() != null) {
+ return;
+ }
hbmContext.setCurrentEClass(paEClass.getModelEClass());
hbmContext.getEntityMapper().processEntity(paEClass);
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/MappingContext.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/MappingContext.java
index 415e70621..8d4527fe0 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/MappingContext.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/MappingContext.java
@@ -297,6 +297,8 @@ public class MappingContext extends AbstractProcessingContext implements
featureMapper.setOneToOneMapper(createMapper(OneToOneMapper.class));
featureMapper
.setManyExternalReferenceMapper(createMapper(ManyExternalReferenceMapper.class));
+ featureMapper
+ .setTypedEReferenceMapper(createMapper(TypedEReferenceMapper.class));
return featureMapper;
}
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
new file mode 100644
index 000000000..307e84bd3
--- /dev/null
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/TypedEReferenceMapper.java
@@ -0,0 +1,85 @@
+/**
+ * <copyright> Copyright (c) 2011 Springsite BV (The Netherlands) and others 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: Martin Taal
+ * </copyright> $Id: ManyAttributeMapper.java,v 1.27 2009/11/02 18:14:18 mtaal Exp $
+ */
+
+package org.eclipse.emf.teneo.hibernate.mapper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.teneo.annotations.pamodel.PAnnotatedEReference;
+import org.eclipse.emf.teneo.annotations.pamodel.PAnnotatedEStructuralFeature;
+import org.eclipse.emf.teneo.annotations.pannotation.JoinColumn;
+import org.eclipse.emf.teneo.annotations.pannotation.JoinTable;
+import org.eclipse.emf.teneo.annotations.pannotation.OneToMany;
+import org.eclipse.emf.teneo.extension.ExtensionPoint;
+import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEAttribute;
+import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEReference;
+import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedETypeElement;
+import org.eclipse.emf.teneo.simpledom.Element;
+
+/**
+ * Maps an EReference with a type annotation. This type of ereference is mapped
+ * as an eattribute with a type parameter.
+ *
+ * @author <a href="mailto:mtaal at elver.org">Martin Taal</a>
+ */
+public class TypedEReferenceMapper extends AbstractAssociationMapper implements
+ ExtensionPoint {
+ public void process(PAnnotatedEReference paReference) {
+ if (paReference.getModelEReference().isMany()) {
+ processMany(paReference);
+ } else {
+ processSingle(paReference);
+ }
+ }
+
+ private void processSingle(PAnnotatedEStructuralFeature paEFeature) {
+ final String name = getHbmContext().getPropertyName(
+ paEFeature.getModelEStructuralFeature());
+ final Element propElement = getHbmContext().getCurrent()
+ .addElement("property").addAttribute("name", name);
+ addColumnsAndFormula(propElement, paEFeature, getColumns(paEFeature), true, true);
+ setType(paEFeature, propElement);
+ addAccessor(propElement);
+ }
+
+ private void processMany(PAnnotatedEStructuralFeature paEFeature) {
+ final HbAnnotatedEReference hbReference = (HbAnnotatedEReference) paEFeature;
+
+ final Element collElement = addCollectionElement(paEFeature);
+ final Element keyElement = collElement.addElement("key");
+
+ final JoinTable jt = paEFeature.getJoinTable();
+ final List<JoinColumn> jcs = paEFeature.getJoinColumns() == null ? new ArrayList<JoinColumn>()
+ : paEFeature.getJoinColumns();
+ final OneToMany otm = paEFeature.getOneToMany();
+
+ if (jt != null) {
+ addJoinTable(hbReference, collElement, keyElement, jt);
+ addKeyColumns(hbReference, keyElement, jcs);
+ } else {
+ addKeyColumns(hbReference, keyElement, jcs);
+ }
+
+ if (otm.isIndexed() && hbReference.getHbIdBag() == null) {
+ addListIndex(collElement, paEFeature);
+ }
+
+ addFetchType(collElement, otm.getFetch());
+ addCascadesForMany(collElement,
+ getCascades(hbReference.getHbCascade(), otm.getCascade()));
+
+ addElementElement(collElement, paEFeature, getColumns(paEFeature),
+ otm.getTargetEntity());
+
+ addAccessor(collElement);
+
+ mapFilter(collElement,
+ ((HbAnnotatedETypeElement) paEFeature).getFilter());
+ }
+}
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbEntityDataStore.java b/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbEntityDataStore.java
index ec6d3c53c..2c2816969 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbEntityDataStore.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/HbEntityDataStore.java
@@ -238,6 +238,8 @@ public class HbEntityDataStore extends HbDataStore implements
}
}
+ System.err.println(getMappingXML());
+
// TODO replace this
final StringBufferInputStream is = new StringBufferInputStream(
getMappingXML());
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_e_o_hibernate.hbm.xml
index 160d3f1d1..65113d33c 100644
--- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_e_o_hibernate.hbm.xml
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_e_o_hibernate.hbm.xml
@@ -51,6 +51,22 @@
<param name="edatatype">myDoubleType</param>
</type>
</property>
+ <property name="certificate" insert="true" update="true" not-null="false" unique="false">
+ <column not-null="false" unique="false" name="`CERT_NAME`"/>
+ <column not-null="false" unique="false" name="`CERT_LENGTH`"/>
+ <type name="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CertificateType"/>
+ </property>
+ <list name="certificates" lazy="true" cascade="persist,merge,refresh,save-update,lock">
+ <key update="true">
+ <column name="`PERSON_CERTIFICATES_E_ID`" unique="false"/>
+ </key>
+ <list-index column="`PERSON_CERTIFICATES_IDX`"/>
+ <element not-null="false" unique="false">
+ <column not-null="false" unique="false" name="`CERT_NAME`"/>
+ <column not-null="false" unique="false" name="`CERT_LENGTH`"/>
+ <type name="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CertificateType"/>
+ </element>
+ </list>
</class>
<class name="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" table="`ADDRESS`">
<meta attribute="eclassName" inherit="false">Address</meta>
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_h_o_hibernate.hbm.xml
index c26769951..453ee4431 100644
--- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_h_o_hibernate.hbm.xml
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.hibernate.test.emf.annotations/UserTypeAction_hsqldb_h_o_hibernate.hbm.xml
@@ -54,6 +54,22 @@
<param name="edatatype">myDoubleType</param>
</type>
</property>
+ <property name="certificate" insert="true" update="true" not-null="false" unique="false">
+ <column not-null="false" unique="false" name="`CERT_NAME`"/>
+ <column not-null="false" unique="false" name="`CERT_LENGTH`"/>
+ <type name="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CertificateType"/>
+ </property>
+ <list name="certificates" lazy="true" cascade="persist,merge,refresh,save-update,lock">
+ <key update="true">
+ <column name="`PERSON_CERTIFICATES_E_ID`" unique="false"/>
+ </key>
+ <list-index column="`PERSON_CERTIFICATES_IDX`"/>
+ <element not-null="false" unique="false">
+ <column not-null="false" unique="false" name="`CERT_NAME`"/>
+ <column not-null="false" unique="false" name="`CERT_LENGTH`"/>
+ <type name="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CertificateType"/>
+ </element>
+ </list>
</class>
<class name="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.AddressImpl" entity-name="Address" abstract="false" lazy="false" discriminator-value="Address" table="`ADDRESS`">
<meta attribute="eclassName" inherit="false">Address</meta>
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_e_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_e_o_hibernate.hbm.xml
index c95f0dfef..32ae4653c 100644
--- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_e_o_hibernate.hbm.xml
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_e_o_hibernate.hbm.xml
@@ -17,7 +17,7 @@
<column name="`TESTELEMENT_TESTMAP_E_ID`" unique="false"/>
</key>
<map-key type="java.lang.String"/>
- <element type="text" not-null="false" unique="false">
+ <element not-null="false" unique="false" type="text">
<column not-null="false" unique="false" name="`VALUE`" length="1000000"/>
</element>
</map>
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_h_o_hibernate.hbm.xml b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_h_o_hibernate.hbm.xml
index 4400aefd2..b651561b5 100644
--- a/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_h_o_hibernate.hbm.xml
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/hbm/org.eclipse.emf.teneo.test.issues/LargeMapValueAction_hsqldb_h_o_hibernate.hbm.xml
@@ -20,7 +20,7 @@
<column name="`TESTELEMENT_TESTMAP_E_ID`" unique="false"/>
</key>
<map-key type="java.lang.String"/>
- <element type="text" not-null="false" unique="false">
+ <element not-null="false" unique="false" type="text">
<column not-null="false" unique="false" name="`VALUE`" length="1000000"/>
</element>
</map>
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/annotations/AllTests.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/annotations/AllTests.java
index 7b41f96f0..0df402e16 100755
--- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/annotations/AllTests.java
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/annotations/AllTests.java
@@ -61,6 +61,7 @@ public class AllTests {
TestSuite suite = new MultiCfgTestSuite(
"Test for org.eclipse.emf.teneo.hibernate.test.emf.annotations",
HibernateTestbed.instance().getConfigurations());
+ suite.addTestSuite(UserTypeAction.class);
suite.addTestSuite(ExternalAction.class);
suite.addTestSuite(UniqueConstraintsAction.class);
suite.addTestSuite(HbCascadeAction.class);
@@ -78,7 +79,6 @@ public class AllTests {
suite.addTestSuite(BZ290969Action.class);
suite.addTestSuite(HibernateAction.class);
suite.addTestSuite(IdTypeTestOneAction.class);
- suite.addTestSuite(UserTypeAction.class);
suite.addTestSuite(JoinColumnsTest.class);
suite.addTestSuite(LobAction.class);
suite.addTestSuite(VariousAction.class);
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/annotations/UserTypeAction.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/annotations/UserTypeAction.java
index ed86cb55c..08e135543 100755
--- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/annotations/UserTypeAction.java
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/annotations/UserTypeAction.java
@@ -23,6 +23,7 @@ import java.util.Properties;
import org.eclipse.emf.teneo.PersistenceOptions;
import org.eclipse.emf.teneo.hibernate.test.stores.HibernateTestStore;
import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Address;
+import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate;
import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.City;
import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CitySize;
import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Name;
@@ -63,7 +64,7 @@ public class UserTypeAction extends AbstractTestAction {
testPerson(store);
testDatabase(store);
removePerson(store);
-
+
{
final City c = UsertypeFactory.eINSTANCE.createCity();
assertTrue(c.getSize() != null);
@@ -94,8 +95,25 @@ public class UserTypeAction extends AbstractTestAction {
}
private void storePerson(TestStore store) {
+
+
+ Certificate c1 = UsertypeFactory.eINSTANCE.createCertificate();
+ c1.setName("c1");
+ c1.setLength(1);
+ Certificate c2 = UsertypeFactory.eINSTANCE.createCertificate();
+ c2.setName("c2");
+ c2.setLength(2);
+ Certificate c3 = UsertypeFactory.eINSTANCE.createCertificate();
+ c3.setName("c3");
+ c3.setLength(3);
+
store.beginTransaction();
Person person = UsertypeFactory.eINSTANCE.createPerson();
+
+ person.setCertificate(c1);
+ person.getCertificates().add(c3);
+ person.getCertificates().add(c2);
+
person.setName(NAME);
person.setDouble(new Double(5));
UsaPhoneNumber up1 = new UsaPhoneNumber(100, 200, 300);
@@ -134,6 +152,12 @@ public class UserTypeAction extends AbstractTestAction {
assertEquals(2, person.getAddresses().size());
+ assertEquals("c1", person.getCertificate().getName());
+ assertEquals("c3", ((Certificate)person.getCertificates().get(0)).getName());
+ assertEquals(3, ((Certificate)person.getCertificates().get(0)).getLength());
+ assertEquals("c2", ((Certificate)person.getCertificates().get(1)).getName());
+ assertEquals(2, ((Certificate)person.getCertificates().get(1)).getLength());
+
store.commitTransaction();
final Query q1 = ((HibernateTestStore) store).getSession().getNamedQuery("getPersonByBirthPlace");
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/Certificate.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/Certificate.java
new file mode 100644
index 000000000..07019e375
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/Certificate.java
@@ -0,0 +1,83 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.emf.teneo.samples.emf.hibernate.usertype;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Certificate</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate#getLength <em>Length</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.UsertypePackage#getCertificate()
+ * @model annotation="teneo.jpa appinfo='@Type(type=\"org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CertificateType\")\n\t\t\t\t\t'"
+ * @generated
+ */
+public interface Certificate extends EObject {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.UsertypePackage#getCertificate_Name()
+ * @model unique="false" required="true"
+ * extendedMetaData="kind='element' name='name'"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Length</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Length</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Length</em>' attribute.
+ * @see #setLength(int)
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.UsertypePackage#getCertificate_Length()
+ * @model unique="false" required="true"
+ * extendedMetaData="kind='element' name='name'"
+ * @generated
+ */
+ int getLength();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate#getLength <em>Length</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Length</em>' attribute.
+ * @see #getLength()
+ * @generated
+ */
+ void setLength(int value);
+
+} // Certificate
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/CertificateType.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/CertificateType.java
new file mode 100644
index 000000000..10bd8e525
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/CertificateType.java
@@ -0,0 +1,78 @@
+package org.eclipse.emf.teneo.samples.emf.hibernate.usertype;
+
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Types;
+
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.hibernate.Hibernate;
+import org.hibernate.HibernateException;
+import org.hibernate.usertype.UserType;
+
+/**
+ * Trivial example implementation of a user type for an ereference.
+ */
+public class CertificateType implements UserType {
+
+ private static final int[] SQL_TYPES = new int[] { Types.VARCHAR, Types.INTEGER };
+
+ public Object assemble(Serializable cached, Object owner) throws HibernateException {
+ return deepCopy(cached);
+ }
+
+ public Object deepCopy(Object value) throws HibernateException {
+ Certificate certificate = (Certificate) value;
+ return EcoreUtil.copy(certificate);
+ }
+
+ public Serializable disassemble(Object value) throws HibernateException {
+ return (Serializable) deepCopy(value);
+ }
+
+ public boolean equals(Object x, Object y) throws HibernateException {
+ if (x == y) {
+ return true;
+ } else if (x == null || y == null) {
+ return false;
+ }
+ return x.equals(y);
+ }
+
+ public int hashCode(Object x) throws HibernateException {
+ return x.hashCode();
+ }
+
+ public boolean isMutable() {
+ return true;
+ }
+
+ public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
+ String name = (String) Hibernate.STRING.nullSafeGet(rs, names[0]);
+ Integer length = Hibernate.INTEGER.nullSafeGet(rs, names[1]);
+ final Certificate certificate = UsertypeFactory.eINSTANCE.createCertificate();
+ certificate.setLength(length.intValue());
+ certificate.setName(name);
+ return certificate;
+ }
+
+ public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
+ Certificate certificate = (Certificate) value;
+ Hibernate.STRING.nullSafeSet(st, certificate.getName(), index);
+ Hibernate.INTEGER.nullSafeSet(st, certificate.getLength(), index + 1);
+ }
+
+ public Object replace(Object original, Object target, Object owner) throws HibernateException {
+ return original;
+ }
+
+ public Class<?> returnedClass() {
+ return Certificate.class;
+ }
+
+ public int[] sqlTypes() {
+ return SQL_TYPES;
+ }
+
+}
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/Person.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/Person.java
index d9c8edc0b..13efa1080 100755
--- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/Person.java
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/Person.java
@@ -24,6 +24,8 @@ import org.eclipse.emf.ecore.EObject;
* <li>{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Person#getAddresses <em>Addresses</em>}</li>
* <li>{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Person#getBirthPlace <em>Birth Place</em>}</li>
* <li>{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Person#getDouble <em>Double</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Person#getCertificate <em>Certificate</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Person#getCertificates <em>Certificates</em>}</li>
* </ul>
* </p>
*
@@ -203,4 +205,47 @@ public interface Person extends EObject {
*/
void setDouble(Double value);
+ /**
+ * Returns the value of the '<em><b>Certificate</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Certificate</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Certificate</em>' reference.
+ * @see #setCertificate(Certificate)
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.UsertypePackage#getPerson_Certificate()
+ * @model annotation="teneo.jpa appinfo='@Columns({@Column(name=\"cert_name\"), @Column(name=\"cert_length\")})\n\t\t\t\t\t'"
+ * @generated
+ */
+ Certificate getCertificate();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Person#getCertificate <em>Certificate</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Certificate</em>' reference.
+ * @see #getCertificate()
+ * @generated
+ */
+ void setCertificate(Certificate value);
+
+ /**
+ * Returns the value of the '<em><b>Certificates</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Certificates</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Certificates</em>' reference list.
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.UsertypePackage#getPerson_Certificates()
+ * @model type="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate"
+ * annotation="teneo.jpa appinfo='@Columns({@Column(name=\"cert_name\"), @Column(name=\"cert_length\")})\n\t\t\t\t\t'"
+ * @generated
+ */
+ EList getCertificates();
+
} // Person \ No newline at end of file
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/UsertypeFactory.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/UsertypeFactory.java
index a979fcd33..fdec847bd 100755
--- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/UsertypeFactory.java
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/UsertypeFactory.java
@@ -53,6 +53,15 @@ public interface UsertypeFactory extends EFactory {
City createCity();
/**
+ * Returns a new object of class '<em>Certificate</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Certificate</em>'.
+ * @generated
+ */
+ Certificate createCertificate();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/UsertypePackage.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/UsertypePackage.java
index 6d3fe6b0f..c60c77849 100755
--- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/UsertypePackage.java
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/UsertypePackage.java
@@ -136,13 +136,31 @@ public interface UsertypePackage extends EPackage {
int PERSON__DOUBLE = 6;
/**
+ * The feature id for the '<em><b>Certificate</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PERSON__CERTIFICATE = 7;
+
+ /**
+ * The feature id for the '<em><b>Certificates</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PERSON__CERTIFICATES = 8;
+
+ /**
* The number of structural features of the '<em>Person</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int PERSON_FEATURE_COUNT = 7;
+ int PERSON_FEATURE_COUNT = 9;
/**
* The meta object id for the '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.AddressImpl <em>Address</em>}' class.
@@ -219,6 +237,43 @@ public interface UsertypePackage extends EPackage {
int CITY_FEATURE_COUNT = 2;
/**
+ * The meta object id for the '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.CertificateImpl <em>Certificate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.CertificateImpl
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.UsertypePackageImpl#getCertificate()
+ * @generated
+ */
+ int CERTIFICATE = 3;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CERTIFICATE__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Length</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CERTIFICATE__LENGTH = 1;
+
+ /**
+ * The number of structural features of the '<em>Certificate</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CERTIFICATE_FEATURE_COUNT = 2;
+
+ /**
* The meta object id for the '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CitySize <em>City Size</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -226,7 +281,7 @@ public interface UsertypePackage extends EPackage {
* @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.UsertypePackageImpl#getCitySize()
* @generated
*/
- int CITY_SIZE = 3;
+ int CITY_SIZE = 4;
/**
* The meta object id for the '<em>Name</em>' data type.
@@ -236,7 +291,7 @@ public interface UsertypePackage extends EPackage {
* @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.UsertypePackageImpl#getName_()
* @generated
*/
- int NAME = 4;
+ int NAME = 5;
/**
@@ -247,7 +302,7 @@ public interface UsertypePackage extends EPackage {
* @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.UsertypePackageImpl#getPhoneNumber()
* @generated
*/
- int PHONE_NUMBER = 5;
+ int PHONE_NUMBER = 6;
/**
@@ -257,7 +312,7 @@ public interface UsertypePackage extends EPackage {
* @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.UsertypePackageImpl#getIntArray()
* @generated
*/
- int INT_ARRAY = 6;
+ int INT_ARRAY = 7;
/**
@@ -268,7 +323,7 @@ public interface UsertypePackage extends EPackage {
* @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.UsertypePackageImpl#getmyDoubleType()
* @generated
*/
- int MY_DOUBLE_TYPE = 7;
+ int MY_DOUBLE_TYPE = 8;
/**
@@ -359,6 +414,28 @@ public interface UsertypePackage extends EPackage {
EAttribute getPerson_Double();
/**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Person#getCertificate <em>Certificate</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Certificate</em>'.
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Person#getCertificate()
+ * @see #getPerson()
+ * @generated
+ */
+ EReference getPerson_Certificate();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Person#getCertificates <em>Certificates</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Certificates</em>'.
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Person#getCertificates()
+ * @see #getPerson()
+ * @generated
+ */
+ EReference getPerson_Certificates();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Address <em>Address</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -423,6 +500,38 @@ public interface UsertypePackage extends EPackage {
EAttribute getCity_Size();
/**
+ * Returns the meta object for class '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate <em>Certificate</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Certificate</em>'.
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate
+ * @generated
+ */
+ EClass getCertificate();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate#getName()
+ * @see #getCertificate()
+ * @generated
+ */
+ EAttribute getCertificate_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate#getLength <em>Length</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Length</em>'.
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate#getLength()
+ * @see #getCertificate()
+ * @generated
+ */
+ EAttribute getCertificate_Length();
+
+ /**
* Returns the meta object for enum '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CitySize <em>City Size</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -570,6 +679,22 @@ public interface UsertypePackage extends EPackage {
EAttribute PERSON__DOUBLE = eINSTANCE.getPerson_Double();
/**
+ * The meta object literal for the '<em><b>Certificate</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PERSON__CERTIFICATE = eINSTANCE.getPerson_Certificate();
+
+ /**
+ * The meta object literal for the '<em><b>Certificates</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PERSON__CERTIFICATES = eINSTANCE.getPerson_Certificates();
+
+ /**
* The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.AddressImpl <em>Address</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -622,6 +747,32 @@ public interface UsertypePackage extends EPackage {
EAttribute CITY__SIZE = eINSTANCE.getCity_Size();
/**
+ * The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.CertificateImpl <em>Certificate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.CertificateImpl
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.UsertypePackageImpl#getCertificate()
+ * @generated
+ */
+ EClass CERTIFICATE = eINSTANCE.getCertificate();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CERTIFICATE__NAME = eINSTANCE.getCertificate_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Length</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CERTIFICATE__LENGTH = eINSTANCE.getCertificate_Length();
+
+ /**
* The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CitySize <em>City Size</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/CertificateImpl.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/CertificateImpl.java
new file mode 100644
index 000000000..4bfe9eaa5
--- /dev/null
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/CertificateImpl.java
@@ -0,0 +1,215 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate;
+import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.UsertypePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Certificate</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.CertificateImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.CertificateImpl#getLength <em>Length</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CertificateImpl extends EObjectImpl implements Certificate {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getLength() <em>Length</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLength()
+ * @generated
+ * @ordered
+ */
+ protected static final int LENGTH_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getLength() <em>Length</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLength()
+ * @generated
+ * @ordered
+ */
+ protected int length = LENGTH_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CertificateImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return UsertypePackage.Literals.CERTIFICATE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, UsertypePackage.CERTIFICATE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getLength() {
+ return length;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLength(int newLength) {
+ int oldLength = length;
+ length = newLength;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, UsertypePackage.CERTIFICATE__LENGTH, oldLength, length));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case UsertypePackage.CERTIFICATE__NAME:
+ return getName();
+ case UsertypePackage.CERTIFICATE__LENGTH:
+ return new Integer(getLength());
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case UsertypePackage.CERTIFICATE__NAME:
+ setName((String)newValue);
+ return;
+ case UsertypePackage.CERTIFICATE__LENGTH:
+ setLength(((Integer)newValue).intValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case UsertypePackage.CERTIFICATE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case UsertypePackage.CERTIFICATE__LENGTH:
+ setLength(LENGTH_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case UsertypePackage.CERTIFICATE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case UsertypePackage.CERTIFICATE__LENGTH:
+ return length != LENGTH_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(", length: ");
+ result.append(length);
+ result.append(')');
+ return result.toString();
+ }
+
+} //CertificateImpl
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/PersonImpl.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/PersonImpl.java
index 096c45843..a243e3300 100755
--- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/PersonImpl.java
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/PersonImpl.java
@@ -16,9 +16,11 @@ import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Address;
+import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate;
import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Name;
import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Person;
import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.UsaPhoneNumber;
@@ -39,6 +41,8 @@ import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.UsertypePackage;
* <li>{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.PersonImpl#getAddresses <em>Addresses</em>}</li>
* <li>{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.PersonImpl#getBirthPlace <em>Birth Place</em>}</li>
* <li>{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.PersonImpl#getDouble <em>Double</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.PersonImpl#getCertificate <em>Certificate</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.PersonImpl#getCertificates <em>Certificates</em>}</li>
* </ul>
* </p>
*
@@ -167,6 +171,26 @@ public class PersonImpl extends EObjectImpl implements Person {
protected Double double_ = DOUBLE_EDEFAULT;
/**
+ * The cached value of the '{@link #getCertificate() <em>Certificate</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCertificate()
+ * @generated
+ * @ordered
+ */
+ protected Certificate certificate;
+
+ /**
+ * The cached value of the '{@link #getCertificates() <em>Certificates</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCertificates()
+ * @generated
+ * @ordered
+ */
+ protected EList certificates;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -318,6 +342,56 @@ public class PersonImpl extends EObjectImpl implements Person {
* <!-- end-user-doc -->
* @generated
*/
+ public Certificate getCertificate() {
+ if (certificate != null && certificate.eIsProxy()) {
+ InternalEObject oldCertificate = (InternalEObject)certificate;
+ certificate = (Certificate)eResolveProxy(oldCertificate);
+ if (certificate != oldCertificate) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, UsertypePackage.PERSON__CERTIFICATE, oldCertificate, certificate));
+ }
+ }
+ return certificate;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Certificate basicGetCertificate() {
+ return certificate;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCertificate(Certificate newCertificate) {
+ Certificate oldCertificate = certificate;
+ certificate = newCertificate;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, UsertypePackage.PERSON__CERTIFICATE, oldCertificate, certificate));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList getCertificates() {
+ if (certificates == null) {
+ certificates = new EObjectResolvingEList(Certificate.class, this, UsertypePackage.PERSON__CERTIFICATES);
+ }
+ return certificates;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case UsertypePackage.PERSON__ADDRESSES:
@@ -360,6 +434,11 @@ public class PersonImpl extends EObjectImpl implements Person {
return getBirthPlace();
case UsertypePackage.PERSON__DOUBLE:
return getDouble();
+ case UsertypePackage.PERSON__CERTIFICATE:
+ if (resolve) return getCertificate();
+ return basicGetCertificate();
+ case UsertypePackage.PERSON__CERTIFICATES:
+ return getCertificates();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -394,6 +473,13 @@ public class PersonImpl extends EObjectImpl implements Person {
case UsertypePackage.PERSON__DOUBLE:
setDouble((Double)newValue);
return;
+ case UsertypePackage.PERSON__CERTIFICATE:
+ setCertificate((Certificate)newValue);
+ return;
+ case UsertypePackage.PERSON__CERTIFICATES:
+ getCertificates().clear();
+ getCertificates().addAll((Collection)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -426,6 +512,12 @@ public class PersonImpl extends EObjectImpl implements Person {
case UsertypePackage.PERSON__DOUBLE:
setDouble(DOUBLE_EDEFAULT);
return;
+ case UsertypePackage.PERSON__CERTIFICATE:
+ setCertificate((Certificate)null);
+ return;
+ case UsertypePackage.PERSON__CERTIFICATES:
+ getCertificates().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -451,6 +543,10 @@ public class PersonImpl extends EObjectImpl implements Person {
return BIRTH_PLACE_EDEFAULT == null ? birthPlace != null : !BIRTH_PLACE_EDEFAULT.equals(birthPlace);
case UsertypePackage.PERSON__DOUBLE:
return DOUBLE_EDEFAULT == null ? double_ != null : !DOUBLE_EDEFAULT.equals(double_);
+ case UsertypePackage.PERSON__CERTIFICATE:
+ return certificate != null;
+ case UsertypePackage.PERSON__CERTIFICATES:
+ return certificates != null && !certificates.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypeFactoryImpl.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypeFactoryImpl.java
index d9184422c..1a23e69f8 100755
--- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypeFactoryImpl.java
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypeFactoryImpl.java
@@ -68,6 +68,7 @@ public class UsertypeFactoryImpl extends EFactoryImpl implements UsertypeFactory
case UsertypePackage.PERSON: return createPerson();
case UsertypePackage.ADDRESS: return createAddress();
case UsertypePackage.CITY: return createCity();
+ case UsertypePackage.CERTIFICATE: return createCertificate();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -152,6 +153,16 @@ public class UsertypeFactoryImpl extends EFactoryImpl implements UsertypeFactory
* <!-- end-user-doc -->
* @generated
*/
+ public Certificate createCertificate() {
+ CertificateImpl certificate = new CertificateImpl();
+ return certificate;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public CitySize createCitySizeFromString(EDataType eDataType, String initialValue) {
CitySize result = CitySize.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypePackageImpl.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypePackageImpl.java
index 70f3edbb5..4e11f5181 100755
--- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypePackageImpl.java
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypePackageImpl.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Address;
+import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate;
import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.City;
import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CitySize;
import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Name;
@@ -55,6 +56,13 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage
* <!-- end-user-doc -->
* @generated
*/
+ private EClass certificateEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
private EEnum citySizeEEnum = null;
/**
@@ -223,6 +231,24 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage
* <!-- end-user-doc -->
* @generated
*/
+ public EReference getPerson_Certificate() {
+ return (EReference)personEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPerson_Certificates() {
+ return (EReference)personEClass.getEStructuralFeatures().get(8);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getAddress() {
return addressEClass;
}
@@ -277,6 +303,33 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage
* <!-- end-user-doc -->
* @generated
*/
+ public EClass getCertificate() {
+ return certificateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCertificate_Name() {
+ return (EAttribute)certificateEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCertificate_Length() {
+ return (EAttribute)certificateEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EEnum getCitySize() {
return citySizeEEnum;
}
@@ -353,6 +406,8 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage
createEReference(personEClass, PERSON__ADDRESSES);
createEAttribute(personEClass, PERSON__BIRTH_PLACE);
createEAttribute(personEClass, PERSON__DOUBLE);
+ createEReference(personEClass, PERSON__CERTIFICATE);
+ createEReference(personEClass, PERSON__CERTIFICATES);
addressEClass = createEClass(ADDRESS);
createEAttribute(addressEClass, ADDRESS__ADDRESS_INFO);
@@ -362,6 +417,10 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage
createEAttribute(cityEClass, CITY__ID);
createEAttribute(cityEClass, CITY__SIZE);
+ certificateEClass = createEClass(CERTIFICATE);
+ createEAttribute(certificateEClass, CERTIFICATE__NAME);
+ createEAttribute(certificateEClass, CERTIFICATE__LENGTH);
+
// Create enums
citySizeEEnum = createEEnum(CITY_SIZE);
@@ -406,6 +465,8 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage
initEReference(getPerson_Addresses(), this.getAddress(), this.getAddress_Person(), "addresses", null, 0, -1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getPerson_BirthPlace(), ecorePackage.getEString(), "birthPlace", null, 1, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getPerson_Double(), this.getmyDoubleType(), "double", "0", 1, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPerson_Certificate(), this.getCertificate(), null, "certificate", null, 0, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPerson_Certificates(), this.getCertificate(), null, "certificates", null, 0, -1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(addressEClass, Address.class, "Address", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getAddress_AddressInfo(), ecorePackage.getEString(), "addressInfo", null, 1, 1, Address.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -415,6 +476,10 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage
initEAttribute(getCity_Id(), ecorePackage.getELong(), "id", "0", 0, 1, City.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getCity_Size(), this.getCitySize(), "size", "MEDIUM", 0, 1, City.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(certificateEClass, Certificate.class, "Certificate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getCertificate_Name(), ecorePackage.getEString(), "name", null, 1, 1, Certificate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCertificate_Length(), ecorePackage.getEInt(), "length", null, 1, 1, Certificate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
// Initialize enums and add enum literals
initEEnum(citySizeEEnum, CitySize.class, "CitySize");
addEEnumLiteral(citySizeEEnum, CitySize.SMALL_LITERAL);
@@ -458,7 +523,7 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage
source,
new String[] {
"appinfo", "@NamedQuery(name=\"getPersonByBirthPlace\" query=\"select p from Person p where p.birthPlace=?\")\n@HbEntity(dynamicInsert=true, dynamicUpdate=true, mutable=true, selectBeforeUpdate=true, persister=\"org.hibernate.persister.entity.SingleTableEntityPersister\", optimisticLock=NONE, polymorphism=EXPLICIT)"
- });
+ });
}
/**
@@ -480,7 +545,19 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage
source,
new String[] {
"appinfo", "@OnDelete(action=OnDeleteAction.CASCADE)\n@OneToMany(indexed=false, unique=true)"
- });
+ });
+ addAnnotation
+ (getPerson_Certificate(),
+ source,
+ new String[] {
+ "appinfo", "@Columns({@Column(name=\"cert_name\"), @Column(name=\"cert_length\")})\n\t\t\t\t\t"
+ });
+ addAnnotation
+ (getPerson_Certificates(),
+ source,
+ new String[] {
+ "appinfo", "@Columns({@Column(name=\"cert_name\"), @Column(name=\"cert_length\")})\n\t\t\t\t\t"
+ });
addAnnotation
(intArrayEDataType,
source,
@@ -498,7 +575,13 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage
source,
new String[] {
"value", "@GeneratedValue(strategy=\"ASSIGNED\")"
- });
+ });
+ addAnnotation
+ (certificateEClass,
+ source,
+ new String[] {
+ "appinfo", "@Type(type=\"org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CertificateType\")\n\t\t\t\t\t"
+ });
}
/**
@@ -542,7 +625,7 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage
new String[] {
"kind", "element",
"name", "intArray"
- });
+ });
addAnnotation
(intArrayEDataType,
source,
@@ -568,7 +651,21 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage
source,
new String[] {
"name", "IntArray"
+ });
+ addAnnotation
+ (getCertificate_Name(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "name"
});
+ addAnnotation
+ (getCertificate_Length(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "name"
+ });
}
} //UsertypePackageImpl
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/model/UserType.genmodel b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/model/UserType.genmodel
index 3ee6fb71d..6a5844c1f 100755
--- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/model/UserType.genmodel
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/model/UserType.genmodel
@@ -23,6 +23,8 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference usertype.ecore#//Person/addresses"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute usertype.ecore#//Person/birthPlace"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute usertype.ecore#//Person/double"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference usertype.ecore#//Person/certificate"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference usertype.ecore#//Person/certificates"/>
</genClasses>
<genClasses ecoreClass="usertype.ecore#//Address">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute usertype.ecore#//Address/addressInfo"/>
@@ -32,5 +34,9 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute usertype.ecore#//City/id"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute usertype.ecore#//City/size"/>
</genClasses>
+ <genClasses ecoreClass="usertype.ecore#//Certificate">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute usertype.ecore#//Certificate/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute usertype.ecore#//Certificate/length"/>
+ </genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/model/usertype.ecore b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/model/usertype.ecore
index 3447dbd31..bc98e838c 100755
--- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/model/usertype.ecore
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/model/usertype.ecore
@@ -55,6 +55,17 @@
<details key="name" value="intArray"/>
</eAnnotations>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="certificate" eType="#//Certificate">
+ <eAnnotations source="teneo.jpa">
+ <details key="appinfo" value="@Columns({@Column(name=&quot;cert_name&quot;), @Column(name=&quot;cert_length&quot;)})&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="certificates" upperBound="-1"
+ eType="#//Certificate">
+ <eAnnotations source="teneo.jpa">
+ <details key="appinfo" value="@Columns({@Column(name=&quot;cert_name&quot;), @Column(name=&quot;cert_length&quot;)})&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EDataType" name="PhoneNumber" instanceClassName="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.UsaPhoneNumber"/>
<eClassifiers xsi:type="ecore:EDataType" name="IntArray" instanceClassName="int[]">
@@ -103,4 +114,23 @@
<eLiterals name="MEDIUM" value="1"/>
<eLiterals name="LARGE" value="2"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Certificate">
+ <eAnnotations source="teneo.jpa">
+ <details key="appinfo" value="@Type(type=&quot;org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CertificateType&quot;)&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="name"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="length" unique="false"
+ lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="name"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeAdapterFactory.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeAdapterFactory.java
index 25d16ab75..6d752d50a 100755
--- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeAdapterFactory.java
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeAdapterFactory.java
@@ -80,6 +80,9 @@ public class UsertypeAdapterFactory extends AdapterFactoryImpl {
public Object caseCity(City object) {
return createCityAdapter();
}
+ public Object caseCertificate(Certificate object) {
+ return createCertificateAdapter();
+ }
public Object defaultCase(EObject object) {
return createEObjectAdapter();
}
@@ -141,6 +144,20 @@ public class UsertypeAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate <em>Certificate</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate
+ * @generated
+ */
+ public Adapter createCertificateAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeSwitch.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeSwitch.java
index 63ab25666..dc29ed3dd 100755
--- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeSwitch.java
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeSwitch.java
@@ -108,6 +108,12 @@ public class UsertypeSwitch {
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case UsertypePackage.CERTIFICATE: {
+ Certificate certificate = (Certificate)theEObject;
+ Object result = caseCertificate(certificate);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
default: return defaultCase(theEObject);
}
}
@@ -158,6 +164,21 @@ public class UsertypeSwitch {
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Certificate</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Certificate</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseCertificate(Certificate object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;

Back to the top