Mercurial > dive4elements > river
annotate flys-backend/src/main/java/de/intevation/flys/model/BedHeightSingleValue.java @ 4930:28f992c0f937 dami
SCHEMA CHANGES: Add tables for Hochwasserschutzanlagen
This adds the first draft of Hochwasserschutzanlagen tables
hws_points and hws_lines which replace the old hws table and
also lookup tables fed_states and hws_kinds.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 28 Jan 2013 17:42:18 +0100 |
parents | 3bca80af6918 |
children |
rev | line source |
---|---|
2809
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.model; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
2873
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
3 import java.util.List; |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
4 |
2809
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import java.io.Serializable; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import java.math.BigDecimal; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 import javax.persistence.Entity; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import javax.persistence.Id; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 import javax.persistence.Table; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import javax.persistence.GeneratedValue; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import javax.persistence.Column; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 import javax.persistence.SequenceGenerator; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 import javax.persistence.GenerationType; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 import javax.persistence.JoinColumn; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 import javax.persistence.OneToOne; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 import org.apache.log4j.Logger; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 |
2873
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
20 import org.hibernate.Session; |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
21 import org.hibernate.Query; |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
22 |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
23 import de.intevation.flys.backend.SessionHolder; |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
24 |
2809
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 @Entity |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 @Table(name = "bed_height_single_values") |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 public class BedHeightSingleValue |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 implements Serializable |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 private static Logger logger = |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 Logger.getLogger(BedHeightSingleValue.class); |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 private Integer id; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 private BedHeightSingle bedHeight; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 private BigDecimal station; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 private BigDecimal height; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 private BigDecimal uncertainty; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 private BigDecimal dataGap; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 private BigDecimal soundingWidth; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 private BigDecimal width; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 public BedHeightSingleValue() { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 public BedHeightSingleValue( |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 BedHeightSingle bedHeight, |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 BigDecimal station, |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 BigDecimal height, |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 BigDecimal uncertainty, |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 BigDecimal dataGap, |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 BigDecimal soundingWidth, |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 BigDecimal width |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 ) { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 this.bedHeight = bedHeight; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 this.station = station; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 this.height = height; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 this.uncertainty = uncertainty; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 this.dataGap = dataGap; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 this.soundingWidth = soundingWidth; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 this.width = width; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 @Id |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 @SequenceGenerator( |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 name = "SEQUENCE_BED_SINGLE_VALUE_ID_SEQ", |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 sequenceName = "BED_SINGLE_VALUES_ID_SEQ", |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 allocationSize = 1) |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 @GeneratedValue( |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 strategy = GenerationType.SEQUENCE, |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 generator = "SEQUENCE_BED_SINGLE_VALUE_ID_SEQ") |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 @Column(name = "id") |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 public Integer getId() { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 return id; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 public void setId(Integer id) { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 this.id = id; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 @OneToOne |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 @JoinColumn(name = "bed_height_single_id" ) |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 public BedHeightSingle getBedHeight() { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 return bedHeight; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 public void setBedHeight(BedHeightSingle bedHeight) { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 this.bedHeight = bedHeight; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
94 @Column(name = "station") |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 public BigDecimal getStation() { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 return station; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
97 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
98 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
99 public void setStation(BigDecimal station) { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 this.station = station; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
101 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
103 @Column(name = "height") |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
104 public BigDecimal getHeight() { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
105 return height; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
106 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
107 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
108 public void setHeight(BigDecimal height) { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
109 this.height = height; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
110 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
112 @Column(name="uncertainty") |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
113 public BigDecimal getUncertainty() { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
114 return uncertainty; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
115 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
116 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
117 public void setUncertainty(BigDecimal uncertainty) { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
118 this.uncertainty = uncertainty; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
119 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
120 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
121 @Column(name="data_gap") |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
122 public BigDecimal getDataGap() { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
123 return dataGap; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
124 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
125 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
126 public void setDataGap(BigDecimal dataGap) { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
127 this.dataGap = dataGap; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
128 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
129 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
130 @Column(name="sounding_width") |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
131 public BigDecimal getSoundingWidth() { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
132 return soundingWidth; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
133 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
134 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
135 public void setSoundingWidth(BigDecimal soundingWidth) { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
136 this.soundingWidth = soundingWidth; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
137 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
138 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
139 @Column(name="width") |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
140 public BigDecimal getWidth() { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
141 return width; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
142 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
143 |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
144 public void setWidth(BigDecimal width) { |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
145 this.width = width; |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
146 } |
2873
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
147 |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
148 |
2874
3bca80af6918
Fixed a typo.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2873
diff
changeset
|
149 public static List<BedHeightSingleValue> getBedHeightSingleValues( |
2873
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
150 BedHeightSingle single, |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
151 double kmLo, |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
152 double kmHi |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
153 ) { |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
154 Session session = SessionHolder.HOLDER.get(); |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
155 |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
156 Query query = session.createQuery( |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
157 "from BedHeightSingleValue where bedHeight=:single " + |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
158 " and station >= :kmLo and station <= :kmHi"); |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
159 |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
160 query.setParameter("single", single); |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
161 query.setParameter("kmLo", new BigDecimal(kmLo)); |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
162 query.setParameter("kmHi", new BigDecimal(kmHi)); |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
163 |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
164 return query.list(); |
1894e0471eac
Added functions to retrieve bed height single and epoch values based on its owner and km range.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2809
diff
changeset
|
165 } |
2809
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
166 } |
f283212966e8
Finished work on MINFO bed heights (single).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
167 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |