Rev 21 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 21 | Rev 33 | ||
---|---|---|---|
Line 2... | Line 2... | ||
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.HashSet; |
5 | import java.util.HashSet; |
6 | import java.util.Set; |
6 | import java.util.Set; |
- | 7 | ||
7 | import javax.persistence.Column; |
8 | import javax.persistence.Column; |
8 | import javax.persistence.Entity; |
9 | import javax.persistence.Entity; |
9 | import javax.persistence.FetchType; |
10 | import javax.persistence.FetchType; |
10 | import javax.persistence.Id; |
11 | import javax.persistence.Id; |
11 | import javax.persistence.OneToMany; |
12 | import javax.persistence.OneToMany; |
Line 15... | Line 16... | ||
15 | /**
|
16 | /**
|
16 | * ObjectType generated by hbm2java
|
17 | * ObjectType generated by hbm2java
|
17 | */
|
18 | */
|
18 | @Entity |
19 | @Entity |
19 | @Table(name = "object_type", catalog = "webengineering", uniqueConstraints = @UniqueConstraint(columnNames = "name")) |
20 | @Table(name = "object_type", catalog = "webengineering", uniqueConstraints = @UniqueConstraint(columnNames = "name")) |
20 | public class ObjectType implements java.io.Serializable { |
21 | public class ObjectType implements java.io.Serializable |
- | 22 | {
|
|
- | 23 | /**
|
|
- | 24 | * ObjectEntity type ID for a term
|
|
- | 25 | */
|
|
- | 26 | public static final int TERM = 1; |
|
21 | 27 | ||
22 | private int objectTypeId; |
28 | private int objectTypeId; |
23 | private String name; |
29 | private String name; |
24 | private Set<Object> objects = new HashSet<Object>(0); |
30 | private Set<ObjectEntity> objects = new HashSet<ObjectEntity>(0); |
25 | 31 | ||
26 | public ObjectType() { |
32 | public ObjectType() |
- | 33 | {
|
|
27 | }
|
34 | }
|
28 | 35 | ||
29 | public ObjectType(int objectTypeId) { |
36 | public ObjectType(int objectTypeId) |
- | 37 | {
|
|
30 | this.objectTypeId = objectTypeId; |
38 | this.objectTypeId = objectTypeId; |
31 | }
|
39 | }
|
32 | 40 | ||
33 | public ObjectType(int objectTypeId, String name, Set<Object> objects) { |
41 | public ObjectType(int objectTypeId, String name, Set<ObjectEntity> objects) |
- | 42 | {
|
|
34 | this.objectTypeId = objectTypeId; |
43 | this.objectTypeId = objectTypeId; |
35 | this.name = name; |
44 | this.name = name; |
36 | this.objects = objects; |
45 | this.objects = objects; |
37 | }
|
46 | }
|
38 | 47 | ||
39 | @Id |
48 | @Id |
40 | @Column(name = "object_type_id", unique = true, nullable = false) |
49 | @Column(name = "object_type_id", unique = true, nullable = false) |
41 | public int getObjectTypeId() { |
50 | public int getObjectTypeId() |
- | 51 | {
|
|
42 | return this.objectTypeId; |
52 | return this.objectTypeId; |
43 | }
|
53 | }
|
44 | 54 | ||
45 | public void setObjectTypeId(int objectTypeId) { |
55 | public void setObjectTypeId(int objectTypeId) |
- | 56 | {
|
|
46 | this.objectTypeId = objectTypeId; |
57 | this.objectTypeId = objectTypeId; |
47 | }
|
58 | }
|
48 | 59 | ||
49 | @Column(name = "name", unique = true, length = 45) |
60 | @Column(name = "name", unique = true, length = 45) |
50 | public String getName() { |
61 | public String getName() |
- | 62 | {
|
|
51 | return this.name; |
63 | return this.name; |
52 | }
|
64 | }
|
53 | 65 | ||
54 | public void setName(String name) { |
66 | public void setName(String name) |
- | 67 | {
|
|
55 | this.name = name; |
68 | this.name = name; |
56 | }
|
69 | }
|
57 | 70 | ||
58 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "objectType") |
71 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "objectType") |
59 | public Set<Object> getObjects() { |
72 | public Set<ObjectEntity> getObjects() |
- | 73 | {
|
|
60 | return this.objects; |
74 | return this.objects; |
61 | }
|
75 | }
|
62 | 76 | ||
63 | public void setObjects(Set<Object> objects) { |
77 | public void setObjects(Set<ObjectEntity> objects) |
- | 78 | {
|
|
64 | this.objects = objects; |
79 | this.objects = objects; |
65 | }
|
80 | }
|
66 | 81 | ||
67 | }
|
82 | }
|