Subversion Repositories WebE

Rev

Rev 21 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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