# HG changeset patch # User Tim Englich # Date 1268389742 0 # Node ID 4855667860896278c3b48399bf7383c1c8e00c3f # Parent 3d0c06f996866ee0a66d189cc2b8ca1b81f0936b Added more ClassName identificaton for the different datatypes of the ArcSDE. geo-backend/trunk@761 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 3d0c06f99686 -r 485566786089 geo-backend/ChangeLog --- 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 + + * 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 * src/main/java/de/intevation/gnv/geobackend/sde/datasources/Row.java (getPosValue): diff -r 3d0c06f99686 -r 485566786089 geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/ArcSDEResultSetMetaData.java --- 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(); } /**