fa9bb3c14b02ffc1405a23f5522cc5ba70c0f623
[mir.git] / source / mir / core / model / Media.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.Media" 
17     table="media"
18     proxy="mir.core.model.IMedia"
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     <!-- associations -->
155     <many-to-one
156         name="feature"
157         class="mir.core.model.Feature"
158         column="to_feature"
159     />
160     <many-to-one
161         name="publisher"
162         class="mir.core.model.MirUser"
163         column="to_publisher"
164     />
165     <many-to-one
166         name="language"
167         class="mir.core.model.Language"
168         column="to_language"
169     />
170     <many-to-one
171         name="rights"
172         class="mir.core.model.Rights"
173         column="to_rights"
174     /> 
175     
176     <set name="content" table="content_x_media" lazy="true">
177             <key column="media_id"/>
178             <many-to-many column="content_id" class="mir.core.model.Content"/>
179         </set>
180     
181 </class>
182 </hibernate-mapping>