Mercurial > dive4elements > river
annotate flys-backend/src/main/java/de/intevation/flys/model/WaterlevelValue.java @ 5152:b26465581abf
Add a configurable path prefix to relative DGM path to allways have an absolute path.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 01 Mar 2013 10:35:38 +0100 |
parents | a65b5b0ade6f |
children |
rev | line source |
---|---|
2842
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.model; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.io.Serializable; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import javax.persistence.Entity; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import javax.persistence.Id; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 import javax.persistence.Table; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 import javax.persistence.GeneratedValue; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import javax.persistence.Column; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 import javax.persistence.SequenceGenerator; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import javax.persistence.GenerationType; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import javax.persistence.JoinColumn; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 import javax.persistence.OneToOne; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 import org.apache.log4j.Logger; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 @Entity |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 @Table(name = "waterlevel_values") |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 public class WaterlevelValue |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 implements Serializable |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 { |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 private static Logger logger = Logger.getLogger(WaterlevelValue.class); |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 private Integer id; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 |
2845
a65b5b0ade6f
Completed the MINFO waterlevel import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2842
diff
changeset
|
29 private WaterlevelQRange qrange; |
2842
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 private Double station; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 private Double w; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 public WaterlevelValue() { |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 } |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 |
2845
a65b5b0ade6f
Completed the MINFO waterlevel import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2842
diff
changeset
|
38 public WaterlevelValue(WaterlevelQRange qrange, Double station, Double w) { |
a65b5b0ade6f
Completed the MINFO waterlevel import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2842
diff
changeset
|
39 this.qrange = qrange; |
2842
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 this.station = station; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 this.w = w; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 } |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 @Id |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 @SequenceGenerator( |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 name = "SEQUENCE_WATERLEVEL_VALUES_ID_SEQ", |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 sequenceName = "WATERLEVEL_VALUES_ID_SEQ", |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 allocationSize = 1) |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 @GeneratedValue( |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 strategy = GenerationType.SEQUENCE, |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 generator = "SEQUENCE_WATERLEVEL_VALUES_ID_SEQ") |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 @Column(name = "id") |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 public Integer getId() { |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 return id; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 } |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 public void setId(Integer id) { |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 this.id = id; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 } |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 @OneToOne |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 @JoinColumn(name = "waterlevel_q_range_id" ) |
2845
a65b5b0ade6f
Completed the MINFO waterlevel import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2842
diff
changeset
|
64 public WaterlevelQRange getQrange() { |
a65b5b0ade6f
Completed the MINFO waterlevel import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2842
diff
changeset
|
65 return qrange; |
2842
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 } |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 |
2845
a65b5b0ade6f
Completed the MINFO waterlevel import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2842
diff
changeset
|
68 public void setQrange(WaterlevelQRange qrange) { |
a65b5b0ade6f
Completed the MINFO waterlevel import.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2842
diff
changeset
|
69 this.qrange = qrange; |
2842
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 } |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 @Column(name = "station") |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 public Double getStation() { |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 return station; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 } |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 public void setStation(Double station) { |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 this.station = station; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 } |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 @Column(name = "w") |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 public Double getW() { |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 return w; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 } |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 public void setW(Double w) { |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 this.w = w; |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 } |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 } |
0d55b7722fae
Added new model classes for MINFO specific waterlevel data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |