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