Subversion Repositories WebE

Rev

Rev 33 | 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
 
37 PointedEar 5
import static javax.persistence.GenerationType.IDENTITY;
6
 
21 moos 7
import java.util.Date;
37 PointedEar 8
 
21 moos 9
import javax.persistence.Column;
10
import javax.persistence.Entity;
11
import javax.persistence.FetchType;
12
import javax.persistence.GeneratedValue;
13
import javax.persistence.Id;
14
import javax.persistence.JoinColumn;
15
import javax.persistence.ManyToOne;
16
import javax.persistence.Table;
17
import javax.persistence.Temporal;
18
import javax.persistence.TemporalType;
19
 
20
/**
21
 * History generated by hbm2java
22
 */
23
@Entity
24
@Table(name = "history", catalog = "webengineering")
37 PointedEar 25
public class History implements java.io.Serializable
26
{
27
  /**
28
   * Serialization version ID
29
   */
30
  private static final long serialVersionUID = 1L;
21 moos 31
 
37 PointedEar 32
  private int id;
33
  private User user;
34
  private ActionType actionType;
35
  private ObjectEntity object;
36
  private String value;
37
  private String comment;
38
  private Date date;
21 moos 39
 
37 PointedEar 40
  /**
41
   *
42
   */
43
  public History()
44
  {
45
  }
21 moos 46
 
37 PointedEar 47
  /**
48
   * @param user
49
   * @param actionType
50
   * @param object
51
   * @param date
52
   */
53
  public History(User user, ActionType actionType, ObjectEntity object,
54
      Date date)
55
  {
56
    this.user = user;
57
    this.actionType = actionType;
58
    this.object = object;
59
    this.date = date;
60
  }
21 moos 61
 
37 PointedEar 62
  /**
63
   * @param user
64
   * @param actionType
65
   * @param object
66
   * @param value
67
   * @param comment
68
   * @param date
69
   */
70
  public History(User user, ActionType actionType, ObjectEntity object,
71
      String value, String comment, Date date)
72
  {
73
    this.user = user;
74
    this.actionType = actionType;
75
    this.object = object;
76
    this.value = value;
77
    this.comment = comment;
78
    this.date = date;
79
  }
21 moos 80
 
37 PointedEar 81
  /**
82
   * @return
83
   */
84
  @Id
85
  @GeneratedValue(strategy = IDENTITY)
86
  @Column(name = "id", unique = true, nullable = false)
87
  public int getId()
88
  {
89
    return this.id;
90
  }
21 moos 91
 
37 PointedEar 92
  /**
93
   * @param id
94
   */
95
  public void setId(int id)
96
  {
97
    this.id = id;
98
  }
21 moos 99
 
37 PointedEar 100
  /**
101
   * @return
102
   */
103
  @ManyToOne(fetch = FetchType.LAZY)
104
  @JoinColumn(name = "user_id", nullable = false)
105
  public User getUser()
106
  {
107
    return this.user;
108
  }
21 moos 109
 
37 PointedEar 110
  /**
111
   * @param user
112
   */
113
  public void setUser(User user)
114
  {
115
    this.user = user;
116
  }
21 moos 117
 
37 PointedEar 118
  /**
119
   * @return
120
   */
121
  @ManyToOne(fetch = FetchType.LAZY)
122
  @JoinColumn(name = "action_type_id", nullable = false)
123
  public ActionType getActionType()
124
  {
125
    return this.actionType;
126
  }
21 moos 127
 
37 PointedEar 128
  /**
129
   * @param actionType
130
   */
131
  public void setActionType(ActionType actionType)
132
  {
133
    this.actionType = actionType;
134
  }
21 moos 135
 
37 PointedEar 136
  /**
137
   * @return
138
   */
139
  @ManyToOne(fetch = FetchType.LAZY)
140
  @JoinColumn(name = "objects_id", nullable = false)
141
  public ObjectEntity getObject()
142
  {
143
    return this.object;
144
  }
21 moos 145
 
37 PointedEar 146
  /**
147
   * @param object
148
   */
149
  public void setObject(ObjectEntity object)
150
  {
151
    this.object = object;
152
  }
21 moos 153
 
37 PointedEar 154
  /**
155
   * @return
156
   */
157
  @Column(name = "value", length = 45)
158
  public String getValue()
159
  {
160
    return this.value;
161
  }
21 moos 162
 
37 PointedEar 163
  /**
164
   * @param value
165
   */
166
  public void setValue(String value)
167
  {
168
    this.value = value;
169
  }
21 moos 170
 
37 PointedEar 171
  /**
172
   * @return
173
   */
174
  @Column(name = "comment")
175
  public String getComment()
176
  {
177
    return this.comment;
178
  }
21 moos 179
 
37 PointedEar 180
  /**
181
   * @param comment
182
   */
183
  public void setComment(String comment)
184
  {
185
    this.comment = comment;
186
  }
21 moos 187
 
37 PointedEar 188
  /**
189
   * @return
190
   */
191
  @Temporal(TemporalType.TIMESTAMP)
192
  @Column(name = "date", nullable = false, length = 19)
193
  public Date getDate()
194
  {
195
    return this.date;
196
  }
21 moos 197
 
37 PointedEar 198
  /**
199
   * @param date
200
   */
201
  public void setDate(Date date)
202
  {
203
    this.date = date;
204
  }
21 moos 205
 
206
}