Rev 21 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 21 | Rev 33 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | package ch.ffhs.webE.domain; |
1 | package ch.ffhs.webE.domain; |
2 | 2 | ||
3 | // Generated 19.12.2010 14:46:08 by Hibernate Tools 3.4.0.Beta1
|
3 | // Generated 19.12.2010 14:46:08 by Hibernate Tools 3.4.0.Beta1
|
4 | 4 | ||
- | 5 | import static javax.persistence.GenerationType.IDENTITY; |
|
- | 6 | ||
- | 7 | import java.io.Serializable; |
|
5 | import java.util.Date; |
8 | import java.util.Date; |
6 | import java.util.HashSet; |
9 | import java.util.HashSet; |
7 | import java.util.Set; |
10 | import java.util.Set; |
- | 11 | ||
8 | import javax.persistence.Column; |
12 | import javax.persistence.Column; |
9 | import javax.persistence.Entity; |
13 | import javax.persistence.Entity; |
10 | import javax.persistence.FetchType; |
14 | import javax.persistence.FetchType; |
11 | import javax.persistence.GeneratedValue; |
15 | import javax.persistence.GeneratedValue; |
12 | import static javax.persistence.GenerationType.IDENTITY; |
- | |
13 | import javax.persistence.Id; |
16 | import javax.persistence.Id; |
14 | import javax.persistence.JoinColumn; |
17 | import javax.persistence.JoinColumn; |
15 | import javax.persistence.ManyToOne; |
18 | import javax.persistence.ManyToOne; |
16 | import javax.persistence.OneToMany; |
19 | import javax.persistence.OneToMany; |
17 | import javax.persistence.OneToOne; |
20 | import javax.persistence.OneToOne; |
18 | import javax.persistence.Table; |
21 | import javax.persistence.Table; |
19 | import javax.persistence.Temporal; |
22 | import javax.persistence.Temporal; |
20 | import javax.persistence.TemporalType; |
23 | import javax.persistence.TemporalType; |
21 | 24 | ||
22 | /**
|
25 | /**
|
23 | * Object generated by hbm2java
|
26 | * ObjectEntity generated by hbm2java
|
24 | */
|
27 | */
|
25 | @Entity |
28 | @Entity |
26 | @Table(name = "object", catalog = "webengineering") |
29 | @Table(name = "object", catalog = "webengineering") |
27 | public class Object implements java.io.Serializable { |
30 | public class ObjectEntity implements Serializable |
- | 31 | {
|
|
- | 32 | /**
|
|
- | 33 | * Version ID for serialization
|
|
- | 34 | */
|
|
- | 35 | private static final long serialVersionUID = 1L; |
|
28 | 36 | ||
- | 37 | /* Persistent fields */
|
|
29 | private Integer id; |
38 | private Integer id; |
30 | private User userByEditorId; |
39 | private User userByEditorId; |
31 | private ObjectType objectType; |
40 | private ObjectType objectType; |
32 | private User userByOwnerId; |
41 | private User userByOwnerId; |
33 | private Date locked; |
42 | private Date locked; |
Line 35... | Line 44... | ||
35 | private Boolean deleted; |
44 | private Boolean deleted; |
36 | private Term term; |
45 | private Term term; |
37 | private Set<History> histories = new HashSet<History>(0); |
46 | private Set<History> histories = new HashSet<History>(0); |
38 | private Relationship relationship; |
47 | private Relationship relationship; |
39 | 48 | ||
- | 49 | /**
|
|
- | 50 | *
|
|
- | 51 | */
|
|
40 | public Object() { |
52 | public ObjectEntity() |
- | 53 | {
|
|
41 | }
|
54 | }
|
42 | 55 | ||
- | 56 | /**
|
|
- | 57 | * @param userByEditorId
|
|
- | 58 | * @param objectType
|
|
- | 59 | * @param userByOwnerId
|
|
- | 60 | */
|
|
43 | public Object(User userByEditorId, ObjectType objectType, User userByOwnerId) { |
61 | public ObjectEntity(User userByEditorId, ObjectType objectType, |
- | 62 | User userByOwnerId)
|
|
- | 63 | {
|
|
44 | this.userByEditorId = userByEditorId; |
64 | this.userByEditorId = userByEditorId; |
45 | this.objectType = objectType; |
65 | this.objectType = objectType; |
46 | this.userByOwnerId = userByOwnerId; |
66 | this.userByOwnerId = userByOwnerId; |
47 | }
|
67 | }
|
48 | 68 | ||
- | 69 | /**
|
|
- | 70 | * @param userByEditorId
|
|
- | 71 | * @param objectType
|
|
- | 72 | * @param userByOwnerId
|
|
- | 73 | * @param locked
|
|
- | 74 | * @param modified
|
|
- | 75 | * @param deleted
|
|
- | 76 | * @param term
|
|
- | 77 | * @param histories
|
|
- | 78 | * @param relationship
|
|
- | 79 | */
|
|
49 | public Object(User userByEditorId, ObjectType objectType, |
80 | public ObjectEntity(User userByEditorId, ObjectType objectType, |
50 | User userByOwnerId, Date locked, Date modified, Boolean deleted, |
81 | User userByOwnerId, Date locked, Date modified, Boolean deleted, |
51 | Term term, Set<History> histories, Relationship relationship) { |
82 | Term term, Set<History> histories, Relationship relationship) |
- | 83 | {
|
|
52 | this.userByEditorId = userByEditorId; |
84 | this.userByEditorId = userByEditorId; |
53 | this.objectType = objectType; |
85 | this.objectType = objectType; |
54 | this.userByOwnerId = userByOwnerId; |
86 | this.userByOwnerId = userByOwnerId; |
55 | this.locked = locked; |
87 | this.locked = locked; |
56 | this.modified = modified; |
88 | this.modified = modified; |
Line 58... | Line 90... | ||
58 | this.term = term; |
90 | this.term = term; |
59 | this.histories = histories; |
91 | this.histories = histories; |
60 | this.relationship = relationship; |
92 | this.relationship = relationship; |
61 | }
|
93 | }
|
62 | 94 | ||
- | 95 | /**
|
|
- | 96 | * @return
|
|
- | 97 | */
|
|
63 | @Id |
98 | @Id |
64 | @GeneratedValue(strategy = IDENTITY) |
99 | @GeneratedValue(strategy = IDENTITY) |
65 | @Column(name = "id", unique = true, nullable = false) |
100 | @Column(name = "id", unique = true, nullable = false) |
66 | public Integer getId() { |
101 | public Integer getId() |
- | 102 | {
|
|
67 | return this.id; |
103 | return this.id; |
68 | }
|
104 | }
|
69 | 105 | ||
- | 106 | /**
|
|
- | 107 | * @param id
|
|
- | 108 | */
|
|
70 | public void setId(Integer id) { |
109 | public void setId(Integer id) |
- | 110 | {
|
|
71 | this.id = id; |
111 | this.id = id; |
72 | }
|
112 | }
|
73 | 113 | ||
- | 114 | /**
|
|
- | 115 | * @return
|
|
- | 116 | */
|
|
74 | @ManyToOne(fetch = FetchType.LAZY) |
117 | @ManyToOne(fetch = FetchType.LAZY) |
75 | @JoinColumn(name = "editor_id", nullable = false) |
118 | @JoinColumn(name = "editor_id", nullable = false) |
76 | public User getUserByEditorId() { |
119 | public User getUserByEditorId() |
- | 120 | {
|
|
77 | return this.userByEditorId; |
121 | return this.userByEditorId; |
78 | }
|
122 | }
|
79 | 123 | ||
- | 124 | /**
|
|
- | 125 | * @param userByEditorId
|
|
- | 126 | */
|
|
80 | public void setUserByEditorId(User userByEditorId) { |
127 | public void setUserByEditorId(User userByEditorId) |
- | 128 | {
|
|
81 | this.userByEditorId = userByEditorId; |
129 | this.userByEditorId = userByEditorId; |
82 | }
|
130 | }
|
83 | 131 | ||
- | 132 | /**
|
|
- | 133 | * @return
|
|
- | 134 | */
|
|
84 | @ManyToOne(fetch = FetchType.LAZY) |
135 | @ManyToOne(fetch = FetchType.LAZY) |
85 | @JoinColumn(name = "object_type_id", nullable = false) |
136 | @JoinColumn(name = "object_type_id", nullable = false) |
86 | public ObjectType getObjectType() { |
137 | public ObjectType getObjectType() |
- | 138 | {
|
|
87 | return this.objectType; |
139 | return this.objectType; |
88 | }
|
140 | }
|
89 | 141 | ||
- | 142 | /**
|
|
- | 143 | * @param objectType
|
|
- | 144 | */
|
|
90 | public void setObjectType(ObjectType objectType) { |
145 | public void setObjectType(ObjectType objectType) |
- | 146 | {
|
|
91 | this.objectType = objectType; |
147 | this.objectType = objectType; |
92 | }
|
148 | }
|
93 | 149 | ||
- | 150 | /**
|
|
- | 151 | * @return
|
|
- | 152 | */
|
|
94 | @ManyToOne(fetch = FetchType.LAZY) |
153 | @ManyToOne(fetch = FetchType.LAZY) |
95 | @JoinColumn(name = "owner_id", nullable = false) |
154 | @JoinColumn(name = "owner_id", nullable = false) |
96 | public User getUserByOwnerId() { |
155 | public User getUserByOwnerId() |
- | 156 | {
|
|
97 | return this.userByOwnerId; |
157 | return this.userByOwnerId; |
98 | }
|
158 | }
|
99 | 159 | ||
- | 160 | /**
|
|
- | 161 | * @param userByOwnerId
|
|
- | 162 | */
|
|
100 | public void setUserByOwnerId(User userByOwnerId) { |
163 | public void setUserByOwnerId(User userByOwnerId) |
- | 164 | {
|
|
101 | this.userByOwnerId = userByOwnerId; |
165 | this.userByOwnerId = userByOwnerId; |
102 | }
|
166 | }
|
103 | 167 | ||
- | 168 | /**
|
|
- | 169 | * @return
|
|
- | 170 | */
|
|
104 | @Temporal(TemporalType.TIMESTAMP) |
171 | @Temporal(TemporalType.TIMESTAMP) |
105 | @Column(name = "locked", length = 19) |
172 | @Column(name = "locked", length = 19) |
106 | public Date getLocked() { |
173 | public Date getLocked() |
- | 174 | {
|
|
107 | return this.locked; |
175 | return this.locked; |
108 | }
|
176 | }
|
109 | 177 | ||
- | 178 | /**
|
|
- | 179 | * @param locked
|
|
- | 180 | */
|
|
110 | public void setLocked(Date locked) { |
181 | public void setLocked(Date locked) |
- | 182 | {
|
|
111 | this.locked = locked; |
183 | this.locked = locked; |
112 | }
|
184 | }
|
113 | 185 | ||
- | 186 | /**
|
|
- | 187 | * @return
|
|
- | 188 | */
|
|
114 | @Temporal(TemporalType.TIMESTAMP) |
189 | @Temporal(TemporalType.TIMESTAMP) |
115 | @Column(name = "modified", length = 19) |
190 | @Column(name = "modified", length = 19) |
116 | public Date getModified() { |
191 | public Date getModified() |
- | 192 | {
|
|
117 | return this.modified; |
193 | return this.modified; |
118 | }
|
194 | }
|
119 | 195 | ||
- | 196 | /**
|
|
- | 197 | * @param modified
|
|
- | 198 | */
|
|
120 | public void setModified(Date modified) { |
199 | public void setModified(Date modified) |
- | 200 | {
|
|
121 | this.modified = modified; |
201 | this.modified = modified; |
122 | }
|
202 | }
|
123 | 203 | ||
- | 204 | /**
|
|
- | 205 | * @return
|
|
- | 206 | */
|
|
124 | @Column(name = "deleted") |
207 | @Column(name = "deleted") |
125 | public Boolean getDeleted() { |
208 | public Boolean getDeleted() |
- | 209 | {
|
|
126 | return this.deleted; |
210 | return this.deleted; |
127 | }
|
211 | }
|
128 | 212 | ||
- | 213 | /**
|
|
- | 214 | * @param deleted
|
|
- | 215 | */
|
|
129 | public void setDeleted(Boolean deleted) { |
216 | public void setDeleted(Boolean deleted) |
- | 217 | {
|
|
130 | this.deleted = deleted; |
218 | this.deleted = deleted; |
131 | }
|
219 | }
|
132 | 220 | ||
- | 221 | /**
|
|
- | 222 | * @return
|
|
- | 223 | */
|
|
133 | @OneToOne(fetch = FetchType.LAZY, mappedBy = "object") |
224 | @OneToOne(fetch = FetchType.LAZY, mappedBy = "object") |
134 | public Term getTerm() { |
225 | public Term getTerm() |
- | 226 | {
|
|
135 | return this.term; |
227 | return this.term; |
136 | }
|
228 | }
|
137 | 229 | ||
- | 230 | /**
|
|
- | 231 | * @param term
|
|
- | 232 | */
|
|
138 | public void setTerm(Term term) { |
233 | public void setTerm(Term term) |
- | 234 | {
|
|
139 | this.term = term; |
235 | this.term = term; |
140 | }
|
236 | }
|
141 | 237 | ||
- | 238 | /**
|
|
- | 239 | * @return
|
|
- | 240 | */
|
|
142 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "object") |
241 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "object") |
143 | public Set<History> getHistories() { |
242 | public Set<History> getHistories() |
- | 243 | {
|
|
144 | return this.histories; |
244 | return this.histories; |
145 | }
|
245 | }
|
146 | 246 | ||
- | 247 | /**
|
|
- | 248 | * @param histories
|
|
- | 249 | */
|
|
147 | public void setHistories(Set<History> histories) { |
250 | public void setHistories(Set<History> histories) |
- | 251 | {
|
|
148 | this.histories = histories; |
252 | this.histories = histories; |
149 | }
|
253 | }
|
150 | 254 | ||
- | 255 | /**
|
|
- | 256 | * @return
|
|
- | 257 | */
|
|
151 | @OneToOne(fetch = FetchType.LAZY, mappedBy = "object") |
258 | @OneToOne(fetch = FetchType.LAZY, mappedBy = "object") |
152 | public Relationship getRelationship() { |
259 | public Relationship getRelationship() |
- | 260 | {
|
|
153 | return this.relationship; |
261 | return this.relationship; |
154 | }
|
262 | }
|
155 | 263 | ||
- | 264 | /**
|
|
- | 265 | * @param relationship
|
|
- | 266 | */
|
|
156 | public void setRelationship(Relationship relationship) { |
267 | public void setRelationship(Relationship relationship) |
- | 268 | {
|
|
157 | this.relationship = relationship; |
269 | this.relationship = relationship; |
158 | }
|
270 | }
|
159 | 271 | ||
160 | }
|
272 | }
|