Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: c26769951832bea5c4ff6d4a2c76673f8808fdb4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping auto-import="false">
	<typedef name="nameType" class="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.NameType"/>
	<typedef name="usertype.PhoneNumber" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType">
		<param name="epackage">http://www.elver.org/samples/emf/hibernate/usertype</param>
		<param name="edatatype">PhoneNumber</param>
	</typedef>
	<typedef name="intArrayType" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType">
		<param name="epackage">http://www.elver.org/samples/emf/hibernate/usertype</param>
		<param name="edatatype">IntArray</param>
	</typedef>
	<class name="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.PersonImpl" entity-name="Person" abstract="false" lazy="false" polymorphism="explicit" optimistic-lock="none" dynamic-insert="true" dynamic-update="true" select-before-update="true" persister="org.hibernate.persister.entity.SingleTableEntityPersister" discriminator-value="Person" table="`PERSON`">
		<meta attribute="eclassName" inherit="false">Person</meta>
		<meta attribute="epackage" inherit="false">http://www.elver.org/samples/emf/hibernate/usertype</meta>
		<id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler">
			<meta attribute="syntheticId" inherit="false">true</meta>
			<generator class="native"/>
		</id>
		<discriminator type="string">
			<column name="`DTYPE`" index="PERSONDTYPE" length="255" not-null="true"/>
		</discriminator>
		<property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="nameType">
			<column not-null="false" unique="false" name="`FIRST_NAME`"/>
			<column not-null="false" unique="false" name="`LAST_NAME`"/>
		</property>
		<property name="numbers" lazy="false" insert="true" update="true" not-null="true" unique="false" type="intArrayType">
			<column not-null="true" unique="false" name="`NUMBERS`"/>
		</property>
		<list name="phoneNumbers" table="`PERSON_PHONENUMBERS`" lazy="true" cascade="all,delete-orphan">
			<key update="true">
				<column name="`PERSON_PHONENUMBERS_E_ID`" unique="false"/>
			</key>
			<list-index column="`PERSON_PHONENUMBERS_IDX`"/>
			<element type="usertype.PhoneNumber"/>
		</list>
		<property name="emergencyContact" lazy="false" insert="true" update="true" not-null="false" unique="false" type="usertype.PhoneNumber">
			<column not-null="false" unique="false" name="`EMERGENCYCONTACT`"/>
		</property>
		<bag name="addresses" lazy="true" cascade="persist,merge,refresh,save-update,lock">
			<key update="true">
				<column name="`ADDRESS_PERSON_E_ID`" unique="false"/>
			</key>
			<one-to-many entity-name="Address"/>
		</bag>
		<property name="birthPlace" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String">
			<column not-null="true" unique="false" name="`BIRTHPLACE`"/>
		</property>
		<property name="double" lazy="false" insert="true" update="true" not-null="true" unique="false">
			<column not-null="true" unique="false" name="`DOUBLE`"/>
			<type name="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType">
				<param name="epackage">http://www.elver.org/samples/emf/hibernate/usertype</param>
				<param name="edatatype">myDoubleType</param>
			</type>
		</property>
	</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>
		<meta attribute="epackage" inherit="false">http://www.elver.org/samples/emf/hibernate/usertype</meta>
		<id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler">
			<meta attribute="syntheticId" inherit="false">true</meta>
			<generator class="native"/>
		</id>
		<discriminator type="string">
			<column name="`DTYPE`" index="ADDRESSDTYPE" length="255" not-null="true"/>
		</discriminator>
		<version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler">
			<meta attribute="syntheticVersion" inherit="false">true</meta>
		</version>
		<property name="addressInfo" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String">
			<column not-null="true" unique="false" name="`ADDRESSINFO`"/>
		</property>
		<many-to-one name="person" entity-name="Person" lazy="false" cascade="merge,persist,save-update,lock,refresh" foreign-key="ADDRESS_PERSON" insert="true" update="true" not-null="false">
			<column not-null="false" unique="false" name="`ADDRESS_PERSON_E_ID`"/>
		</many-to-one>
	</class>
	<class name="org.eclipse.emf.teneo.samples.emf.hibernate.usertype.impl.CityImpl" entity-name="City" abstract="false" lazy="false" discriminator-value="City" table="`CITY`">
		<meta attribute="eclassName" inherit="false">City</meta>
		<meta attribute="epackage" inherit="false">http://www.elver.org/samples/emf/hibernate/usertype</meta>
		<id name="id" type="long" unsaved-value="0">
			<column not-null="true" unique="false" name="`ID`"/>
			<generator class="assigned"/>
		</id>
		<discriminator type="string">
			<column name="`DTYPE`" index="CITYDTYPE" length="255" not-null="true"/>
		</discriminator>
		<version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler">
			<meta attribute="syntheticVersion" inherit="false">true</meta>
		</version>
		<property name="size" lazy="false" not-null="false" insert="true" update="true" unique="false">
			<column not-null="false" unique="false" name="`SIZE`"/>
			<type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType">
				<param name="enumClass">org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CitySize</param>
				<param name="eclassifier">CitySize</param>
				<param name="epackage">http://www.elver.org/samples/emf/hibernate/usertype</param>
			</type>
		</property>
	</class>
	<query name="getPersonByBirthPlace2"><![CDATA[select p from Person p where p.birthPlace=?]]></query>
	<query name="getPersonByBirthPlace"><![CDATA[select p from Person p where p.birthPlace=?]]></query>
</hibernate-mapping>

Back to the top