changeset 8240:61fd22f65bd4

(issue1448) Actually filter out not matching sq_time_interval_ids
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 08 Sep 2014 19:48:17 +0200 (2014-09-08)
parents b207eeb66edd
children a65afd85d516 c7ca9c228314
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java	Mon Sep 08 19:47:01 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java	Mon Sep 08 19:48:17 2014 +0200
@@ -16,6 +16,7 @@
 import java.util.List;
 import java.util.TreeMap;
 import java.util.TreeSet;
+import java.util.Iterator;
 
 import org.apache.log4j.Logger;
 
@@ -463,6 +464,15 @@
             }
         });
 
+        /* This may not be the most beautiful thing to do but well,.. */
+        for (Iterator<Load> it = loads.iterator(); it.hasNext();) {
+            Integer obj = it.next().getSQRelationTimeIntervalId();
+            if ((obj == null && sqRelationTimeInterval != null) ||
+                    (obj != null && !obj.equals(sqRelationTimeInterval))) {
+                it.remove();
+            }
+        }
+
         return loads;
     }
 

http://dive4elements.wald.intevation.org