Rev 853 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
850 | jmachado | 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> |
||
851 | jmachado | 7 | <class name="pt.estgp.estgweb.domain.MetaProcess" table="meta_process" abstract="true"> |
8 | <meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta> |
||
9 | <meta attribute="scope-class">public abstract</meta> |
||
10 | <id name="id" type="long"> |
||
11 | <generator class="native"/> |
||
12 | </id> |
||
13 | <discriminator column="discrimitator"/> |
||
14 | <timestamp source="db" name="updateDate" unsaved-value="null"/> |
||
15 | <property name="saveDate" type="timestamp"/> |
||
16 | <property name="name" type="string"/> |
||
853 | jmachado | 17 | <property name="possibleTargets" type="text" /> |
18 | <property name="possiblePersons" type="text" /> |
||
851 | jmachado | 19 | <property name="repositoryStream" type="string"/> |
20 | <property name="description" type="text"/> |
||
21 | <property name="category" type="string"/> |
||
22 | <property name="subCategory" type="string"/> |
||
23 | <property name="srcRole" type="string"/> |
||
24 | <property name="targetRole" type="string"/> |
||
25 | <many-to-one name="targetPerson" class="pt.estgp.estgweb.domain.User" lazy="false" outer-join="true"/> |
||
26 | <set name="processes" cascade="none" lazy="true"> |
||
27 | <key column="meta_process_id"/> |
||
28 | <one-to-many class="pt.estgp.estgweb.domain.Process"/> |
||
29 | </set> |
||
30 | <subclass name="pt.estgp.estgweb.domain.MetaProcessImpl" discriminator-value="MetaProcessImpl"> |
||
31 | </subclass> |
||
32 | </class> |
||
33 | |||
850 | jmachado | 34 | <class name="pt.estgp.estgweb.domain.Process" table="process" abstract="true"> |
35 | <meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta> |
||
36 | <meta attribute="scope-class">public abstract</meta> |
||
37 | <id name="id" type="long"> |
||
38 | <generator class="native"/> |
||
39 | </id> |
||
40 | <discriminator column="discrimitator"/> |
||
41 | <timestamp source="db" name="updateDate" unsaved-value="null"/> |
||
42 | <property name="openDate" type="timestamp"/> |
||
43 | <property name="lastChangeDate" type="timestamp"/> |
||
44 | <property name="closeDate" type="timestamp"/> |
||
45 | <property name="nowState" type="string"/> |
||
46 | |||
47 | <many-to-one name="owner" class="pt.estgp.estgweb.domain.GenericUser" lazy="no-proxy" outer-join="true"/> |
||
48 | <many-to-one name="lastEvent" class="pt.estgp.estgweb.domain.ProcessEvent" lazy="false" outer-join="true"/> |
||
49 | |||
851 | jmachado | 50 | <many-to-one name="metaProcess" column="meta_process_id" class="pt.estgp.estgweb.domain.MetaProcess" lazy="false" outer-join="true"/> |
850 | jmachado | 51 | <set name="events" cascade="delete" lazy="true"> |
52 | <key column="process_id"/> |
||
53 | <one-to-many class="pt.estgp.estgweb.domain.ProcessEvent"/> |
||
54 | </set> |
||
55 | <subclass name="pt.estgp.estgweb.domain.ProcessImpl" discriminator-value="ProcessImpl"> |
||
56 | </subclass> |
||
57 | </class> |
||
58 | |||
59 | <class name="pt.estgp.estgweb.domain.ProcessEvent" table="process_event" abstract="true"> |
||
60 | <meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta> |
||
61 | <meta attribute="scope-class">public abstract</meta> |
||
62 | <id name="id" type="long"> |
||
63 | <generator class="native"/> |
||
64 | </id> |
||
65 | <discriminator column="discrimitator"/> |
||
66 | <timestamp source="db" name="updateDate" unsaved-value="null"/> |
||
67 | <property name="openDate" type="timestamp"/> |
||
68 | <property name="acceptedDate" type="timestamp"/> |
||
69 | <property name="dispatchedDate" type="timestamp"/> |
||
70 | <property name="lastChangeDate" type="timestamp"/> |
||
71 | <property name="closeDate" type="timestamp"/> |
||
72 | |||
73 | <property name="nowState" type="string"/> |
||
74 | <property name="accepted" type="boolean"/> |
||
75 | <property name="destinationRole" type="string"/> |
||
76 | |||
77 | <property name="notes" type="text"/> |
||
852 | jmachado | 78 | <property name="notesAccessLevel" type="string"/> |
79 | <property name="notesAccessIdentifiers" type="string"/> |
||
80 | <property name="notesAccessRoles" type="string"/> |
||
850 | jmachado | 81 | |
852 | jmachado | 82 | <property name="notesToStarter" type="text"/> |
850 | jmachado | 83 | |
852 | jmachado | 84 | |
85 | |||
86 | <many-to-one name="process" column="process_id" class="pt.estgp.estgweb.domain.Process" lazy="no-proxy" outer-join="true" cascade="none"/> |
||
87 | |||
850 | jmachado | 88 | <many-to-one name="previousEvent" column="previous_event_id" class="pt.estgp.estgweb.domain.ProcessEvent" lazy="no-proxy" outer-join="false" cascade="none"/> |
89 | <many-to-one name="nextEvent" column="next_event_id" class="pt.estgp.estgweb.domain.ProcessEvent" lazy="no-proxy" outer-join="false" cascade="delete"/> |
||
90 | <!-- é o owner <many-to-one name="destinatedPerson" column="dest_user_id" class="pt.estgp.estgweb.domain.User" lazy="no-proxy" outer-join="false" cascade="none"/>--> |
||
851 | jmachado | 91 | <!-- |
92 | Nao e necessario porque temos o preciousEvent e com isso sabemos a source person |
||
850 | jmachado | 93 | <many-to-one name="sourcePerson" column="dest_user_id" class="pt.estgp.estgweb.domain.User" lazy="no-proxy" outer-join="false" cascade="none"/> |
851 | jmachado | 94 | --> |
850 | jmachado | 95 | <many-to-one name="owner" class="pt.estgp.estgweb.domain.GenericUser" lazy="no-proxy" outer-join="true"/> |
96 | <set name="files" cascade="none" lazy="true"> |
||
97 | <key column="process_event_id"/> |
||
98 | <one-to-many class="pt.estgp.estgweb.domain.ProcessEventFile"/> |
||
99 | </set> |
||
100 | <subclass name="pt.estgp.estgweb.domain.ProcessEventImpl" discriminator-value="ProcessEventImpl"> |
||
101 | </subclass> |
||
102 | </class> |
||
103 | |||
104 | <class name="pt.estgp.estgweb.domain.ProcessEventFile" table="process_event_file" abstract="true"> |
||
105 | <meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta> |
||
106 | <meta attribute="scope-class">public abstract</meta> |
||
107 | <id name="id" type="long"> |
||
108 | <generator class="native"/> |
||
109 | </id> |
||
110 | <discriminator column="discrimitator"/> |
||
111 | <timestamp source="db" name="updateDate" unsaved-value="null"/> |
||
852 | jmachado | 112 | |
853 | jmachado | 113 | <property name="name" type="string"/> |
852 | jmachado | 114 | <property name="fileAccessLevel" type="string"/> |
853 | jmachado | 115 | <property name="oldFileAccessLevel" type="string"/> |
852 | jmachado | 116 | <property name="fileAccessIdentifiers" type="string"/> |
117 | <property name="fileAccessRoles" type="string"/> |
||
118 | |||
850 | jmachado | 119 | <property name="importDate" type="timestamp"/> |
120 | |||
121 | <property name="repositoryStream" type="string"/> |
||
122 | <property name="notes" type="text"/> |
||
123 | |||
853 | jmachado | 124 | <property name="ghost" type="boolean"/> |
852 | jmachado | 125 | |
853 | jmachado | 126 | |
850 | jmachado | 127 | <many-to-one name="owner" class="pt.estgp.estgweb.domain.GenericUser" lazy="no-proxy" outer-join="true"/> |
851 | jmachado | 128 | <many-to-one name="processEvent" column="process_event_id" class="pt.estgp.estgweb.domain.ProcessEvent" lazy="false" outer-join="true"/> |
850 | jmachado | 129 | |
130 | <subclass name="pt.estgp.estgweb.domain.ProcessEventFileImpl" discriminator-value="ProcessEventFileImpl"> |
||
131 | </subclass> |
||
132 | </class> |
||
133 | </hibernate-mapping> |