Mercurial > dive4elements > river
annotate flys-backend/src/main/java/de/intevation/flys/model/SedimentYieldValue.java @ 4779:18908a3cbb3a
ImportRiver: Use callback (refactoring), resolving TODOs.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 08 Jan 2013 11:59:01 +0100 |
parents | 8b910e3277b0 |
children |
rev | line source |
---|---|
2837
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.model; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.io.Serializable; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import javax.persistence.Entity; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import javax.persistence.Id; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 import javax.persistence.Table; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 import javax.persistence.GeneratedValue; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import javax.persistence.Column; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 import javax.persistence.SequenceGenerator; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import javax.persistence.GenerationType; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import javax.persistence.JoinColumn; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 import javax.persistence.OneToOne; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 import org.apache.log4j.Logger; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 @Entity |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 @Table(name = "sediment_yield_values") |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 public class SedimentYieldValue |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 implements Serializable |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 { |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 private static Logger logger = Logger.getLogger(SedimentYieldValue.class); |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 private Integer id; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 private SedimentYield sedimentYield; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 private Double station; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 private Double value; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 private Unit unit; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 public SedimentYieldValue() { |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 } |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 public SedimentYieldValue( |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 SedimentYield sedimentYield, |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 Double station, |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 Double value |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 ) { |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 this.sedimentYield = sedimentYield; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 this.station = station; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 this.value = value; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 } |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 @Id |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 @SequenceGenerator( |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 name = "SEQUENCE_SEDIMENT_YIELD_VALuES_ID_SEQ", |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 sequenceName = "SEDIMENT_YIELD_VALUES_ID_SEQ", |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 allocationSize = 1) |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 @GeneratedValue( |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 strategy = GenerationType.SEQUENCE, |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 generator = "SEQUENCE_SEDIMENT_YIELD_VALuES_ID_SEQ") |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 @Column(name = "id") |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 public Integer getId() { |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 return id; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 } |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 public void setId(Integer id) { |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 this.id = id; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 } |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 @OneToOne |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 @JoinColumn(name = "sediment_yield_id" ) |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 public SedimentYield getSedimentYield() { |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 return sedimentYield; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 } |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 public void setSedimentYield(SedimentYield sedimentYield) { |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 this.sedimentYield = sedimentYield; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 } |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 @Column(name="station") |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 public Double getStation() { |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 return station; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 } |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 public void setStation(Double station) { |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 this.station = station; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 } |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 @Column(name = "value") |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 public Double getValue() { |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 return value; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 } |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 public void setValue(Double value) { |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 this.value = value; |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 } |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 } |
8b910e3277b0
Added new model classes for sediment yield data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |