Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/model')
-rw-r--r--tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/model/UserType.genmodel11
-rw-r--r--tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/model/usertype.ecore30
2 files changed, 41 insertions, 0 deletions
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 75abee14f..3ee6fb71d 100644
--- 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
@@ -6,9 +6,15 @@
<foreignModel>usertype.ecore</foreignModel>
<genPackages prefix="Usertype" basePackage="org.eclipse.emf.teneo.samples.emf.hibernate"
resource="XML" disposableProviderFactory="true" ecorePackage="usertype.ecore#/">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="usertype.ecore#//CitySize">
+ <genEnumLiterals ecoreEnumLiteral="usertype.ecore#//CitySize/SMALL"/>
+ <genEnumLiterals ecoreEnumLiteral="usertype.ecore#//CitySize/MEDIUM"/>
+ <genEnumLiterals ecoreEnumLiteral="usertype.ecore#//CitySize/LARGE"/>
+ </genEnums>
<genDataTypes ecoreDataType="usertype.ecore#//Name"/>
<genDataTypes ecoreDataType="usertype.ecore#//PhoneNumber"/>
<genDataTypes ecoreDataType="usertype.ecore#//IntArray"/>
+ <genDataTypes ecoreDataType="usertype.ecore#//myDoubleType"/>
<genClasses ecoreClass="usertype.ecore#//Person">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute usertype.ecore#//Person/name"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute usertype.ecore#//Person/numbers"/>
@@ -16,10 +22,15 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute usertype.ecore#//Person/emergencyContact"/>
<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"/>
</genClasses>
<genClasses ecoreClass="usertype.ecore#//Address">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute usertype.ecore#//Address/addressInfo"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference usertype.ecore#//Address/person"/>
</genClasses>
+ <genClasses ecoreClass="usertype.ecore#//City">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute usertype.ecore#//City/id"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute usertype.ecore#//City/size"/>
+ </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 1daf1010b..f942b141b 100644
--- 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
@@ -48,6 +48,13 @@
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="birthPlace" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="double" unique="false"
+ lowerBound="1" eType="#//myDoubleType" defaultValueLiteral="0">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="intArray"/>
+ </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[]">
@@ -73,4 +80,27 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="person" eType="#//Person"
eOpposite="#//Person/addresses"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="myDoubleType" instanceClassName="java.lang.Double">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="IntArray"/>
+ </eAnnotations>
+ <eAnnotations source="teneo.jpa">
+ <details key="appinfo" value="&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;@Type(type=&quot;org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType&quot;, parameters={@Parameter(name=&quot;epackage&quot; value=&quot;http://www.elver.org/samples/emf/hibernate/usertype&quot;), @Parameter(name=&quot;edatatype&quot;, value=&quot;myDoubleType&quot;)})&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;"/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="City">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"
+ defaultValueLiteral="0" iD="true">
+ <eAnnotations source="teneo.jpa">
+ <details key="value" value="@GeneratedValue(strategy=&quot;ASSIGNED&quot;)"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="size" eType="#//CitySize"
+ defaultValueLiteral="MEDIUM" unsettable="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="CitySize">
+ <eLiterals name="SMALL"/>
+ <eLiterals name="MEDIUM" value="1"/>
+ <eLiterals name="LARGE" value="2"/>
+ </eClassifiers>
</ecore:EPackage>

Back to the top