Subversion Repositories WebE

Rev

Rev 33 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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