Rev 21 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 21 | Rev 37 | ||
---|---|---|---|
Line 1... | Line 1... | ||
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 static javax.persistence.GenerationType.IDENTITY; |
|
- | 6 | ||
5 | import java.util.HashSet; |
7 | import java.util.HashSet; |
6 | import java.util.Set; |
8 | import java.util.Set; |
- | 9 | ||
7 | import javax.persistence.Column; |
10 | import javax.persistence.Column; |
8 | import javax.persistence.Entity; |
11 | import javax.persistence.Entity; |
9 | import javax.persistence.FetchType; |
12 | import javax.persistence.FetchType; |
10 | import javax.persistence.GeneratedValue; |
13 | import javax.persistence.GeneratedValue; |
11 | import static javax.persistence.GenerationType.IDENTITY; |
- | |
12 | import javax.persistence.Id; |
14 | import javax.persistence.Id; |
13 | import javax.persistence.OneToMany; |
15 | import javax.persistence.OneToMany; |
14 | import javax.persistence.Table; |
16 | import javax.persistence.Table; |
15 | 17 | ||
16 | /**
|
18 | /**
|
17 | * ActionType generated by hbm2java
|
19 | * ActionType generated by hbm2java
|
18 | */
|
20 | */
|
19 | @Entity |
21 | @Entity |
20 | @Table(name = "action_type", catalog = "webengineering") |
22 | @Table(name = "action_type", catalog = "webengineering") |
21 | public class ActionType implements java.io.Serializable { |
23 | public class ActionType implements java.io.Serializable |
- | 24 | {
|
|
- | 25 | /**
|
|
- | 26 | * History action ID for adding an item
|
|
- | 27 | */
|
|
- | 28 | public static final int ADD = 1; |
|
22 | 29 | ||
- | 30 | /**
|
|
- | 31 | * History action ID for renaming a term
|
|
- | 32 | */
|
|
- | 33 | public static final int RENAME = 2; |
|
- | 34 | ||
- | 35 | /**
|
|
- | 36 | * History action ID for modifying a relationship
|
|
- | 37 | */
|
|
- | 38 | public static final int MODIFY = 3; |
|
- | 39 | ||
23 | private Integer id; |
40 | private int id; |
24 | private String name; |
41 | private String name; |
25 | private Set<History> histories = new HashSet<History>(0); |
42 | private Set<History> histories = new HashSet<History>(0); |
26 | 43 | ||
27 | public ActionType() { |
44 | public ActionType() |
- | 45 | {
|
|
- | 46 | }
|
|
- | 47 | ||
- | 48 | /**
|
|
- | 49 | * @param id
|
|
- | 50 | */
|
|
- | 51 | public ActionType(int id) |
|
- | 52 | {
|
|
- | 53 | this.setId(id); |
|
28 | }
|
54 | }
|
29 | 55 | ||
30 | public ActionType(String name, Set<History> histories) { |
56 | public ActionType(String name, Set<History> histories) |
- | 57 | {
|
|
31 | this.name = name; |
58 | this.setName(name); |
32 | this.histories = histories; |
59 | this.setHistories(histories); |
33 | }
|
60 | }
|
34 | 61 | ||
35 | @Id |
62 | @Id |
36 | @GeneratedValue(strategy = IDENTITY) |
63 | @GeneratedValue(strategy = IDENTITY) |
37 | @Column(name = "id", unique = true, nullable = false) |
64 | @Column(name = "id", unique = true, nullable = false) |
38 | public Integer getId() { |
65 | public int getId() |
- | 66 | {
|
|
39 | return this.id; |
67 | return this.id; |
40 | }
|
68 | }
|
41 | 69 | ||
42 | public void setId(Integer id) { |
70 | public void setId(int id) |
- | 71 | {
|
|
43 | this.id = id; |
72 | this.id = id; |
44 | }
|
73 | }
|
45 | 74 | ||
46 | @Column(name = "name", length = 45) |
75 | @Column(name = "name", length = 45) |
47 | public String getName() { |
76 | public String getName() |
- | 77 | {
|
|
48 | return this.name; |
78 | return this.name; |
49 | }
|
79 | }
|
50 | 80 | ||
51 | public void setName(String name) { |
81 | public void setName(String name) |
- | 82 | {
|
|
52 | this.name = name; |
83 | this.name = name; |
53 | }
|
84 | }
|
54 | 85 | ||
55 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "actionType") |
86 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "actionType") |
56 | public Set<History> getHistories() { |
87 | public Set<History> getHistories() |
- | 88 | {
|
|
57 | return this.histories; |
89 | return this.histories; |
58 | }
|
90 | }
|
59 | 91 | ||
60 | public void setHistories(Set<History> histories) { |
92 | public void setHistories(Set<History> histories) |
- | 93 | {
|
|
61 | this.histories = histories; |
94 | this.histories = histories; |
62 | }
|
95 | }
|
63 | 96 | ||
64 | }
|
97 | }
|