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