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
 
5
import java.util.Date;
6
import javax.persistence.Column;
7
import javax.persistence.Entity;
8
import javax.persistence.FetchType;
9
import javax.persistence.GeneratedValue;
10
import static javax.persistence.GenerationType.IDENTITY;
11
import javax.persistence.Id;
12
import javax.persistence.JoinColumn;
13
import javax.persistence.ManyToOne;
14
import javax.persistence.Table;
15
import javax.persistence.Temporal;
16
import javax.persistence.TemporalType;
17
 
18
/**
19
 * History generated by hbm2java
20
 */
21
@Entity
22
@Table(name = "history", catalog = "webengineering")
23
public class History implements java.io.Serializable {
24
 
25
        private Integer id;
26
        private User user;
27
        private ActionType actionType;
33 PointedEar 28
        private ObjectEntity object;
21 moos 29
        private String value;
30
        private String comment;
31
        private Date date;
32
 
33
        public History() {
34
        }
35
 
33 PointedEar 36
        public History(User user, ActionType actionType, ObjectEntity object, Date date) {
21 moos 37
                this.user = user;
38
                this.actionType = actionType;
39
                this.object = object;
40
                this.date = date;
41
        }
42
 
33 PointedEar 43
        public History(User user, ActionType actionType, ObjectEntity object,
21 moos 44
                        String value, String comment, Date date) {
45
                this.user = user;
46
                this.actionType = actionType;
47
                this.object = object;
48
                this.value = value;
49
                this.comment = comment;
50
                this.date = date;
51
        }
52
 
53
        @Id
54
        @GeneratedValue(strategy = IDENTITY)
55
        @Column(name = "id", unique = true, nullable = false)
56
        public Integer getId() {
57
                return this.id;
58
        }
59
 
60
        public void setId(Integer id) {
61
                this.id = id;
62
        }
63
 
64
        @ManyToOne(fetch = FetchType.LAZY)
65
        @JoinColumn(name = "user_id", nullable = false)
66
        public User getUser() {
67
                return this.user;
68
        }
69
 
70
        public void setUser(User user) {
71
                this.user = user;
72
        }
73
 
74
        @ManyToOne(fetch = FetchType.LAZY)
75
        @JoinColumn(name = "action_type_id", nullable = false)
76
        public ActionType getActionType() {
77
                return this.actionType;
78
        }
79
 
80
        public void setActionType(ActionType actionType) {
81
                this.actionType = actionType;
82
        }
83
 
84
        @ManyToOne(fetch = FetchType.LAZY)
85
        @JoinColumn(name = "objects_id", nullable = false)
33 PointedEar 86
        public ObjectEntity getObject() {
21 moos 87
                return this.object;
88
        }
89
 
33 PointedEar 90
        public void setObject(ObjectEntity object) {
21 moos 91
                this.object = object;
92
        }
93
 
94
        @Column(name = "value", length = 45)
95
        public String getValue() {
96
                return this.value;
97
        }
98
 
99
        public void setValue(String value) {
100
                this.value = value;
101
        }
102
 
103
        @Column(name = "comment")
104
        public String getComment() {
105
                return this.comment;
106
        }
107
 
108
        public void setComment(String comment) {
109
                this.comment = comment;
110
        }
111
 
112
        @Temporal(TemporalType.TIMESTAMP)
113
        @Column(name = "date", nullable = false, length = 19)
114
        public Date getDate() {
115
                return this.date;
116
        }
117
 
118
        public void setDate(Date date) {
119
                this.date = date;
120
        }
121
 
122
}