Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/HYKFlowZone.java @ 3820:8a75cf0841b1 pre2.7-2012-03-16
merged flys-backend/pre2.7-2012-03-16
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:59 +0200 |
parents | 31d8638760b1 |
children |
comparison
equal
deleted
inserted
replaced
3818:dc18457b1cef | 3820:8a75cf0841b1 |
---|---|
1 package de.intevation.flys.model; | |
2 | |
3 import java.io.Serializable; | |
4 | |
5 import java.math.BigDecimal; | |
6 | |
7 import javax.persistence.Entity; | |
8 import javax.persistence.Id; | |
9 import javax.persistence.Table; | |
10 import javax.persistence.GeneratedValue; | |
11 import javax.persistence.Column; | |
12 import javax.persistence.SequenceGenerator; | |
13 import javax.persistence.GenerationType; | |
14 import javax.persistence.OneToOne; | |
15 import javax.persistence.JoinColumn; | |
16 | |
17 @Entity | |
18 @Table(name = "hyk_flow_zones") | |
19 public class HYKFlowZone | |
20 implements Serializable | |
21 { | |
22 private Integer id; | |
23 private HYKFormation formation; | |
24 private HYKFlowZoneType type; | |
25 private BigDecimal a; | |
26 private BigDecimal b; | |
27 | |
28 public HYKFlowZone() { | |
29 } | |
30 | |
31 public HYKFlowZone( | |
32 HYKFormation formation, | |
33 HYKFlowZoneType type, | |
34 BigDecimal a, | |
35 BigDecimal b | |
36 ) { | |
37 this.formation = formation; | |
38 this.type = type; | |
39 this.a = a; | |
40 this.b = b; | |
41 } | |
42 | |
43 @Id | |
44 @SequenceGenerator( | |
45 name = "SEQUENCE_HYK_FLOW_ZONES_ID_SEQ", | |
46 sequenceName = "HYK_FLOW_ZONES_ID_SEQ", | |
47 allocationSize = 1) | |
48 @GeneratedValue( | |
49 strategy = GenerationType.SEQUENCE, | |
50 generator = "SEQUENCE_HYK_FLOW_ZONES_ID_SEQ") | |
51 @Column(name = "id") | |
52 public Integer getId() { | |
53 return id; | |
54 } | |
55 | |
56 public void setId(Integer id) { | |
57 this.id = id; | |
58 } | |
59 | |
60 @OneToOne | |
61 @JoinColumn(name = "formation_id") | |
62 public HYKFormation getFormation() { | |
63 return formation; | |
64 } | |
65 | |
66 public void setFormation(HYKFormation formation) { | |
67 this.formation = formation; | |
68 } | |
69 | |
70 @OneToOne | |
71 @JoinColumn(name = "type_id") | |
72 public HYKFlowZoneType getType() { | |
73 return type; | |
74 } | |
75 | |
76 public void setType(HYKFlowZoneType type) { | |
77 this.type = type; | |
78 } | |
79 | |
80 @Column(name = "a") | |
81 public BigDecimal getA() { | |
82 return a; | |
83 } | |
84 | |
85 public void setA(BigDecimal a) { | |
86 this.a = a; | |
87 } | |
88 | |
89 @Column(name = "b") | |
90 public BigDecimal getB() { | |
91 return b; | |
92 } | |
93 | |
94 public void setB(BigDecimal b) { | |
95 this.b = b; | |
96 } | |
97 } | |
98 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |