comparison 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
comparison
equal deleted inserted replaced
136:2e8d3f552f37 137:d43ff60acda4
2 * 2 *
3 */ 3 */
4 package de.intevation.gnv.geobackend.base; 4 package de.intevation.gnv.geobackend.base;
5 5
6 import java.util.Date; 6 import java.util.Date;
7 import java.util.GregorianCalendar;
7 import java.util.HashMap; 8 import java.util.HashMap;
8 9
9 /** 10 /**
10 * Defaultimplementation of the Interface Result. 11 * Defaultimplementation of the Interface Result.
11 * This Class stores the Attributevalues of one Result. 12 * This Class stores the Attributevalues of one Result.
35 36
36 /** 37 /**
37 * @see de.intevation.gnv.geobackend.base.Result#getDate(java.lang.String) 38 * @see de.intevation.gnv.geobackend.base.Result#getDate(java.lang.String)
38 */ 39 */
39 public Date getDate(String columnName) { 40 public Date getDate(String columnName) {
40 return (Date)this.columnValues.get(columnName); 41 Object o = this.columnValues.get(columnName);
42 if(o instanceof Date){
43 return (Date)o;
44 }else if (o instanceof GregorianCalendar){
45 return ((GregorianCalendar)o).getTime();
46 }else{
47 // TODO FIXME FEHLER finden.
48 return null;
49 }
50
51
41 } 52 }
42 53
43 /** 54 /**
44 * @see de.intevation.gnv.geobackend.base.Result#getDouble(java.lang.String) 55 * @see de.intevation.gnv.geobackend.base.Result#getDouble(java.lang.String)
45 */ 56 */

http://dive4elements.wald.intevation.org