annotate flys-backend/src/main/java/de/intevation/flys/model/WaterlevelValue.java @ 5208:fb0a5285fe26

Revert revision 5203 Those classes are still used in the importer
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 08 Mar 2013 17:13:00 +0100
parents
children
rev   line source
5208
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.model;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
2
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
3 import java.io.Serializable;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
4
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
5 import javax.persistence.Entity;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
6 import javax.persistence.Id;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
7 import javax.persistence.Table;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
8 import javax.persistence.GeneratedValue;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
9 import javax.persistence.Column;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
10 import javax.persistence.SequenceGenerator;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
11 import javax.persistence.GenerationType;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
12 import javax.persistence.JoinColumn;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
13 import javax.persistence.OneToOne;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
14
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
15 import org.apache.log4j.Logger;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
16
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
17
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
18
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
19
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
20 @Entity
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
21 @Table(name = "waterlevel_values")
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
22 public class WaterlevelValue
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
23 implements Serializable
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
24 {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
25 private static Logger logger = Logger.getLogger(WaterlevelValue.class);
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
26
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
27 private Integer id;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
28
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
29 private WaterlevelQRange qrange;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
30
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
31 private Double station;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
32 private Double w;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
33
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
34
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
35 public WaterlevelValue() {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
36 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
37
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
38 public WaterlevelValue(WaterlevelQRange qrange, Double station, Double w) {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
39 this.qrange = qrange;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
40 this.station = station;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
41 this.w = w;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
42 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
43
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
44
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
45 @Id
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
46 @SequenceGenerator(
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
47 name = "SEQUENCE_WATERLEVEL_VALUES_ID_SEQ",
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
48 sequenceName = "WATERLEVEL_VALUES_ID_SEQ",
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
49 allocationSize = 1)
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
50 @GeneratedValue(
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
51 strategy = GenerationType.SEQUENCE,
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
52 generator = "SEQUENCE_WATERLEVEL_VALUES_ID_SEQ")
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
53 @Column(name = "id")
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
54 public Integer getId() {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
55 return id;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
56 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
57
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
58 public void setId(Integer id) {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
59 this.id = id;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
60 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
61
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
62 @OneToOne
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
63 @JoinColumn(name = "waterlevel_q_range_id" )
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
64 public WaterlevelQRange getQrange() {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
65 return qrange;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
66 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
67
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
68 public void setQrange(WaterlevelQRange qrange) {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
69 this.qrange = qrange;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
70 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
71
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
72 @Column(name = "station")
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
73 public Double getStation() {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
74 return station;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
75 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
76
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
77 public void setStation(Double station) {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
78 this.station = station;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
79 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
80
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
81 @Column(name = "w")
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
82 public Double getW() {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
83 return w;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
84 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
85
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
86 public void setW(Double w) {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
87 this.w = w;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
88 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
89 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
90 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org