Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/importer/ImportBedHeight.java @ 8560:6fcf4717605f
Meta-data on sounding width associated to bed heights is redundant to real data associated to values.
author | "Tom Gottfried <tom@intevation.de>" |
---|---|
date | Mon, 16 Feb 2015 11:48:05 +0100 |
parents | 6d8d7425a6b5 |
children | 5e38e2924c07 |
comparison
equal
deleted
inserted
replaced
8559:6d8d7425a6b5 | 8560:6fcf4717605f |
---|---|
26 public class ImportBedHeight | 26 public class ImportBedHeight |
27 { | 27 { |
28 private static Logger log = Logger.getLogger(ImportBedHeight.class); | 28 private static Logger log = Logger.getLogger(ImportBedHeight.class); |
29 | 29 |
30 protected Integer year; | 30 protected Integer year; |
31 protected int soundingWidth; | |
32 | 31 |
33 protected String evaluationBy; | 32 protected String evaluationBy; |
34 protected String description; | 33 protected String description; |
35 | 34 |
36 protected ImportRange range; | 35 protected ImportRange range; |
63 this.year = year; | 62 this.year = year; |
64 } | 63 } |
65 | 64 |
66 public void setTimeInterval(ImportTimeInterval timeInterval) { | 65 public void setTimeInterval(ImportTimeInterval timeInterval) { |
67 // do nothing | 66 // do nothing |
68 } | |
69 | |
70 public void setSoundingWidth(int soundingWidth) { | |
71 this.soundingWidth = soundingWidth; | |
72 } | 67 } |
73 | 68 |
74 public void setEvaluationBy(String evaluationBy) { | 69 public void setEvaluationBy(String evaluationBy) { |
75 this.evaluationBy = evaluationBy; | 70 this.evaluationBy = evaluationBy; |
76 } | 71 } |
159 | 154 |
160 Session session = ImporterSession.getInstance().getDatabaseSession(); | 155 Session session = ImporterSession.getInstance().getDatabaseSession(); |
161 | 156 |
162 Query query = session.createQuery( | 157 Query query = session.createQuery( |
163 "from BedHeight where " + | 158 "from BedHeight where " + |
164 "river=:river and year=:year and soundingWidth=:soundingWidth " + | 159 "river=:river and year=:year " + |
165 "and type=:type and locationSystem=:locationSystem and " + | 160 "and type=:type and locationSystem=:locationSystem and " + |
166 "curElevationModel=:curElevationModel and range=:range"); | 161 "curElevationModel=:curElevationModel and range=:range"); |
167 | 162 |
168 query.setParameter("river", river); | 163 query.setParameter("river", river); |
169 query.setParameter("year", year); | 164 query.setParameter("year", year); |
170 query.setParameter("soundingWidth", soundingWidth); | |
171 query.setParameter("type", theType); | 165 query.setParameter("type", theType); |
172 query.setParameter("locationSystem", locationSystem.getPeer()); | 166 query.setParameter("locationSystem", locationSystem.getPeer()); |
173 query.setParameter("curElevationModel", theCurModel); | 167 query.setParameter("curElevationModel", theCurModel); |
174 query.setParameter("range", range.getPeer(river)); | 168 query.setParameter("range", range.getPeer(river)); |
175 | 169 |
178 log.info("Create new BedHeight DB instance."); | 172 log.info("Create new BedHeight DB instance."); |
179 | 173 |
180 peer = new BedHeight( | 174 peer = new BedHeight( |
181 river, | 175 river, |
182 year, | 176 year, |
183 soundingWidth, | |
184 theType, | 177 theType, |
185 locationSystem.getPeer(), | 178 locationSystem.getPeer(), |
186 theCurModel, | 179 theCurModel, |
187 oldElevationModel != null ? oldElevationModel.getPeer() : null, | 180 oldElevationModel != null ? oldElevationModel.getPeer() : null, |
188 range.getPeer(river), | 181 range.getPeer(river), |