Mercurial > dive4elements > gnv-client
comparison 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 |
comparison
equal
deleted
inserted
replaced
140:2f1b87e1a40c | 141:b02310d7ffee |
---|---|
14 * This Class stores the Attributevalues of one Result. | 14 * This Class stores the Attributevalues of one Result. |
15 * @author Tim Englich <tim.englich@intevation.de> | 15 * @author Tim Englich <tim.englich@intevation.de> |
16 * | 16 * |
17 */ | 17 */ |
18 public class DefaultResult implements Result { | 18 public class DefaultResult implements Result { |
19 | |
20 /** | |
21 * THE UID of this Classe | |
22 */ | |
23 private static final long serialVersionUID = -6886218808840982766L; | |
24 | |
19 | 25 |
20 /** | 26 /** |
21 * HashMap which stores the Columnvalues identified by the unique Columnname | 27 * HashMap which stores the Columnvalues identified by the unique Columnname |
22 */ | 28 */ |
23 private HashMap<String, Object> columnValues = new HashMap<String, Object>(); | 29 private HashMap<String, Object> columnValues = new HashMap<String, Object>(); |
39 /** | 45 /** |
40 * @see de.intevation.gnv.geobackend.base.Result#getDate(java.lang.String) | 46 * @see de.intevation.gnv.geobackend.base.Result#getDate(java.lang.String) |
41 */ | 47 */ |
42 public Date getDate(String columnName) { | 48 public Date getDate(String columnName) { |
43 Object o = this.columnValues.get(columnName); | 49 Object o = this.columnValues.get(columnName); |
50 Date d = null; | |
44 if(o instanceof Date){ | 51 if(o instanceof Date){ |
45 return (Date)o; | 52 d = (Date)o; |
46 }else if (o instanceof GregorianCalendar){ | 53 }else if (o instanceof GregorianCalendar){ |
47 return ((GregorianCalendar)o).getTime(); | 54 d = ((GregorianCalendar)o).getTime(); |
48 }else{ | |
49 // TODO FIXME FEHLER finden. | |
50 return null; | |
51 } | 55 } |
52 | 56 return d; |
53 | |
54 } | 57 } |
55 | 58 |
56 /** | 59 /** |
57 * @see de.intevation.gnv.geobackend.base.Result#getDouble(java.lang.String) | 60 * @see de.intevation.gnv.geobackend.base.Result#getDouble(java.lang.String) |
58 */ | 61 */ |