changeset 272:05912f0304ac

Added Integer-Support for DoubleValues because the ArcSDE does not read values like -1 as Integer-values. issue45 geo-backend/trunk@276 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Thu, 29 Oct 2009 16:00:45 +0000
parents 8aad9d098b08
children 69ddef25e822
files geo-backend/ChangeLog geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/geo-backend/ChangeLog	Tue Oct 20 09:57:52 2009 +0000
+++ b/geo-backend/ChangeLog	Thu Oct 29 16:00:45 2009 +0000
@@ -1,3 +1,9 @@
+2009-10-29  Tim Englich  <tim.englich@intevation.de>
+
+	* src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java (getInteger): 
+	  Added Integer-Support for DoubleValues because the ArcSDE does 
+	  not read values like -1 as Integer-values. issue45
+
 2009-10-20  Tim Englich  <tim.englich@intevation.de>
 
 	* src/main/java/de/intevation/gnv/geobackend/base/query/QueryExecutorBase.java (QueryExecutorBase),
--- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java	Tue Oct 20 09:57:52 2009 +0000
+++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java	Thu Oct 29 16:00:45 2009 +0000
@@ -91,7 +91,11 @@
     }
 
     public Integer getInteger(int column) {
-        return (Integer)values[column];
+        Object value = values[column];
+        if (value instanceof Double){
+            value = new Integer(((Double)value).intValue());
+        }
+        return (Integer)value;
     }
     /**
      * @see de.intevation.gnv.geobackend.base.Result#getResultDescriptor()

http://dive4elements.wald.intevation.org