Mercurial > dive4elements > gnv-client
changeset 877:485566786089
Added more ClassName identificaton for the different datatypes of the ArcSDE.
geo-backend/trunk@761 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 12 Mar 2010 10:29:02 +0000 |
parents | 3d0c06f99686 |
children | 203f95af5b2c |
files | geo-backend/ChangeLog geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/ArcSDEResultSetMetaData.java |
diffstat | 2 files changed, 26 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/geo-backend/ChangeLog Tue Mar 09 11:02:53 2010 +0000 +++ b/geo-backend/ChangeLog Fri Mar 12 10:29:02 2010 +0000 @@ -1,3 +1,11 @@ +2010-03-12 Tim Englich <tim.englich@intevation.de> + + * src/main/java/de/intevation/gnv/geobackend/sde/datasources/ArcSDEResultSetMetaData.java (getColumnClassName): + Added more ClassName identificaton for the different datatypes of the ArcSDE. + Now it is possible to distinguish between Integer, Long, String, Date, + Float and Double Objects. + This is required to get a valid Shape- and WMS-Export. + 2010-03-09 Tim Englich <tim.englich@intevation.de> * src/main/java/de/intevation/gnv/geobackend/sde/datasources/Row.java (getPosValue):
--- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/ArcSDEResultSetMetaData.java Tue Mar 09 11:02:53 2010 +0000 +++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/ArcSDEResultSetMetaData.java Fri Mar 12 10:29:02 2010 +0000 @@ -35,12 +35,25 @@ public String getColumnClassName(int column) throws SQLException { int type = this.getColumnType(column); - Class clazz = java.lang.Object.class; - if (type == 2){ - clazz = int.class; + if (type == ColDefinition.INT16){ + return "Integer"; + }else if (type == ColDefinition.INT32){ + return "Integer"; + }else if (type == ColDefinition.INT64){ + return "Long"; + }else if (type == ColDefinition.NSTRING || type == ColDefinition.STRING){ + return "String"; + }else if (type == ColDefinition.DATE){ + return "Date"; + }else if (type == ColDefinition.FLOAT){ + return "Float"; + }else if (type == ColDefinition.FLOAT32){ + return "Double"; + }else if (type == ColDefinition.FLOAT64){ + return "Double"; + }else{ + return java.lang.Object.class.getName(); } - // TODO weitere Klassen Implementieren - return clazz.getName(); } /**