Mercurial > dive4elements > gnv-client
changeset 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 | 2e8d3f552f37 |
children | c5d50a4bb1e1 |
files | geo-backend/Changelog geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/SDEResultSet.java |
diffstat | 3 files changed, 20 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/geo-backend/Changelog Fri Sep 04 14:16:42 2009 +0000 +++ b/geo-backend/Changelog Wed Sep 09 15:23:43 2009 +0000 @@ -1,3 +1,10 @@ +2009-09-09 Tim Englich <tim.englich@intevation.de> + + * src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java (getDate): + . Intance Check for DateValues + * src/main/java/de/intevation/gnv/geobackend/sde/datasources/SDEResultSet.java (next): + Logging removed because the performance slowdown fetching many ResultSets + 2009-09-04 Tim Englich <tim.englich@intevation.de> * pom.xml: Edited GroupID changed
--- 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; + } + + } /**
--- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/SDEResultSet.java Fri Sep 04 14:16:42 2009 +0000 +++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/SDEResultSet.java Wed Sep 09 15:23:43 2009 +0000 @@ -767,7 +767,7 @@ boolean next = this.mRows.size() > this.cursor; if (next){ - log.debug("Zeile "+(cursor+1)+" von "+this.mRows.size()+" wird angesteuert."); + //log.debug("Zeile "+(cursor+1)+" von "+this.mRows.size()+" wird angesteuert."); this.currentRow = this.mRows.get(this.cursor); this.cursor++; }else{