5208
|
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 @Entity |
|
19 @Table(name = "waterlevel_difference_values") |
|
20 public class WaterlevelDifferenceValue |
|
21 implements Serializable |
|
22 { |
|
23 private static Logger logger = |
|
24 Logger.getLogger(WaterlevelDifferenceValue.class); |
|
25 |
|
26 |
|
27 private Integer id; |
|
28 |
|
29 private WaterlevelDifferenceColumn column; |
|
30 |
|
31 private Double station; |
|
32 private Double value; |
|
33 |
|
34 |
|
35 public WaterlevelDifferenceValue() { |
|
36 } |
|
37 |
|
38 public WaterlevelDifferenceValue( |
|
39 WaterlevelDifferenceColumn column, |
|
40 Double station, |
|
41 Double value |
|
42 ) { |
|
43 this.column = column; |
|
44 this.station = station; |
|
45 this.value = value; |
|
46 } |
|
47 |
|
48 |
|
49 @Id |
|
50 @SequenceGenerator( |
|
51 name = "SEQUENCE_WATERLEVEL_DIFF_VALUES_ID_SEQ", |
|
52 sequenceName = "WATERLEVEL_DIFF_VALUES_ID_SEQ", |
|
53 allocationSize = 1) |
|
54 @GeneratedValue( |
|
55 strategy = GenerationType.SEQUENCE, |
|
56 generator = "SEQUENCE_WATERLEVEL_DIFF_VALUES_ID_SEQ") |
|
57 @Column(name = "id") |
|
58 public Integer getId() { |
|
59 return id; |
|
60 } |
|
61 |
|
62 public void setId(Integer id) { |
|
63 this.id = id; |
|
64 } |
|
65 |
|
66 @OneToOne |
|
67 @JoinColumn(name = "column_id" ) |
|
68 public WaterlevelDifferenceColumn getColumn() { |
|
69 return column; |
|
70 } |
|
71 |
|
72 public void setColumn(WaterlevelDifferenceColumn column) { |
|
73 this.column = column; |
|
74 } |
|
75 |
|
76 @Column(name = "station") |
|
77 public Double getStation() { |
|
78 return station; |
|
79 } |
|
80 |
|
81 public void setStation(Double station) { |
|
82 this.station = station; |
|
83 } |
|
84 |
|
85 @Column(name = "value") |
|
86 public Double getValue() { |
|
87 return value; |
|
88 } |
|
89 |
|
90 public void setValue(Double value) { |
|
91 this.value = value; |
|
92 } |
|
93 } |
|
94 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |