1cf55ecac46b747982d96ffd2a3b988e18838eac
[mir.git] / source / mir / core / model / Media.hbm.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE hibernate-mapping PUBLIC
3     "-//Hibernate/Hibernate Mapping DTD//EN"
4     "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
5     
6 <hibernate-mapping>
7
8 <!-- 
9     Created by Middlegen Hibernate plugin
10
11     http://boss.bekk.no/boss/middlegen/
12     http://hibernate.sourceforge.net/
13 -->
14
15 <class 
16     name="mir.core.model.Media" 
17     table="media"
18     proxy="mir.core.model.IMedia"
19 >
20     <id
21         name="id"
22         type="int"
23         column="id"
24     >
25         <generator class="sequence"/>
26     </id>
27     <property
28         name="title"
29         type="java.lang.String"
30         column="title"
31         not-null="true"
32         length="80"
33     />
34     <property
35         name="subtitle"
36         type="java.lang.String"
37         column="subtitle"
38         length="30"
39     />
40     <property
41         name="edittitle"
42         type="java.lang.String"
43         column="edittitle"
44         length="30"
45     />
46     <property
47         name="date"
48         type="java.lang.String"
49         column="date"
50         not-null="true"
51         length="8"
52     />
53     <property
54         name="creator"
55         type="java.lang.String"
56         column="creator"
57         length="80"
58     />
59     <property
60         name="creatorMainUrl"
61         type="java.lang.String"
62         column="creator_main_url"
63         length="255"
64     />
65     <property
66         name="creatorEmail"
67         type="java.lang.String"
68         column="creator_email"
69         length="80"
70     />
71     <property
72         name="creatorAddress"
73         type="java.lang.String"
74         column="creator_address"
75         length="80"
76     />
77     <property
78         name="creatorPhone"
79         type="java.lang.String"
80         column="creator_phone"
81         length="20"
82     />
83     <property
84         name="description"
85         type="java.lang.String"
86         column="description"
87         length="-1"
88     />
89     <property
90         name="keywords"
91         type="java.lang.String"
92         column="keywords"
93         length="-1"
94     />
95     <property
96         name="comment"
97         type="java.lang.String"
98         column="comment"
99         length="-1"
100     />
101     <property
102         name="source"
103         type="java.lang.String"
104         column="source"
105         length="255"
106     />
107     <property
108         name="publishDate"
109         type="java.sql.Timestamp"
110         column="publish_date"
111         length="8"
112     />
113     <property
114         name="publishServer"
115         type="java.lang.String"
116         column="publish_server"
117         length="255"
118     />
119     <property
120         name="publishPath"
121         type="java.lang.String"
122         column="publish_path"
123         length="255"
124     />
125     <property
126         name="published"
127         type="boolean"
128         column="is_published"
129         not-null="true"
130         length="1"
131     />
132     <property
133         name="produced"
134         type="boolean"
135         column="is_produced"
136         not-null="true"
137         length="1"
138     />
139     <property
140         name="webdbCreate"
141         type="java.sql.Timestamp"
142         column="webdb_create"
143         not-null="true"
144         length="8"
145     />
146     <property
147         name="webdbLastchange"
148         type="java.sql.Timestamp"
149         column="webdb_lastchange"
150         length="8"
151     />
152     <!-- associations -->
153     <many-to-one
154         name="feature"
155         class="mir.core.model.Feature"
156         column="to_feature"
157     />
158     <many-to-one
159         name="publisher"
160         class="mir.core.model.MirUser"
161         column="to_publisher"
162     />
163     <many-to-one
164         name="language"
165         class="mir.core.model.Language"
166         column="to_language"
167     />
168     <many-to-one
169         name="rights"
170         class="mir.core.model.Rights"
171         column="to_rights"
172     /> 
173     
174     <set name="content" table="content_x_media" lazy="true">
175             <key column="media_id"/>
176             <many-to-many column="content_id" class="mir.core.model.Content"/>
177         </set>
178     
179 </class>
180 </hibernate-mapping>