Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/WaterlevelValue.java @ 2877:f0a67bc0e777 2.7
merged flys-backend/2.7
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:31 +0200 |
parents | a65b5b0ade6f |
children |
comparison
equal
deleted
inserted
replaced
2793:6310b1582f2d | 2877:f0a67bc0e777 |
---|---|
1 package de.intevation.flys.model; | |
2 | |
3 import java.io.Serializable; | |
4 | |
5 import javax.persistence.Entity; | |
6 import javax.persistence.Id; | |
7 import javax.persistence.Table; | |
8 import javax.persistence.GeneratedValue; | |
9 import javax.persistence.Column; | |
10 import javax.persistence.SequenceGenerator; | |
11 import javax.persistence.GenerationType; | |
12 import javax.persistence.JoinColumn; | |
13 import javax.persistence.OneToOne; | |
14 | |
15 import org.apache.log4j.Logger; | |
16 | |
17 | |
18 | |
19 | |
20 @Entity | |
21 @Table(name = "waterlevel_values") | |
22 public class WaterlevelValue | |
23 implements Serializable | |
24 { | |
25 private static Logger logger = Logger.getLogger(WaterlevelValue.class); | |
26 | |
27 private Integer id; | |
28 | |
29 private WaterlevelQRange qrange; | |
30 | |
31 private Double station; | |
32 private Double w; | |
33 | |
34 | |
35 public WaterlevelValue() { | |
36 } | |
37 | |
38 public WaterlevelValue(WaterlevelQRange qrange, Double station, Double w) { | |
39 this.qrange = qrange; | |
40 this.station = station; | |
41 this.w = w; | |
42 } | |
43 | |
44 | |
45 @Id | |
46 @SequenceGenerator( | |
47 name = "SEQUENCE_WATERLEVEL_VALUES_ID_SEQ", | |
48 sequenceName = "WATERLEVEL_VALUES_ID_SEQ", | |
49 allocationSize = 1) | |
50 @GeneratedValue( | |
51 strategy = GenerationType.SEQUENCE, | |
52 generator = "SEQUENCE_WATERLEVEL_VALUES_ID_SEQ") | |
53 @Column(name = "id") | |
54 public Integer getId() { | |
55 return id; | |
56 } | |
57 | |
58 public void setId(Integer id) { | |
59 this.id = id; | |
60 } | |
61 | |
62 @OneToOne | |
63 @JoinColumn(name = "waterlevel_q_range_id" ) | |
64 public WaterlevelQRange getQrange() { | |
65 return qrange; | |
66 } | |
67 | |
68 public void setQrange(WaterlevelQRange qrange) { | |
69 this.qrange = qrange; | |
70 } | |
71 | |
72 @Column(name = "station") | |
73 public Double getStation() { | |
74 return station; | |
75 } | |
76 | |
77 public void setStation(Double station) { | |
78 this.station = station; | |
79 } | |
80 | |
81 @Column(name = "w") | |
82 public Double getW() { | |
83 return w; | |
84 } | |
85 | |
86 public void setW(Double w) { | |
87 this.w = w; | |
88 } | |
89 } | |
90 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |