Subversion Repositories WebE

Rev

Rev 33 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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