Subversion Repositories WebE

Rev

Rev 21 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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