changeset 6327:447ed3dee890

Backend: removed scale factor from min/max value determination of gauge Ws.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 13 Jun 2013 13:12:48 +0200
parents 5c880567a020
children 53d08f33d094
files backend/src/main/java/org/dive4elements/river/model/Gauge.java
diffstat 1 files changed, 2 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- 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;
     }
 

http://dive4elements.wald.intevation.org