changeset 914:54e83373bfae

We need a wider range to allow arbitrary input formated +-9.99e+-99
author Tom Gottfried <tom@intevation.de>
date Fri, 08 Apr 2016 17:17:06 +0200
parents adc0a47b7b9d
children 9f6b1df4b1e6
files db_schema/lada_schema.sql src/main/java/de/intevation/lada/factory/ProbeFactory.java src/main/java/de/intevation/lada/importer/laf/AttributeMapper.java src/main/java/de/intevation/lada/model/Messwert.java src/main/java/de/intevation/lada/model/ZusatzWert.java src/main/java/de/intevation/lada/validation/rules/messwert/HasMessunsicherheit.java
diffstat 6 files changed, 22 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/db_schema/lada_schema.sql	Fri Apr 08 12:32:34 2016 +0200
+++ b/db_schema/lada_schema.sql	Fri Apr 08 17:17:06 2016 +0200
@@ -302,9 +302,9 @@
     messungs_id integer NOT NULL,
     messgroesse_id integer NOT NULL,
     messwert_nwg character varying(1),
-    messwert real NOT NULL,
+    messwert double precision NOT NULL,
     messfehler real,
-    nwg_zu_messwert real,
+    nwg_zu_messwert double precision,
     meh_id smallint NOT NULL,
     grenzwertueberschreitung boolean DEFAULT false,
     letzte_aenderung timestamp without time zone DEFAULT now()
@@ -495,10 +495,10 @@
     id integer DEFAULT nextval('zusatz_wert_id_seq'::regclass) NOT NULL,
     probe_id integer NOT NULL,
     pzs_id character varying(3) NOT NULL,
-    messwert_pzs real,
+    messwert_pzs double precision,
     messfehler real,
     letzte_aenderung timestamp without time zone DEFAULT now(),
-    nwg_zu_messwert real
+    nwg_zu_messwert double precision
 );
 
 
--- a/src/main/java/de/intevation/lada/factory/ProbeFactory.java	Fri Apr 08 12:32:34 2016 +0200
+++ b/src/main/java/de/intevation/lada/factory/ProbeFactory.java	Fri Apr 08 17:17:06 2016 +0200
@@ -213,7 +213,7 @@
                 LMesswert wert = new LMesswert();
                 wert.setMessgroesseId(mw);
                 wert.setMessungsId(messung.getId());
-                wert.setMesswert(0f);
+                wert.setMesswert(0d);
                 wert.setMehId(1);
                 repository.create(wert, "land");
             }
--- a/src/main/java/de/intevation/lada/importer/laf/AttributeMapper.java	Fri Apr 08 12:32:34 2016 +0200
+++ b/src/main/java/de/intevation/lada/importer/laf/AttributeMapper.java	Fri Apr 08 17:17:06 2016 +0200
@@ -416,8 +416,7 @@
                 wert = wert.substring(2);
                 messwert.setGrenzwertueberschreitung(true);
             }
-            float fWert = Float.valueOf(wert);
-            messwert.setMesswert(fWert);
+            messwert.setMesswert(Double.valueOf(wert));
 
             QueryBuilder<MessEinheit> builder =
                 new QueryBuilder<MessEinheit>(
@@ -552,7 +551,7 @@
             return null;
         }
         wert.setPzsId(zusatz.get(0).getId());
-        wert.setMesswertPzs(Float.valueOf(w));
+        wert.setMesswertPzs(Double.valueOf(w));
         wert.setMessfehler(Float.valueOf(fehler));
         return wert;
     }
@@ -580,7 +579,7 @@
         ndx = v.indexOf(" ");
         String fehler = v.substring(ndx + 2);
         wert.setPzsId(groesse);
-        wert.setMesswertPzs(Float.valueOf(w));
+        wert.setMesswertPzs(Double.valueOf(w));
         wert.setMessfehler(Float.valueOf(fehler));
         return wert;
     }
--- a/src/main/java/de/intevation/lada/model/Messwert.java	Fri Apr 08 12:32:34 2016 +0200
+++ b/src/main/java/de/intevation/lada/model/Messwert.java	Fri Apr 08 17:17:06 2016 +0200
@@ -48,13 +48,13 @@
     @Column(name="messungs_id")
     private Integer messungsId;
 
-    private Float messwert;
+    private Double messwert;
 
     @Column(name="messwert_nwg")
     private String messwertNwg;
 
     @Column(name="nwg_zu_messwert")
-    private Float nwgZuMesswert;
+    private Double nwgZuMesswert;
 
     @Transient
     private boolean owner;
@@ -121,11 +121,11 @@
         this.messungsId = messungsId;
     }
 
-    public Float getMesswert() {
+    public Double getMesswert() {
         return this.messwert;
     }
 
-    public void setMesswert(Float messwert) {
+    public void setMesswert(Double messwert) {
         this.messwert = messwert;
     }
 
@@ -137,11 +137,11 @@
         this.messwertNwg = messwertNwg;
     }
 
-    public Float getNwgZuMesswert() {
+    public Double getNwgZuMesswert() {
         return this.nwgZuMesswert;
     }
 
-    public void setNwgZuMesswert(Float nwgZuMesswert) {
+    public void setNwgZuMesswert(Double nwgZuMesswert) {
         this.nwgZuMesswert = nwgZuMesswert;
     }
 
--- a/src/main/java/de/intevation/lada/model/ZusatzWert.java	Fri Apr 08 12:32:34 2016 +0200
+++ b/src/main/java/de/intevation/lada/model/ZusatzWert.java	Fri Apr 08 17:17:06 2016 +0200
@@ -38,10 +38,10 @@
     private Float messfehler;
 
     @Column(name="messwert_pzs")
-    private Float messwertPzs;
+    private Double messwertPzs;
 
     @Column(name="nwg_zu_messwert")
-    private Float nwgZuMesswert;
+    private Double nwgZuMesswert;
 
     @Column(name="probe_id")
     private Integer probeId;
@@ -82,19 +82,19 @@
         this.messfehler = messfehler;
     }
 
-    public Float getMesswertPzs() {
+    public Double getMesswertPzs() {
         return this.messwertPzs;
     }
 
-    public void setMesswertPzs(Float messwertPzs) {
+    public void setMesswertPzs(Double messwertPzs) {
         this.messwertPzs = messwertPzs;
     }
 
-    public Float getNwgZuMesswert() {
+    public Double getNwgZuMesswert() {
         return this.nwgZuMesswert;
     }
 
-    public void setNwgZuMesswert(Float nwgZuMesswert) {
+    public void setNwgZuMesswert(Double nwgZuMesswert) {
         this.nwgZuMesswert = nwgZuMesswert;
     }
 
--- a/src/main/java/de/intevation/lada/validation/rules/messwert/HasMessunsicherheit.java	Fri Apr 08 12:32:34 2016 +0200
+++ b/src/main/java/de/intevation/lada/validation/rules/messwert/HasMessunsicherheit.java	Fri Apr 08 17:17:06 2016 +0200
@@ -25,8 +25,8 @@
     public Violation execute(Object object) {
         LMesswert messwert = (LMesswert)object;
         Float unsicherheit = messwert.getMessfehler();
-        Float nachweisgrenze = messwert.getNwgZuMesswert();
-        Float wert = messwert.getMesswert();
+        Double nachweisgrenze = messwert.getNwgZuMesswert();
+        Double wert = messwert.getMesswert();
         if (unsicherheit != null && unsicherheit > 0f) {
             return null;
         }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)