Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/HYKFlowZoneType.java @ 1210:31d8638760b1
New. The hibernate models
for the HYK structures.
flys-backend/trunk@2336 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 15 Jul 2011 11:12:14 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1209:c12b5fbd33e8 | 1210:31d8638760b1 |
---|---|
1 package de.intevation.flys.model; | |
2 | |
3 import java.io.Serializable; | |
4 | |
5 import javax.persistence.Entity; | |
6 import javax.persistence.Id; | |
7 import javax.persistence.Table; | |
8 import javax.persistence.GeneratedValue; | |
9 import javax.persistence.Column; | |
10 import javax.persistence.SequenceGenerator; | |
11 import javax.persistence.GenerationType; | |
12 | |
13 @Entity | |
14 @Table(name = "hyk_flow_zone_types") | |
15 public class HYKFlowZoneType | |
16 implements Serializable | |
17 { | |
18 private Integer id; | |
19 private String name; | |
20 private String description; | |
21 | |
22 public HYKFlowZoneType() { | |
23 } | |
24 | |
25 public HYKFlowZoneType(String name) { | |
26 this.name = name; | |
27 } | |
28 | |
29 public HYKFlowZoneType(String name, String description) { | |
30 this.name = name; | |
31 this.description = description; | |
32 } | |
33 | |
34 @Id | |
35 @SequenceGenerator( | |
36 name = "SEQUENCE_HYK_FLOW_ZONE_TYPES_ID_SEQ", | |
37 sequenceName = "HYK_FLOW_ZONE_TYPES_ID_SEQ", | |
38 allocationSize = 1) | |
39 @GeneratedValue( | |
40 strategy = GenerationType.SEQUENCE, | |
41 generator = "SEQUENCE_HYK_FLOW_ZONE_TYPES_ID_SEQ") | |
42 @Column(name = "id") | |
43 public Integer getId() { | |
44 return id; | |
45 } | |
46 | |
47 public void setId(Integer id) { | |
48 this.id = id; | |
49 } | |
50 | |
51 @Column(name = "name") | |
52 public String getName() { | |
53 return name; | |
54 } | |
55 | |
56 public void setName(String name) { | |
57 this.name = name; | |
58 } | |
59 | |
60 @Column(name = "description") | |
61 public String getDescription() { | |
62 return description; | |
63 } | |
64 | |
65 public void setDescription(String description) { | |
66 this.description = description; | |
67 } | |
68 } | |
69 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |