diff geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java @ 137:d43ff60acda4

Some little performanceimprofments and Bugfixes geo-backend/trunk@52 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Wed, 09 Sep 2009 15:23:43 +0000
parents 5a583cff97ea
children 2f1b87e1a40c
line wrap: on
line diff
--- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java	Fri Sep 04 14:16:42 2009 +0000
+++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java	Wed Sep 09 15:23:43 2009 +0000
@@ -4,6 +4,7 @@
 package de.intevation.gnv.geobackend.base;
 
 import java.util.Date;
+import java.util.GregorianCalendar;
 import java.util.HashMap;
 
 /**
@@ -37,7 +38,17 @@
      * @see de.intevation.gnv.geobackend.base.Result#getDate(java.lang.String)
      */
     public Date getDate(String columnName) {
-        return (Date)this.columnValues.get(columnName);
+        Object o = this.columnValues.get(columnName);
+        if(o instanceof Date){
+            return (Date)o;
+        }else if (o instanceof GregorianCalendar){
+            return ((GregorianCalendar)o).getTime();
+        }else{
+            // TODO FIXME FEHLER finden.
+            return null;
+        }
+        
+        
     }
 
     /**

http://dive4elements.wald.intevation.org