Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
8749:c4654863108d | 8750:69b0a71b4845 |
---|---|
83 river); | 83 river); |
84 | 84 |
85 log.debug("Requested type: " + type + " with sq_ti_id: " + sq_ti_id); | 85 log.debug("Requested type: " + type + " with sq_ti_id: " + sq_ti_id); |
86 Collection <Load> loads; | 86 Collection <Load> loads; |
87 if (type.equals("sq_time_intervals")) { | 87 if (type.equals("sq_time_intervals")) { |
88 loads = allLoadData.findUniqueTimeIntervalLoads(fromD, toD); | 88 loads = allLoadData.findDistinctSQTimeIntervalNonEpochLoads(fromD, toD); |
89 | 89 |
90 for (Iterator<Load> it = loads.iterator(); it.hasNext();) { | 90 for (Iterator<Load> it = loads.iterator(); it.hasNext();) { |
91 /* Skip loads without time interval for this info type. */ | 91 /* Skip loads without time interval for this info type. */ |
92 Load cur = it.next(); | 92 Load cur = it.next(); |
93 if (cur.getSQRelationTimeIntervalId() == null) { | 93 if (cur.getSQRelationTimeIntervalId() == null) { |
94 it.remove(); | |
95 } else if (cur.isEpoch()) { | |
96 it.remove(); | 94 it.remove(); |
97 } | 95 } |
98 } | 96 } |
99 } else { | 97 } else { |
100 if (!sq_ti_id.isEmpty()) { | 98 if (!sq_ti_id.isEmpty()) { |