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.HashSet; |
||
6 | import java.util.Set; |
||
7 | import javax.persistence.Column; |
||
8 | import javax.persistence.Entity; |
||
9 | import javax.persistence.FetchType; |
||
10 | import javax.persistence.Id; |
||
11 | import javax.persistence.OneToMany; |
||
12 | import javax.persistence.Table; |
||
13 | import javax.persistence.UniqueConstraint; |
||
14 | |||
15 | /** |
||
16 | * ObjectType generated by hbm2java |
||
17 | */ |
||
18 | @Entity |
||
19 | @Table(name = "object_type", catalog = "webengineering", uniqueConstraints = @UniqueConstraint(columnNames = "name")) |
||
20 | public class ObjectType implements java.io.Serializable { |
||
21 | |||
22 | private int objectTypeId; |
||
23 | private String name; |
||
24 | private Set<Object> objects = new HashSet<Object>(0); |
||
25 | |||
26 | public ObjectType() { |
||
27 | } |
||
28 | |||
29 | public ObjectType(int objectTypeId) { |
||
30 | this.objectTypeId = objectTypeId; |
||
31 | } |
||
32 | |||
33 | public ObjectType(int objectTypeId, String name, Set<Object> objects) { |
||
34 | this.objectTypeId = objectTypeId; |
||
35 | this.name = name; |
||
36 | this.objects = objects; |
||
37 | } |
||
38 | |||
39 | @Id |
||
40 | @Column(name = "object_type_id", unique = true, nullable = false) |
||
41 | public int getObjectTypeId() { |
||
42 | return this.objectTypeId; |
||
43 | } |
||
44 | |||
45 | public void setObjectTypeId(int objectTypeId) { |
||
46 | this.objectTypeId = objectTypeId; |
||
47 | } |
||
48 | |||
49 | @Column(name = "name", unique = true, length = 45) |
||
50 | public String getName() { |
||
51 | return this.name; |
||
52 | } |
||
53 | |||
54 | public void setName(String name) { |
||
55 | this.name = name; |
||
56 | } |
||
57 | |||
58 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "objectType") |
||
59 | public Set<Object> getObjects() { |
||
60 | return this.objects; |
||
61 | } |
||
62 | |||
63 | public void setObjects(Set<Object> objects) { |
||
64 | this.objects = objects; |
||
65 | } |
||
66 | |||
67 | } |