[Dive4elements-commits] [PATCH] Backend: removed scale factor from min/max value determination of gauge Ws

Wald Commits scm-commit at wald.intevation.org
Thu Jun 13 13:12:56 CEST 2013


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1371121968 -7200
# Node ID 447ed3dee89031713c2e49fd9e63d717a918645b
# Parent  5c880567a0204566b447b2bc54aa12534f71a090
Backend: removed scale factor from min/max value determination of gauge Ws.

diff -r 5c880567a020 -r 447ed3dee890 backend/src/main/java/org/dive4elements/river/model/Gauge.java
--- a/backend/src/main/java/org/dive4elements/river/model/Gauge.java	Thu Jun 13 12:48:12 2013 +0200
+++ b/backend/src/main/java/org/dive4elements/river/model/Gauge.java	Thu Jun 13 13:12:48 2013 +0200
@@ -40,8 +40,6 @@
 {
     private static final Logger log = Logger.getLogger(Gauge.class);
 
-    public static final int DEFAULT_SCALE = 100;
-
     public static final int MASTER_DISCHARGE_TABLE = 0;
 
     private Integer    id;
@@ -173,21 +171,11 @@
 
 
     /**
-     * Returns min and max W values of this gauge based with a DEFAULT_SCALE.
-     *
-     * @return min and max W value of this gauge [min,max].
-     */
-    public double[] determineMinMaxW() {
-        return determineMinMaxW(DEFAULT_SCALE);
-    }
-
-
-    /**
      * Returns min and max W values of this gauge.
      *
      * @return the min and max W value of this gauge [min,max].
      */
-    public double[] determineMinMaxW(int scale) {
+    public double[] determineMinMaxW() {
         Session session = SessionHolder.HOLDER.get();
 
         List<DischargeTable> tables   = getDischargeTables();
@@ -221,7 +209,7 @@
         BigDecimal b = (BigDecimal)result[1];
 
         return a != null && b != null
-            ? new double [] { a.doubleValue()*scale, b.doubleValue()*scale }
+            ? new double [] { a.doubleValue(), b.doubleValue() }
             : null;
     }
 


More information about the Dive4elements-commits mailing list