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