Subversion Repositories WebE

Rev

Rev 33 | Go to most recent revision | Details | 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 java.util.HashSet;
7
import java.util.Set;
8
import javax.persistence.Column;
9
import javax.persistence.Entity;
10
import javax.persistence.FetchType;
11
import javax.persistence.GeneratedValue;
12
import static javax.persistence.GenerationType.IDENTITY;
13
import javax.persistence.Id;
14
import javax.persistence.JoinColumn;
15
import javax.persistence.ManyToOne;
16
import javax.persistence.OneToMany;
17
import javax.persistence.OneToOne;
18
import javax.persistence.Table;
19
import javax.persistence.Temporal;
20
import javax.persistence.TemporalType;
21
 
22
/**
23
 * Object generated by hbm2java
24
 */
25
@Entity
26
@Table(name = "object", catalog = "webengineering")
27
public class Object implements java.io.Serializable {
28
 
29
        private Integer id;
30
        private User userByEditorId;
31
        private ObjectType objectType;
32
        private User userByOwnerId;
33
        private Date locked;
34
        private Date modified;
35
        private Boolean deleted;
36
        private Term term;
37
        private Set<History> histories = new HashSet<History>(0);
38
        private Relationship relationship;
39
 
40
        public Object() {
41
        }
42
 
43
        public Object(User userByEditorId, ObjectType objectType, User userByOwnerId) {
44
                this.userByEditorId = userByEditorId;
45
                this.objectType = objectType;
46
                this.userByOwnerId = userByOwnerId;
47
        }
48
 
49
        public Object(User userByEditorId, ObjectType objectType,
50
                        User userByOwnerId, Date locked, Date modified, Boolean deleted,
51
                        Term term, Set<History> histories, Relationship relationship) {
52
                this.userByEditorId = userByEditorId;
53
                this.objectType = objectType;
54
                this.userByOwnerId = userByOwnerId;
55
                this.locked = locked;
56
                this.modified = modified;
57
                this.deleted = deleted;
58
                this.term = term;
59
                this.histories = histories;
60
                this.relationship = relationship;
61
        }
62
 
63
        @Id
64
        @GeneratedValue(strategy = IDENTITY)
65
        @Column(name = "id", unique = true, nullable = false)
66
        public Integer getId() {
67
                return this.id;
68
        }
69
 
70
        public void setId(Integer id) {
71
                this.id = id;
72
        }
73
 
74
        @ManyToOne(fetch = FetchType.LAZY)
75
        @JoinColumn(name = "editor_id", nullable = false)
76
        public User getUserByEditorId() {
77
                return this.userByEditorId;
78
        }
79
 
80
        public void setUserByEditorId(User userByEditorId) {
81
                this.userByEditorId = userByEditorId;
82
        }
83
 
84
        @ManyToOne(fetch = FetchType.LAZY)
85
        @JoinColumn(name = "object_type_id", nullable = false)
86
        public ObjectType getObjectType() {
87
                return this.objectType;
88
        }
89
 
90
        public void setObjectType(ObjectType objectType) {
91
                this.objectType = objectType;
92
        }
93
 
94
        @ManyToOne(fetch = FetchType.LAZY)
95
        @JoinColumn(name = "owner_id", nullable = false)
96
        public User getUserByOwnerId() {
97
                return this.userByOwnerId;
98
        }
99
 
100
        public void setUserByOwnerId(User userByOwnerId) {
101
                this.userByOwnerId = userByOwnerId;
102
        }
103
 
104
        @Temporal(TemporalType.TIMESTAMP)
105
        @Column(name = "locked", length = 19)
106
        public Date getLocked() {
107
                return this.locked;
108
        }
109
 
110
        public void setLocked(Date locked) {
111
                this.locked = locked;
112
        }
113
 
114
        @Temporal(TemporalType.TIMESTAMP)
115
        @Column(name = "modified", length = 19)
116
        public Date getModified() {
117
                return this.modified;
118
        }
119
 
120
        public void setModified(Date modified) {
121
                this.modified = modified;
122
        }
123
 
124
        @Column(name = "deleted")
125
        public Boolean getDeleted() {
126
                return this.deleted;
127
        }
128
 
129
        public void setDeleted(Boolean deleted) {
130
                this.deleted = deleted;
131
        }
132
 
133
        @OneToOne(fetch = FetchType.LAZY, mappedBy = "object")
134
        public Term getTerm() {
135
                return this.term;
136
        }
137
 
138
        public void setTerm(Term term) {
139
                this.term = term;
140
        }
141
 
142
        @OneToMany(fetch = FetchType.LAZY, mappedBy = "object")
143
        public Set<History> getHistories() {
144
                return this.histories;
145
        }
146
 
147
        public void setHistories(Set<History> histories) {
148
                this.histories = histories;
149
        }
150
 
151
        @OneToOne(fetch = FetchType.LAZY, mappedBy = "object")
152
        public Relationship getRelationship() {
153
                return this.relationship;
154
        }
155
 
156
        public void setRelationship(Relationship relationship) {
157
                this.relationship = relationship;
158
        }
159
 
160
}