comparison geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java @ 272:05912f0304ac

Added Integer-Support for DoubleValues because the ArcSDE does not read values like -1 as Integer-values. issue45 geo-backend/trunk@276 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Thu, 29 Oct 2009 16:00:45 +0000
parents 8aad9d098b08
children 4af6379ac20b
comparison
equal deleted inserted replaced
271:8aad9d098b08 272:05912f0304ac
89 public Integer getInteger(String columnName) { 89 public Integer getInteger(String columnName) {
90 return getInteger(resultDescriptor.getColumnIndex(columnName)); 90 return getInteger(resultDescriptor.getColumnIndex(columnName));
91 } 91 }
92 92
93 public Integer getInteger(int column) { 93 public Integer getInteger(int column) {
94 return (Integer)values[column]; 94 Object value = values[column];
95 if (value instanceof Double){
96 value = new Integer(((Double)value).intValue());
97 }
98 return (Integer)value;
95 } 99 }
96 /** 100 /**
97 * @see de.intevation.gnv.geobackend.base.Result#getResultDescriptor() 101 * @see de.intevation.gnv.geobackend.base.Result#getResultDescriptor()
98 */ 102 */
99 public ResultDescriptor getResultDescriptor() { 103 public ResultDescriptor getResultDescriptor() {

http://dive4elements.wald.intevation.org