let us start using struts.\rand some fixes in the new persistence layer.
[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     </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
153     <property
154         name="iconIsProduced"
155         type="boolean"
156         column="icon_is_produced"
157         not-null="true"
158         length="1"
159     />
160     
161     <property
162         name="iconPath"
163         type="java.lang.String"
164         column="icon_path"
165         length="255"
166     />
167     <property
168         name="imageData"
169         type="int"
170         column="image_data"
171         length="4"
172     />
173     <property
174         name="iconData"
175         type="int"
176         column="icon_data"
177         length="4"
178     />
179     <property
180         name="year"
181         type="java.lang.String"
182         column="year"
183         length="40"
184     />
185     <property
186         name="imgWidth"
187         type="short"
188         column="img_width"
189         length="2"
190     />
191     <property
192         name="imgHeight"
193         type="short"
194         column="img_height"
195         length="2"
196     />
197     <property
198         name="iconWidth"
199         type="short"
200         column="icon_width"
201         length="2"
202     />
203     <property
204         name="iconHeight"
205         type="short"
206         column="icon_height"
207         length="2"
208     />              
209
210     <!-- associations -->
211     <many-to-one
212         name="mediaType"
213         class="mir.core.model.MediaType"
214         column="to_media_type"
215     />    
216     <many-to-one
217         name="mediaFolder"
218         class="mir.core.model.MediaFolder"
219         column="to_media_folder"
220     />
221     <many-to-one
222         name="feature"
223         class="mir.core.model.Feature"
224         column="to_feature"
225     />
226     <many-to-one
227         name="publisher"
228         class="mir.core.model.MirUser"
229         column="to_publisher"
230     />
231     <many-to-one
232         name="language"
233         class="mir.core.model.Language"
234         column="to_language"
235     />
236     <many-to-one
237         name="rights"
238         class="mir.core.model.Rights"
239         column="to_rights"
240     />    
241     <set name="content" table="content_x_media" lazy="true">
242             <key column="media_id"/>
243             <many-to-many column="content_id" class="mir.core.model.Content"/>
244         </set>?
245 </class>
246 </hibernate-mapping>