changeset 9219:8642a76f22be

Fixed getBedHeights (removed the obsolete km filtering loop)
author mschaefer
date Wed, 04 Jul 2018 10:46:37 +0200
parents 13b764afb536
children e3c2ae1887e8
files backend/src/main/java/org/dive4elements/river/model/BedHeight.java
diffstat 1 files changed, 1 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/model/BedHeight.java	Wed Jul 04 10:36:54 2018 +0200
+++ b/backend/src/main/java/org/dive4elements/river/model/BedHeight.java	Wed Jul 04 10:46:37 2018 +0200
@@ -9,7 +9,6 @@
 package org.dive4elements.river.model;
 
 import java.io.Serializable;
-import java.util.ArrayList;
 import java.util.List;
 
 import javax.persistence.Column;
@@ -219,20 +218,8 @@
         query.setParameter("kmto", kmHi);
 
         final List<BedHeight> singles = query.list();
-        final List<BedHeight> good = new ArrayList<>();
-
-        for (final BedHeight s : singles) {
-            for (final BedHeightValue value : s.getValues()) {
-                final double station = value.getStation().doubleValue();
 
-                if (station >= kmLo && station <= kmHi) {
-                    good.add(s);
-                    break;
-                }
-            }
-        }
-
-        return good;
+        return singles;
     }
 
     public static BedHeight getBedHeightById(final int id) {

http://dive4elements.wald.intevation.org