comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFactory.java @ 8237:25c3a62863d2

(issue1448) Unify SedimentLoadData ctor again
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 08 Sep 2014 19:00:30 +0200
parents 204905c16ade
children 1fc453fbc5df
comparison
equal deleted inserted replaced
8236:90727aa9913d 8237:25c3a62863d2
171 Integer ms_id = (Integer)row[10]; 171 Integer ms_id = (Integer)row[10];
172 Double ms_station = (Double)row[11]; 172 Double ms_station = (Double)row[11];
173 String ms_type = (String)row[12]; 173 String ms_type = (String)row[12];
174 174
175 if (load == null || load.getId() != sl_id) { 175 if (load == null || load.getId() != sl_id) {
176 if (sq_id == null) { 176 load = new SedimentLoadData.Load(
177 /* Avoid NPE when converting the objects. */ 177 sl_id, sl_kind, sl_description,
178 load = new SedimentLoadData.Load( 178 ti_start_time, ti_stop_time, sq_id,
179 sl_id, sl_kind, sl_description, 179 sq_start_time, sq_stop_time);
180 ti_start_time, ti_stop_time);
181 } else {
182 load = new SedimentLoadData.Load(
183 sl_id, sl_kind, sl_description,
184 ti_start_time, ti_stop_time, sq_id,
185 sq_start_time, sq_stop_time);
186 }
187 180
188 // Grain fractions only change when a new sediment load starts. 181 // Grain fractions only change when a new sediment load starts.
189 grainFractionIndex = 182 grainFractionIndex =
190 SedimentLoadData.grainFractionIndex(gf_name); 183 SedimentLoadData.grainFractionIndex(gf_name);
191 184

http://dive4elements.wald.intevation.org