changeset 8721:1083cb887ffb

(issue1754) Do not filter BedHeightSoundings to range. This is more symetric to WINFO Raw data and fixes the problematic master artifact information loss from issue1754 as the information from the master (range) is no longer required.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 27 Apr 2015 17:35:28 +0200
parents 3d0ef0a66503
children a83d519155ab
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSoundingWidthFacet.java backend/src/main/java/org/dive4elements/river/model/BedHeightValue.java
diffstat 2 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSoundingWidthFacet.java	Mon Apr 27 15:15:44 2015 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSoundingWidthFacet.java	Mon Apr 27 17:35:28 2015 +0200
@@ -43,9 +43,7 @@
                 access.getHeightId());
         List<BedHeightValue> bedheightValues =
             BedHeightValue.getBedHeightValues(
-                single,
-                access.getFrom(true),
-                access.getTo(true));
+                single);
         double[][] values = new double[2][bedheightValues.size()];
         int i = 0;
         for (BedHeightValue bedheightValue : bedheightValues) {
--- a/backend/src/main/java/org/dive4elements/river/model/BedHeightValue.java	Mon Apr 27 15:15:44 2015 +0200
+++ b/backend/src/main/java/org/dive4elements/river/model/BedHeightValue.java	Mon Apr 27 17:35:28 2015 +0200
@@ -140,6 +140,17 @@
         this.soundingWidth = soundingWidth;
     }
 
+    public static List<BedHeightValue> getBedHeightValues(
+        BedHeight single) {
+        Session session = SessionHolder.HOLDER.get();
+
+        Query query = session.createQuery(
+            "from BedHeightValue where bedHeight=:single");
+
+        query.setParameter("single", single);
+        return query.list();
+    }
+
 
     public static List<BedHeightValue> getBedHeightValues(
         BedHeight single,

http://dive4elements.wald.intevation.org