Rev 1521 | Rev 1547 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | fvelez | 1 | <?xml version="1.0"?> |
2 | <!DOCTYPE hibernate-mapping |
||
3 | PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" |
||
4 | "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> |
||
5 | |||
6 | <hibernate-mapping> |
||
7 | <class name="pt.estgp.estgweb.domain.Course" table="course" abstract="true"> |
||
146 | jmachado | 8 | <meta attribute="extends">pt.estgp.estgweb.domain.DomainSerializableObject</meta> |
1 | fvelez | 9 | <meta attribute="scope-class">public abstract</meta> |
10 | <id name="id" type="long"> |
||
11 | <generator class="native"/> |
||
12 | </id> |
||
13 | <discriminator column="discrimitator"/> |
||
690 | jmachado | 14 | <timestamp source="db" name="updateDate" unsaved-value="null"/> |
1 | fvelez | 15 | <property name="saveDate" type="timestamp"/> |
16 | <property name="name" type="string"/> |
||
1505 | jmachado | 17 | <property name="nameEn" type="string"/> |
18 | <property name="nameEs" type="string"/> |
||
19 | <property name="nameFr" type="string"/> |
||
1 | fvelez | 20 | <property name="description" type="text"/> |
21 | <property name="code" type="string"/> |
||
206 | jmachado | 22 | <property name="importYear" type="string" index="importYearIndex"/> |
163 | jmachado | 23 | <property name="institutionalCode" type="string"/> |
1 | fvelez | 24 | <property name="externalSiteServer" type="string"/> |
25 | <property name="externalSitePath" type="string"/> |
||
1070 | jmachado | 26 | <property name="degree" type="string" index="degreeIndex"/> |
790 | jmachado | 27 | <property name="status" type="boolean"/> |
1521 | jmachado | 28 | <property name="showStudiesPlan" type="boolean"> |
29 | <column name="showStudiesPlan" default="false"/> |
||
30 | </property> |
||
248 | jmachado | 31 | <property name="cacheWebDocument" type="text"> |
1504 | jmachado | 32 | <column name="cacheWebDocument" sql-type="MEDIUMTEXT"/> |
248 | jmachado | 33 | </property> |
1496 | jmachado | 34 | <!--legacy--> |
214 | jmachado | 35 | <property name="studiesPlan" type="string" index="studiesPlanIndex"/> |
507 | jmachado | 36 | <property name="validationRole" type="string" index="validationRoleIndex"/> |
1505 | jmachado | 37 | <property name="area" type="string" index="areaIndex" insert="false" update="false"/> |
901 | jmachado | 38 | <property name="userGroupStudents" type="string"/> |
1496 | jmachado | 39 | <property name="json" type="text"> |
40 | <column name="json" sql-type="MEDIUMTEXT"/> |
||
41 | </property> |
||
1505 | jmachado | 42 | <many-to-one name="department" class="pt.estgp.estgweb.domain.CourseDepartment" outer-join="true" lazy="false"> |
43 | <column name="area" length="20" sql-type="VARCHAR"/> |
||
44 | </many-to-one> |
||
1312 | jmachado | 45 | <many-to-one name="courseContents" class="pt.estgp.estgweb.domain.PageSection" lazy="proxy" outer-join="false"> |
46 | <column name="courseContents"/> |
||
47 | </many-to-one> |
||
214 | jmachado | 48 | <many-to-one name="director" class="pt.estgp.estgweb.domain.Teacher" outer-join="false" lazy="proxy"/> |
49 | <many-to-one name="coordinator" class="pt.estgp.estgweb.domain.Teacher" outer-join="false" lazy="proxy"/> |
||
1496 | jmachado | 50 | <set name="studiesPlans" order-by="id desc" lazy="true"> |
51 | <key column="course_id"/> |
||
52 | <one-to-many class="pt.estgp.estgweb.domain.CourseStudiesPlan"/> |
||
53 | </set> |
||
1 | fvelez | 54 | <set name="users" order-by="user.name asc" lazy="true"> |
55 | <key column="course_id"/> |
||
56 | <one-to-many class="pt.estgp.estgweb.domain.CourseUserAssociation"/> |
||
57 | </set> |
||
343 | jmachado | 58 | <set name="courseUnits" order-by="name asc" lazy="true"> |
180 | jmachado | 59 | <key column="course"/> |
60 | <one-to-many class="pt.estgp.estgweb.domain.CourseUnit"/> |
||
61 | </set> |
||
1312 | jmachado | 62 | <set name="courseYears" order-by="importYear asc" lazy="true"> |
63 | <key column="course_id"/> |
||
64 | <one-to-many class="pt.estgp.estgweb.domain.CourseYear"/> |
||
65 | </set> |
||
1 | fvelez | 66 | <subclass name="pt.estgp.estgweb.domain.CourseImpl" discriminator-value="CourseImpl"/> |
67 | </class> |
||
1312 | jmachado | 68 | |
69 | <class name="pt.estgp.estgweb.domain.CourseYear" table="course_year" abstract="true"> |
||
70 | <meta attribute="extends">pt.estgp.estgweb.domain.DomainSerializableObject</meta> |
||
71 | <meta attribute="scope-class">public abstract</meta> |
||
72 | <id name="id" type="long"> |
||
73 | <generator class="native"/> |
||
74 | </id> |
||
75 | <discriminator column="discrimitator"/> |
||
76 | <timestamp source="db" name="updateDate" unsaved-value="null"/> |
||
77 | <property name="saveDate" type="timestamp"/> |
||
78 | <property name="importYear" type="string" index="importYearIndex"/> |
||
79 | <property name="separatedTurmas" type="boolean"> |
||
80 | <column name="separatedTurmas" default="false"/> |
||
81 | </property> |
||
82 | <many-to-one name="course" class="pt.estgp.estgweb.domain.Course" outer-join="true" lazy="false" column="course_id"/> |
||
83 | <subclass name="pt.estgp.estgweb.domain.CourseYearImpl" discriminator-value="CourseYearImpl"/> |
||
84 | </class> |
||
85 | |||
1496 | jmachado | 86 | <class name="pt.estgp.estgweb.domain.CourseStudiesPlan" table="course_studies_plan" abstract="true"> |
87 | <meta attribute="extends">pt.estgp.estgweb.domain.DomainSerializableObject</meta> |
||
88 | <meta attribute="scope-class">public abstract</meta> |
||
89 | <id name="id" type="long"> |
||
90 | <generator class="native"/> |
||
91 | </id> |
||
92 | <discriminator column="discrimitator"/> |
||
93 | <timestamp source="db" name="updateDate" unsaved-value="null"/> |
||
94 | <property name="saveDate" type="timestamp"/> |
||
95 | <property name="version" type="int"/> |
||
96 | <property name="versionDescription" type="string"/> |
||
1535 | jmachado | 97 | <property name="importLog" type="text"> |
98 | <column name="importLog" sql-type="MEDIUMTEXT"/> |
||
99 | </property> |
||
1496 | jmachado | 100 | <property name="xml" type="text"> |
101 | <column name="xml" sql-type="MEDIUMTEXT"/> |
||
102 | </property> |
||
103 | <property name="json" type="text"> |
||
104 | <column name="json" sql-type="MEDIUMTEXT"/> |
||
105 | </property> |
||
106 | <many-to-one name="course" class="pt.estgp.estgweb.domain.Course" outer-join="true" lazy="false" column="course_id"/> |
||
107 | <subclass name="pt.estgp.estgweb.domain.CourseStudiesPlanImpl" discriminator-value="CourseYearImpl"/> |
||
108 | </class> |
||
1312 | jmachado | 109 | |
1505 | jmachado | 110 | <class name="pt.estgp.estgweb.domain.CourseDepartment" table="course_department" abstract="true"> |
111 | <meta attribute="extends">pt.estgp.estgweb.domain.DomainSerializableObject</meta> |
||
112 | <meta attribute="scope-class">public abstract</meta> |
||
113 | <id name="sigla" type="string" length="20"> |
||
114 | <generator class="assigned"/> |
||
115 | </id> |
||
116 | <discriminator column="discrimitator"/> |
||
117 | <timestamp source="db" name="updateDate" unsaved-value="null"/> |
||
118 | <property name="saveDate" type="timestamp"/> |
||
119 | <property name="institutionalCode" type="string"/> |
||
120 | <property name="active" type="boolean"> |
||
121 | <column name="active" default="true"/> |
||
122 | </property> |
||
123 | <property name="name" type="string"/> |
||
124 | <property name="nameEn" type="string"/> |
||
125 | <property name="nameEs" type="string"/> |
||
126 | <property name="nameFr" type="string"/> |
||
127 | <subclass name="pt.estgp.estgweb.domain.CourseDepartmentImpl" discriminator-value="CourseDepartmentImpl"/> |
||
128 | </class> |
||
1496 | jmachado | 129 | |
1505 | jmachado | 130 | |
1 | fvelez | 131 | </hibernate-mapping> |