annotate flys-backend/src/main/java/de/intevation/flys/model/HYKFlowZone.java @ 5202:646c154477fe

SCHEMA CHANGE: removed Waterlevel and WaterleveDifferences, added lookup table for wst
author Tom Gottfried <tom@intevation.de>
date Fri, 08 Mar 2013 12:45:48 +0100
parents 31d8638760b1
children
rev   line source
1210
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.model;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
2
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
3 import java.io.Serializable;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
4
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
5 import java.math.BigDecimal;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
6
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
7 import javax.persistence.Entity;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
8 import javax.persistence.Id;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
9 import javax.persistence.Table;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10 import javax.persistence.GeneratedValue;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
11 import javax.persistence.Column;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
12 import javax.persistence.SequenceGenerator;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
13 import javax.persistence.GenerationType;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
14 import javax.persistence.OneToOne;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
15 import javax.persistence.JoinColumn;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
16
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
17 @Entity
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
18 @Table(name = "hyk_flow_zones")
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
19 public class HYKFlowZone
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
20 implements Serializable
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
21 {
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
22 private Integer id;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
23 private HYKFormation formation;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
24 private HYKFlowZoneType type;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
25 private BigDecimal a;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
26 private BigDecimal b;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
27
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
28 public HYKFlowZone() {
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
29 }
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
30
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
31 public HYKFlowZone(
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
32 HYKFormation formation,
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
33 HYKFlowZoneType type,
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
34 BigDecimal a,
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
35 BigDecimal b
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
36 ) {
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
37 this.formation = formation;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
38 this.type = type;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
39 this.a = a;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
40 this.b = b;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
41 }
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
42
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
43 @Id
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
44 @SequenceGenerator(
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
45 name = "SEQUENCE_HYK_FLOW_ZONES_ID_SEQ",
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
46 sequenceName = "HYK_FLOW_ZONES_ID_SEQ",
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
47 allocationSize = 1)
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
48 @GeneratedValue(
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
49 strategy = GenerationType.SEQUENCE,
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
50 generator = "SEQUENCE_HYK_FLOW_ZONES_ID_SEQ")
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
51 @Column(name = "id")
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
52 public Integer getId() {
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
53 return id;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
54 }
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
55
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
56 public void setId(Integer id) {
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
57 this.id = id;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
58 }
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
59
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
60 @OneToOne
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
61 @JoinColumn(name = "formation_id")
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
62 public HYKFormation getFormation() {
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
63 return formation;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
64 }
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
65
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
66 public void setFormation(HYKFormation formation) {
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
67 this.formation = formation;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
68 }
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
69
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
70 @OneToOne
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
71 @JoinColumn(name = "type_id")
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
72 public HYKFlowZoneType getType() {
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
73 return type;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
74 }
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
75
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
76 public void setType(HYKFlowZoneType type) {
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
77 this.type = type;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
78 }
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
79
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
80 @Column(name = "a")
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
81 public BigDecimal getA() {
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
82 return a;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
83 }
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
84
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
85 public void setA(BigDecimal a) {
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
86 this.a = a;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
87 }
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
88
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
89 @Column(name = "b")
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
90 public BigDecimal getB() {
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
91 return b;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
92 }
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
93
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
94 public void setB(BigDecimal b) {
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
95 this.b = b;
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
96 }
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
97 }
31d8638760b1 New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
98 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org