Salome HOME
Update copyrights 2014.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / som / Document.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 Document class and its type information implemented by the DocumentType class.
5   -
6   - @author    Daniel Brunier-Coulin
7   - @copyright OPEN CASCADE 2012-2014
8   -->
9
10 <hibernate-mapping>
11
12 <!--   <class name="org.splat.dal.bo.som.Document" table="document" lazy="false"> -->
13         <union-subclass name="org.splat.dal.bo.som.Document" extends="org.splat.dal.bo.kernel.Entity" table="document" lazy="false">
14   
15 <!-- Document properties
16   -
17   -      String        did       -->
18     <property name="did"       column="did"     access="field" not-null="true" />    
19     
20     <!-- DocumentType  type      -->    
21     <many-to-one name="type"   column="type"    access="field" not-null="true" />
22     
23     <!-- File          myfile    -->    
24     <many-to-one name="myfile" column="myfile" unique="true" cascade="all-delete-orphan" access="field" not-null="true" />
25     
26     <!-- String        name      -->    
27     <property name="name"      column="name"    access="field" not-null="true" />
28   
29     <!-- ProgressState state     -->
30     <property name="state"     column="state" type="ProgressState" access="field" not-null="true" />    
31     
32     <!-- int           step      -->    
33     <property name="step"      column="step"    access="field" not-null="true" />
34     
35     <!-- String        version   -->    
36     <property name="version"   column="version" access="field" />
37     
38     <!-- int           countag   -->    
39     <property name="countag"   column="countag" access="field" not-null="true" />
40     
41     <!-- int           history   -->    
42     <property name="history"   column="history" access="field" not-null="true" />
43   
44     <!-- User          author    -->    
45     <many-to-one name="author" column="author" access="field" not-null="true" />
46     
47     <!-- Date          lasdate   -->    
48     <property name="lasdate"   column="lasdate" access="field" not-null="true" />
49   </union-subclass>
50
51 <!-- Class DocumentType 
52   -->
53   <class name="org.splat.dal.bo.som.DocumentType" table="doctype" lazy="false">
54     <id name="rid" column="rid" access="field">
55       <generator class="increment"/>
56     </id>
57     <property name="name"   column="name"    access="field" not-null="true" />
58     <property name="state"  column="state" type="ProgressState" access="field" not-null="true" />    
59     <property name="step"   column="step"    access="field" not-null="true" />
60     <property name="result" column="result"  access="field" />
61     <set name="uses" table="docuse" lazy="false" access="field">
62       <key          column="owner" />
63       <many-to-many column="rid" class="org.splat.dal.bo.som.DocumentType" />
64     </set>
65   </class>
66   
67 </hibernate-mapping>