Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/importer/ImportBedHeightSingleValue.java @ 8554:3a0522f1a532
Morphological width imported and stored with heights is redundant to table morphologic_width.
author | "Tom Gottfried <tom@intevation.de>" |
---|---|
date | Mon, 16 Feb 2015 09:00:08 +0100 |
parents | e2eb1a110b44 |
children | b5c54a6380e8 |
comparison
equal
deleted
inserted
replaced
8553:17c476e90c07 | 8554:3a0522f1a532 |
---|---|
30 protected Double station; | 30 protected Double station; |
31 protected Double height; | 31 protected Double height; |
32 protected Double uncertainty; | 32 protected Double uncertainty; |
33 protected Double dataGap; | 33 protected Double dataGap; |
34 protected Double soundingWidth; | 34 protected Double soundingWidth; |
35 protected Double width; | |
36 | 35 |
37 protected BedHeightSingleValue peer; | 36 protected BedHeightSingleValue peer; |
38 | 37 |
39 | 38 |
40 public ImportBedHeightSingleValue( | 39 public ImportBedHeightSingleValue( |
41 ImportBedHeightSingle bedHeight, | 40 ImportBedHeightSingle bedHeight, |
42 Double station, | 41 Double station, |
43 Double height, | 42 Double height, |
44 Double uncertainty, | 43 Double uncertainty, |
45 Double dataGap, | 44 Double dataGap, |
46 Double soundingWidth, | 45 Double soundingWidth |
47 Double width | |
48 ) { | 46 ) { |
49 this.bedHeight = bedHeight; | 47 this.bedHeight = bedHeight; |
50 this.station = station; | 48 this.station = station; |
51 this.height = height; | 49 this.height = height; |
52 this.uncertainty = uncertainty; | 50 this.uncertainty = uncertainty; |
53 this.dataGap = dataGap; | 51 this.dataGap = dataGap; |
54 this.soundingWidth = soundingWidth; | 52 this.soundingWidth = soundingWidth; |
55 this.width = width; | |
56 } | 53 } |
57 | 54 |
58 | 55 |
59 public void storeDependencies(BedHeightSingle bedHeight) { | 56 public void storeDependencies(BedHeightSingle bedHeight) { |
60 getPeer(bedHeight); | 57 getPeer(bedHeight); |
74 " bedHeight=:bedHeight and " + | 71 " bedHeight=:bedHeight and " + |
75 " station=:station and " + | 72 " station=:station and " + |
76 " height=:height and " + | 73 " height=:height and " + |
77 " uncertainty=:uncertainty and " + | 74 " uncertainty=:uncertainty and " + |
78 " dataGap=:dataGap and " + | 75 " dataGap=:dataGap and " + |
79 " soundingWidth=:soundingWidth and " + | 76 " soundingWidth=:soundingWidth"); |
80 " width=:width"); | |
81 | 77 |
82 query.setParameter("bedHeight", bedHeight); | 78 query.setParameter("bedHeight", bedHeight); |
83 query.setParameter("station", station); | 79 query.setParameter("station", station); |
84 query.setParameter("height", height); | 80 query.setParameter("height", height); |
85 query.setParameter("uncertainty", uncertainty); | 81 query.setParameter("uncertainty", uncertainty); |
86 query.setParameter("dataGap", dataGap); | 82 query.setParameter("dataGap", dataGap); |
87 query.setParameter("soundingWidth", soundingWidth); | 83 query.setParameter("soundingWidth", soundingWidth); |
88 query.setParameter("width", width); | |
89 | 84 |
90 List<BedHeightSingleValue> values = query.list(); | 85 List<BedHeightSingleValue> values = query.list(); |
91 if (values.isEmpty()) { | 86 if (values.isEmpty()) { |
92 peer = new BedHeightSingleValue( | 87 peer = new BedHeightSingleValue( |
93 bedHeight, | 88 bedHeight, |
94 station, | 89 station, |
95 height, | 90 height, |
96 uncertainty, | 91 uncertainty, |
97 dataGap, | 92 dataGap, |
98 soundingWidth, | 93 soundingWidth |
99 width | |
100 ); | 94 ); |
101 session.save(peer); | 95 session.save(peer); |
102 } | 96 } |
103 else { | 97 else { |
104 peer = values.get(0); | 98 peer = values.get(0); |