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

Make Classes Serializable for Storing in ArtifactDatabase geo-backend/trunk@131 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Thu, 24 Sep 2009 15:24:11 +0000
parents 2f1b87e1a40c
children 1fe93e3c80c0
line wrap: on
line diff
--- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java	Mon Sep 21 15:30:07 2009 +0000
+++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java	Thu Sep 24 15:24:11 2009 +0000
@@ -18,6 +18,12 @@
 public class DefaultResult implements Result {
 
     /**
+     * THE UID of this Classe
+     */
+    private static final long serialVersionUID = -6886218808840982766L;
+
+
+    /**
      * HashMap which stores the Columnvalues identified by the unique Columnname
      */
     private HashMap<String, Object> columnValues = new HashMap<String, Object>();
@@ -41,16 +47,13 @@
      */
     public Date getDate(String columnName) {
         Object o = this.columnValues.get(columnName);
+        Date d = null;
         if(o instanceof Date){
-            return (Date)o;
+            d = (Date)o;
         }else if (o instanceof GregorianCalendar){
-            return ((GregorianCalendar)o).getTime();
-        }else{
-            // TODO FIXME FEHLER finden.
-            return null;
+            d = ((GregorianCalendar)o).getTime();
         }
-        
-        
+        return d;
     }
 
     /**

http://dive4elements.wald.intevation.org