small bugfixes
[mir.git] / source / mir / core / model / OtherMedia.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.OtherMedia" 
17     table="other_media"
18 >
19     <id
20         name="id"
21         type="int"
22         column="id"
23     >
24         <generator class="sequence">
25                 <param name="sequence">media_id_seq</param> 
26         </generator> 
27     </id>
28     <property
29         name="title"
30         type="java.lang.String"
31         column="title"
32         not-null="true"
33         length="80"
34     />
35     <property
36         name="subtitle"
37         type="java.lang.String"
38         column="subtitle"
39         length="30"
40     />
41     <property
42         name="edittitle"
43         type="java.lang.String"
44         column="edittitle"
45         length="30"
46     />
47     <property
48         name="date"
49         type="java.lang.String"
50         column="date"
51         not-null="true"
52         length="8"
53     />
54     <property
55         name="creator"
56         type="java.lang.String"
57         column="creator"
58         length="80"
59     />
60     <property
61         name="creatorMainUrl"
62         type="java.lang.String"
63         column="creator_main_url"
64         length="255"
65     />
66     <property
67         name="creatorEmail"
68         type="java.lang.String"
69         column="creator_email"
70         length="80"
71     />
72     <property
73         name="creatorAddress"
74         type="java.lang.String"
75         column="creator_address"
76         length="80"
77     />
78     <property
79         name="creatorPhone"
80         type="java.lang.String"
81         column="creator_phone"
82         length="20"
83     />
84     <property
85         name="description"
86         type="java.lang.String"
87         column="description"
88         length="-1"
89     />
90     <property
91         name="keywords"
92         type="java.lang.String"
93         column="keywords"
94         length="-1"
95     />
96     <property
97         name="comment"
98         type="java.lang.String"
99         column="comment"
100         length="-1"
101     />
102     <property
103         name="source"
104         type="java.lang.String"
105         column="source"
106         length="255"
107     />
108     <property
109         name="publishDate"
110         type="java.sql.Timestamp"
111         column="publish_date"
112         length="8"
113     />
114     <property
115         name="publishServer"
116         type="java.lang.String"
117         column="publish_server"
118         length="255"
119     />
120     <property
121         name="publishPath"
122         type="java.lang.String"
123         column="publish_path"
124         length="255"
125     />
126     <property
127         name="published"
128         type="boolean"
129         column="is_published"
130         not-null="true"
131         length="1"
132     />
133     <property
134         name="produced"
135         type="boolean"
136         column="is_produced"
137         not-null="true"
138         length="1"
139     />
140     <property
141         name="webdbCreate"
142         type="java.sql.Timestamp"
143         column="webdb_create"
144         not-null="true"
145         length="8"
146     />
147     <property
148         name="webdbLastchange"
149         type="java.sql.Timestamp"
150         column="webdb_lastchange"
151         length="8"
152     />
153     <!-- associations -->
154     <many-to-one
155         name="mediaType"
156         class="mir.core.model.MediaType"
157         column="to_media_type"
158     />    
159     <many-to-one
160         name="mediaFolder"
161         class="mir.core.model.MediaFolder"
162         column="to_media_folder"
163     />
164     <many-to-one
165         name="feature"
166         class="mir.core.model.Feature"
167         column="to_feature"
168     />
169     <many-to-one
170         name="publisher"
171         class="mir.core.model.MirUser"
172         column="to_publisher"
173     />
174     <many-to-one
175         name="language"
176         class="mir.core.model.Language"
177         column="to_language"
178     />
179     <many-to-one
180         name="rights"
181         class="mir.core.model.Rights"
182         column="to_rights"
183     /> 
184         <property
185         name="iconIsProduced"
186         type="boolean"
187         column="icon_is_produced"
188         not-null="true"
189         length="1"
190     />
191     <property
192         name="iconPath"
193         type="java.lang.String"
194         column="icon_path"
195         length="255"
196     />
197     <property
198         name="size"
199         type="int"
200         column="size"
201         length="4"
202     />
203     
204     <set name="content" table="content_x_media" lazy="true">
205             <key column="media_id"/>
206             <many-to-many column="content_id" class="mir.core.model.Content"/>
207         </set>
208     
209 </class>
210 </hibernate-mapping>