annotate flys-backend/src/main/java/de/intevation/flys/model/WaterlevelDifferenceValue.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 @Entity
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
19 @Table(name = "waterlevel_difference_values")
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
20 public class WaterlevelDifferenceValue
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
21 implements Serializable
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
22 {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
23 private static Logger logger =
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
24 Logger.getLogger(WaterlevelDifferenceValue.class);
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
25
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 WaterlevelDifferenceColumn column;
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 value;
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 WaterlevelDifferenceValue() {
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 WaterlevelDifferenceValue(
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
39 WaterlevelDifferenceColumn column,
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
40 Double station,
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
41 Double value
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 this.column = column;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
44 this.station = station;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
45 this.value = value;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
46 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
47
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
48
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
49 @Id
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
50 @SequenceGenerator(
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
51 name = "SEQUENCE_WATERLEVEL_DIFF_VALUES_ID_SEQ",
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
52 sequenceName = "WATERLEVEL_DIFF_VALUES_ID_SEQ",
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
53 allocationSize = 1)
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
54 @GeneratedValue(
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
55 strategy = GenerationType.SEQUENCE,
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
56 generator = "SEQUENCE_WATERLEVEL_DIFF_VALUES_ID_SEQ")
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
57 @Column(name = "id")
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
58 public Integer getId() {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
59 return 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 public void setId(Integer id) {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
63 this.id = id;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
64 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
65
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
66 @OneToOne
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
67 @JoinColumn(name = "column_id" )
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
68 public WaterlevelDifferenceColumn getColumn() {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
69 return column;
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 public void setColumn(WaterlevelDifferenceColumn column) {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
73 this.column = column;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
74 }
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 @Column(name = "station")
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
77 public Double getStation() {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
78 return 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 public void setStation(Double station) {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
82 this.station = station;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
83 }
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 @Column(name = "value")
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
86 public Double getValue() {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
87 return value;
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 public void setValue(Double value) {
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
91 this.value = value;
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
92 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
93 }
fb0a5285fe26 Revert revision 5203
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
94 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org