Salome HOME
c40077d34473e61ff514a1bca6152e90c29c9304
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / som / Relations.hbm.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
3 <!--
4   - Mapping of the Relation class hierarchy.
5   - The entire hierarchy is mapped to one single table using a String discriminator.
6   -
7   - @author    Daniel Brunier-Coulin
8   - @copyright OPEN CASCADE 2012-2014
9   -->
10
11 <hibernate-mapping>
12
13 <!-- Uses relation: Document to Document
14   -->
15     <union-subclass name="org.splat.dal.bo.som.UsesRelation" extends="org.splat.dal.bo.kernel.Relation" table="uses_rel">
16                 <many-to-one cascade="merge,evict" name="refer" column="refer" access="field" not-null="true" />
17     </union-subclass>
18
19 <!-- UsedBy relation: Document to Document
20   -->
21     <union-subclass name="org.splat.dal.bo.som.UsedByRelation" extends="org.splat.dal.bo.kernel.Relation" table="usedby_rel">
22                 <many-to-one cascade="merge,evict" name="refer" column="refer" access="field" not-null="true" />
23     </union-subclass>
24
25 <!-- Versions relation: Document to Document
26   -->
27     <union-subclass name="org.splat.dal.bo.som.VersionsRelation" extends="org.splat.dal.bo.kernel.Relation" table="versions_rel">
28         <many-to-one cascade="merge,evict" name="refer" column="refer" access="field" not-null="true" />
29     </union-subclass>
30
31 <!-- Converts relation: Document to File
32   -->
33     <union-subclass name="org.splat.dal.bo.som.ConvertsRelation" extends="org.splat.dal.bo.kernel.Relation" table="converts_rel">
34         <many-to-one cascade="all-delete-orphan" name="refer" unique="true" column="refer" access="field" not-null="true" />
35     </union-subclass>
36
37 <!-- Contributor actor relation: Study to User
38   -->
39     <union-subclass name="org.splat.dal.bo.som.ContributorRelation" extends="org.splat.dal.bo.kernel.Relation" table="contributor_rel">
40         <many-to-one name="refer" column="refer" access="field" not-null="true" />
41 <!--         <many-to-one cascade="all-delete-orphan" unique="true" name="refer" column="refer" access="field" not-null="true" />
42  -->
43     </union-subclass>
44     
45 <!-- Reader relation: Study to User
46   -->
47     <union-subclass name="org.splat.dal.bo.som.ReaderRelation" extends="org.splat.dal.bo.kernel.Relation" table="reader_rel">
48         <many-to-one name="refer" column="refer" access="field" not-null="true" />
49     </union-subclass>
50
51 <!-- ValidationCycle relation: Study to ValidationCycle
52   -->
53     <union-subclass name="org.splat.dal.bo.som.ValidationCycleRelation" extends="org.splat.dal.bo.kernel.Relation" table="cycle_rel">
54         <many-to-one name="refer" column="refer" unique="true" cascade="all-delete-orphan" access="field" not-null="true" />
55                 <!-- <many-to-one name="refer" column="refer" unique="true" access="field" not-null="true" />-->
56     </union-subclass>
57
58 <!-- Stamp relation: Document to Timestamp
59   -->
60     <union-subclass name="org.splat.dal.bo.som.StampRelation" extends="org.splat.dal.bo.kernel.Relation" table="stamp_rel">
61         <many-to-one name="refer" column="refer" unique="true" cascade="all-delete-orphan" access="field" not-null="true" />
62                 <!-- <many-to-one cascade="merge" name="refer" column="refer" unique="true" access="field" not-null="true" />-->
63     </union-subclass>
64
65 </hibernate-mapping>