private static String getKMLType ( int sqlTypeId , String sqlTypeName ) throws SQLException { switch ( sqlTypeId ) { case Types . BOOLEAN : return "bool" ; case Types . DOUBLE : return "double" ; case Types . FLOAT : return "float" ; case Types . INTEGER : case Types . BIGINT : return "int" ; case Types . SMALLINT : return "short" ; case Types . DATE : case Types . VARCHAR : case Types . NCHAR : case Types . CHAR : return "string" ; default : throw new SQLException ( "Field type not supported by KML : " + sqlTypeName ) ; } }
Return the kml type representation from SQL data type