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