0ce3d19807a4009239ac0a3f07768f1879608bde
[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     </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     <!-- associations -->
152     <many-to-one
153         name="mediaType"
154         class="mir.core.model.MediaType"
155         column="to_media_type"
156     />    
157     <many-to-one
158         name="mediaFolder"
159         class="mir.core.model.MediaFolder"
160         column="to_media_folder"
161     />
162     <many-to-one
163         name="feature"
164         class="mir.core.model.Feature"
165         column="to_feature"
166     />
167     <many-to-one
168         name="publisher"
169         class="mir.core.model.MirUser"
170         column="to_publisher"
171     />
172     <many-to-one
173         name="language"
174         class="mir.core.model.Language"
175         column="to_language"
176     />
177     <many-to-one
178         name="rights"
179         class="mir.core.model.Rights"
180         column="to_rights"
181     /> 
182         <property
183         name="iconIsProduced"
184         type="boolean"
185         column="icon_is_produced"
186         not-null="true"
187         length="1"
188     />
189     <property
190         name="iconPath"
191         type="java.lang.String"
192         column="icon_path"
193         length="255"
194     />
195     <property
196         name="size"
197         type="int"
198         column="size"
199         length="4"
200     />
201     
202     <set name="content" table="content_x_media" lazy="true">
203             <key column="media_id"/>
204             <many-to-many column="content_id" class="mir.core.model.Content"/>
205         </set>
206     
207 </class>
208 </hibernate-mapping>