comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java @ 6740:68c7b5811c4f

Cosmetics, docs, in range of issue1393.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 01 Aug 2013 11:58:25 +0200
parents 1960d55bafb1
children 35f2d32b921d
comparison
equal deleted inserted replaced
6739:be8a5e1911ed 6740:68c7b5811c4f
26 import org.dive4elements.river.backend.SessionHolder; 26 import org.dive4elements.river.backend.SessionHolder;
27 import org.dive4elements.river.model.MeasurementStation; 27 import org.dive4elements.river.model.MeasurementStation;
28 import org.hibernate.SQLQuery; 28 import org.hibernate.SQLQuery;
29 import org.hibernate.Session; 29 import org.hibernate.Session;
30 import org.hibernate.type.StandardBasicTypes; 30 import org.hibernate.type.StandardBasicTypes;
31
31 32
32 /** Pull Sediment Loads out of db. */ 33 /** Pull Sediment Loads out of db. */
33 public class SedimentLoadFactory 34 public class SedimentLoadFactory
34 { 35 {
35 /** Private logger to use here. */ 36 /** Private logger to use here. */
199 cache.put(element); 200 cache.put(element);
200 } 201 }
201 return values; 202 return values;
202 } 203 }
203 204
205 /**
206 * Get a sedimentLoad filled with data from db (or cache).
207 * @param type "epoch","off_epoch" or "single"
208 */
204 public static SedimentLoad getLoadWithData( 209 public static SedimentLoad getLoadWithData(
205 String river, 210 String river,
206 String type, 211 String type,
207 double startKm, 212 double startKm,
208 double endKm, 213 double endKm,
336 } 341 }
337 342
338 /** 343 /**
339 * Get sediment loads from db. 344 * Get sediment loads from db.
340 * @param river the river 345 * @param river the river
341 * @param type the sediment load type (year or epoch) 346 * @param type the sediment load type (year, epoch or off_epoch)
342 * @return according sediment loads. 347 * @return according sediment loads.
343 */ 348 */
344 public static SedimentLoad getSedimentLoadWithDataUncached( 349 public static SedimentLoad getSedimentLoadWithDataUncached(
345 String river, 350 String river,
346 String type, 351 String type,
462 /** 467 /**
463 * Run query with grain parameter set to fraction, feed result into 468 * Run query with grain parameter set to fraction, feed result into
464 * load. 469 * load.
465 * @param fraction value to set 'grain' parameter in query to. 470 * @param fraction value to set 'grain' parameter in query to.
466 * @param query query in which to set 'grain' parameter and run. 471 * @param query query in which to set 'grain' parameter and run.
467 * @param load[out] SedimentLoad which to populate with values. 472 * @param load[out] SedimentLoad which to populate with values. if null
473 * and values are found, return a new load.
468 */ 474 */
469 protected static void getValues ( 475 protected static void getValues (
470 String fraction, 476 String fraction,
471 SQLQuery query, 477 SQLQuery query,
472 SedimentLoad load, 478 SedimentLoad load,

http://dive4elements.wald.intevation.org