diff artifacts/src/main/java/org/dive4elements/river/artifacts/services/SedimentLoadInfoService.java @ 8750:69b0a71b4845

(issue1448) Make sq time intervals distinct only for non epoch loads Previously it was random if the loads choosen to be part of the distinct sq time interval loads set were epoch loads or not. This led to wrong results beeing removed in the isEpoch check afterwards.
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 19 Jun 2015 16:35:13 +0200
parents b5cff23bf308
children ef0ec2498dd0
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/SedimentLoadInfoService.java	Mon Jun 08 17:39:51 2015 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/SedimentLoadInfoService.java	Fri Jun 19 16:35:13 2015 +0200
@@ -85,15 +85,13 @@
         log.debug("Requested type: " + type + " with sq_ti_id: " + sq_ti_id);
         Collection <Load> loads;
         if (type.equals("sq_time_intervals")) {
-            loads = allLoadData.findUniqueTimeIntervalLoads(fromD, toD);
+            loads = allLoadData.findDistinctSQTimeIntervalNonEpochLoads(fromD, toD);
 
             for (Iterator<Load> it = loads.iterator(); it.hasNext();) {
                 /* Skip loads without time interval for this info type. */
                 Load cur = it.next();
                 if (cur.getSQRelationTimeIntervalId() == null) {
                     it.remove();
-                } else if (cur.isEpoch()) {
-                    it.remove();
                 }
             }
         } else {

http://dive4elements.wald.intevation.org