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