Rev 1704 | 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.GenericUser" table="user" abstract="true"> |
||
146 | jmachado | 8 | <meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</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"/> |
||
1549 | jmachado | 14 | <timestamp source="db" name="updateDate" unsaved-value="null"/> |
1 | fvelez | 15 | <property name="saveDate" type="timestamp"/> |
16 | <property name="superuser" type="boolean"/> |
||
338 | jmachado | 17 | <property name="username" type="string" unique="true" length="50" index="usernameIndex"/> |
215 | jmachado | 18 | <property name="name" type="string" index="nameIndex"/> |
338 | jmachado | 19 | <property name="email" type="string" index="emailIndex"/> |
1585 | jmachado | 20 | <property name="preferrefEmail" type="string"/> |
1547 | jmachado | 21 | <property name="roles" type="string"> |
1040 | jmachado | 22 | <column name="roles" sql-type="TEXT"/> |
23 | </property> |
||
1317 | jmachado | 24 | <property name="authenticationCertificate" type="string" index="authCertIndex"/> |
25 | <property name="authenticationCertificateExpire" type="timestamp" index="authCertExpIndex"/> |
||
297 | jmachado | 26 | <many-to-one name="image" column="image" class="pt.estgp.estgweb.domain.Image" lazy="no-proxy" outer-join="false" cascade="all"/> |
146 | jmachado | 27 | <subclass name="pt.estgp.estgweb.domain.GenericUserImpl"> |
28 | <subclass name="pt.estgp.estgweb.domain.Group"> |
||
29 | <meta attribute="scope-class">public abstract</meta> |
||
30 | <set name="users" table="group_users"> |
||
31 | <key column="group_id"/> |
||
32 | <many-to-many column="user_id" class="pt.estgp.estgweb.domain.User"/> |
||
33 | </set> |
||
34 | <subclass name="pt.estgp.estgweb.domain.GroupImpl" discriminator-value="GroupImpl"/> |
||
35 | </subclass> |
||
36 | <subclass name="pt.estgp.estgweb.domain.User"> |
||
37 | <meta attribute="scope-class">public abstract</meta> |
||
1312 | jmachado | 38 | <property name="passwordSiges" type="string"/> |
146 | jmachado | 39 | <property name="password" type="string"/> |
1704 | jmachado | 40 | <!--CHAVE DE UTILIZADOR FINAL PARA METER NO TELEMOVEL--> |
41 | <property name="chaveAppsMoveis" type="string"/> |
||
146 | jmachado | 42 | <property name="address" type="text"/> |
43 | <property name="zip" type="string"/> |
||
44 | <property name="country" type="string"/> |
||
1553 | jmachado | 45 | <property name="nacionalidade" type="string"/> |
381 | jmachado | 46 | <property name="office" type="string"/> |
47 | <property name="ext" type="string"/> |
||
146 | jmachado | 48 | <property name="outEmail" type="string"/> |
49 | <property name="phonenumber" type="string"/> |
||
50 | <property name="sex" type="string"/> |
||
51 | <property name="bi" type="string"/> |
||
52 | <property name="birthDate" type="date"/> |
||
156 | jmachado | 53 | <property name="pop3server" type="string"/> |
54 | <property name="pop3username" type="string"/> |
||
55 | <property name="pop3password" type="string"/> |
||
56 | <property name="skype" type="string"/> |
||
57 | <property name="gmail" type="string"/> |
||
58 | <property name="msn" type="string"/> |
||
215 | jmachado | 59 | <property name="scholarDegree" type="string"/> |
806 | jmachado | 60 | |
61 | <property name="autoBlockMode" type="boolean"/> |
||
62 | <property name="autoBlock" type="boolean"/> |
||
63 | <property name="manualBlock" type="boolean"/> |
||
64 | |||
146 | jmachado | 65 | <set name="groups" table="group_users" lazy="false"> |
66 | <key column="user_id"/> |
||
67 | <many-to-many column="group_id" class="pt.estgp.estgweb.domain.Group"/> |
||
68 | </set> |
||
1780 | jmachado | 69 | <!-- |
146 | jmachado | 70 | <set name="courses" order-by="course.name asc" lazy="true"> |
71 | <key column="user_id"/> |
||
72 | <one-to-many class="pt.estgp.estgweb.domain.CourseUserAssociation"/> |
||
73 | </set> |
||
1780 | jmachado | 74 | --> |
287 | jmachado | 75 | <set name="creatorRecords" lazy="true" order-by="recordId" table="creatorrecords"> |
215 | jmachado | 76 | <key column="creatorId"/> |
77 | <many-to-many class="pt.estgp.estgweb.domain.Record" column="recordId"/> |
||
78 | </set> |
||
287 | jmachado | 79 | <set name="contributorRecords" lazy="true" order-by="recordId" table="contributorrecords"> |
215 | jmachado | 80 | <key column="contributorId"/> |
81 | <many-to-many class="pt.estgp.estgweb.domain.Record" column="recordId"/> |
||
82 | </set> |
||
296 | jmachado | 83 | <set name="managedIdentifierCollectionsManager" lazy="true" table="managedidentifiercollectionmanagers"> |
215 | jmachado | 84 | <key column="managerId"/> |
1692 | jmachado | 85 | <many-to-many class="pt.estgp.estgweb.domain.ManagedIdentifierCollection" column="collectionIds"/> |
215 | jmachado | 86 | </set> |
87 | <set name="managedIdentifierCollectionsOwner" lazy="true" order-by="name asc"> |
||
88 | <key column="owner"/> |
||
89 | <one-to-many class="pt.estgp.estgweb.domain.ManagedIdentifierCollection"/> |
||
90 | </set> |
||
684 | jmachado | 91 | <set name="mySurveys" lazy="true" order-by="id asc"> |
671 | jmachado | 92 | <key column="owner"/> |
93 | <one-to-many class="pt.estgp.estgweb.domain.Survey"/> |
||
94 | </set> |
||
684 | jmachado | 95 | <set name="mySurveyResponses" lazy="true" order-by="id asc"> |
671 | jmachado | 96 | <key column="owner"/> |
97 | <one-to-many class="pt.estgp.estgweb.domain.SurveyResponse"/> |
||
98 | </set> |
||
146 | jmachado | 99 | <subclass name="pt.estgp.estgweb.domain.UserImpl" discriminator-value="UserImpl"> |
1704 | jmachado | 100 | <subclass name="pt.estgp.estgweb.domain.AppUser"> |
101 | <meta attribute="scope-class">public abstract</meta> |
||
102 | <property name="chaveApi" type="string"/> |
||
103 | <subclass name="pt.estgp.estgweb.domain.AppUserImpl" discriminator-value="AppUserImpl"/> |
||
104 | </subclass> |
||
146 | jmachado | 105 | <subclass name="pt.estgp.estgweb.domain.UserManagedRoleImpl"> |
376 | jmachado | 106 | <subclass name="pt.estgp.estgweb.domain.SigesUser"> |
146 | jmachado | 107 | <meta attribute="extends">pt.estgp.estgweb.domain.UserManagedRoleImpl</meta> |
108 | <meta attribute="scope-class">public abstract</meta> |
||
109 | <property name="sigesCode" type="int"/> |
||
376 | jmachado | 110 | <property name="areasBelong" type="string" index="areasBelongIndex"/> |
381 | jmachado | 111 | <property name="mainArea" type="string" index="mainAreaIndex"/> |
146 | jmachado | 112 | <property name="userNameNetpa" type="string"/> |
376 | jmachado | 113 | <subclass name="pt.estgp.estgweb.domain.SigesUserImpl"> |
114 | <subclass name="pt.estgp.estgweb.domain.Student"> |
||
115 | <meta attribute="extends">pt.estgp.estgweb.domain.SigesUserImpl</meta> |
||
116 | <meta attribute="scope-class">public abstract</meta> |
||
117 | <property name="localRemovedSubscribedUnits" type="string"/> |
||
566 | jmachado | 118 | <property name="localSubscribedUnits" type="string"/> |
1423 | jmachado | 119 | <property name="tipoAlunoTrabalhadorEstudante" type="boolean"> |
120 | <column name="tipoAlunoTrabalhadorEstudante" default="false"/> |
||
121 | </property> |
||
122 | <property name="tipoAlunoErasmus" type="boolean"> |
||
123 | <column name="tipoAlunoErasmus" default="false"/> |
||
124 | </property> |
||
125 | <property name="tipoAlunoNormal" type="boolean"> |
||
126 | <column name="tipoAlunoNormal" default="false"/> |
||
127 | </property> |
||
128 | <property name="tipoAlunoBolseiro" type="boolean"> |
||
129 | <column name="tipoAlunoBolseiro" default="false"/> |
||
130 | </property> |
||
131 | <property name="tipoAlunoMilitar" type="boolean"> |
||
132 | <column name="tipoAlunoMilitar" default="false"/> |
||
133 | </property> |
||
134 | <property name="tipoAlunoDirigenteAssociativo" type="boolean"> |
||
135 | <column name="tipoAlunoDirigenteAssociativo" default="false"/> |
||
136 | </property> |
||
137 | <property name="tipoAlunoDeficiente" type="boolean"> |
||
138 | <column name="tipoAlunoDeficiente" default="false"/> |
||
139 | </property> |
||
140 | <property name="tipoAlunoBombeiro" type="boolean"> |
||
141 | <column name="tipoAlunoBombeiro" default="false"/> |
||
142 | </property> |
||
143 | <property name="tipoAlunoVascodagama" type="boolean"> |
||
144 | <column name="tipoAlunoVascodagama" default="false"/> |
||
145 | </property> |
||
1048 | jmachado | 146 | <property name="propinasEmDia" type="boolean" > |
147 | <column name="propinasEmDia" default="false"/> |
||
148 | </property> |
||
1423 | jmachado | 149 | |
150 | |||
1051 | jmachado | 151 | <property name="propinasEmDiaYear" type="string" > |
152 | <column name="propinasEmDiaYear" length="10"/> |
||
153 | </property> |
||
376 | jmachado | 154 | <set name="subscribedUnits" lazy="true" order-by="courseUnitId" table="subscribedunits"> |
155 | <key column="studentId"/> |
||
156 | <many-to-many class="pt.estgp.estgweb.domain.CourseUnit" column="courseUnitId"/> |
||
157 | </set> |
||
1057 | jmachado | 158 | <set name="courseUnitGrades" order-by="publishDate asc" lazy="true"> |
376 | jmachado | 159 | <key column="student"/> |
160 | <one-to-many class="pt.estgp.estgweb.domain.CourseUnitGrade"/> |
||
161 | </set> |
||
428 | jmachado | 162 | <set name="deliverables" lazy="true" order-by="deliverDate asc"> |
163 | <key column="student"/> |
||
164 | <one-to-many class="pt.estgp.estgweb.domain.CourseUnitDeliverable"/> |
||
165 | </set> |
||
1312 | jmachado | 166 | <set name="turmas" lazy="true" table="subscribedturmaunits"> |
167 | <key column="studentId"/> |
||
168 | <many-to-many class="pt.estgp.estgweb.domain.CourseUnitTurmaImpl" column="courseUnitTurmaId"/> |
||
169 | </set> |
||
376 | jmachado | 170 | <subclass name="pt.estgp.estgweb.domain.StudentImpl" discriminator-value="StudentImpl"/> |
171 | </subclass> |
||
172 | <subclass name="pt.estgp.estgweb.domain.Teacher"> |
||
173 | <meta attribute="extends">pt.estgp.estgweb.domain.SigesUserImpl</meta> |
||
174 | <meta attribute="scope-class">public abstract</meta> |
||
175 | <property name="academicName" type="string"/> |
||
176 | <property name="employerName" type="string"/> |
||
177 | <property name="unitCheck" type="boolean"/> |
||
178 | <property name="academicDegree" type="string"/> |
||
179 | <property name="localRemovedTeachedUnits" type="string"/> |
||
996 | jmachado | 180 | <property name="localTeachedUnits" type="string"/> |
1670 | jmachado | 181 | <many-to-one name="department" class="pt.estgp.estgweb.domain.CourseDepartmentImpl" outer-join="true" lazy="false" column="departmentSigla"/> |
821 | jmachado | 182 | <set name="responsibleUnits" lazy="true" order-by="name"> |
183 | <key column="responsableTeacher"/> |
||
184 | <one-to-many class="pt.estgp.estgweb.domain.CourseUnit"/> |
||
185 | </set> |
||
376 | jmachado | 186 | <set name="teachedUnits" lazy="true" order-by="courseUnitId" table="teachedunits"> |
187 | <key column="teacherId"/> |
||
188 | <many-to-many class="pt.estgp.estgweb.domain.CourseUnit" column="courseUnitId"/> |
||
189 | </set> |
||
190 | <set name="coordinatorCourses" order-by="name asc" lazy="true"> |
||
191 | <key column="coordinator"/> |
||
192 | <one-to-many class="pt.estgp.estgweb.domain.Course"/> |
||
193 | </set> |
||
194 | <set name="directorCourses" order-by="name asc" lazy="true"> |
||
195 | <key column="director"/> |
||
196 | <one-to-many class="pt.estgp.estgweb.domain.Course"/> |
||
197 | </set> |
||
198 | <subclass name="pt.estgp.estgweb.domain.TeacherImpl" discriminator-value="TeacherImpl"/> |
||
199 | </subclass> |
||
200 | </subclass> |
||
146 | jmachado | 201 | </subclass> |
114 | jmachado | 202 | </subclass> |
203 | </subclass> |
||
204 | </subclass> |
||
1 | fvelez | 205 | </subclass> |
206 | </class> |
||
207 | </hibernate-mapping> |