Here you can find the source of mapXSDTypeName2SQLtype(String xsdtype)
public static int mapXSDTypeName2SQLtype(String xsdtype)
//package com.java2s; /*############################################################################## /*from w w w .j a va 2 s .c o m*/ Copyright (C) 2011 HPCC Systems. All rights reserved. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ############################################################################## */ import java.util.HashMap; public class Main { public final static HashMap<String, Integer> mapXSDTypeNameToSQLType = new HashMap<String, Integer>(); public static int mapXSDTypeName2SQLtype(String xsdtype) { xsdtype = xsdtype.toUpperCase(); //let's try to find the type as is if (mapXSDTypeNameToSQLType.containsKey(xsdtype)) return mapXSDTypeNameToSQLType.get(xsdtype); else { //let's try to find it without any namespace information String postfixUpper = xsdtype.substring(xsdtype.lastIndexOf(':') + 1); if (mapXSDTypeNameToSQLType.containsKey(postfixUpper)) return mapXSDTypeNameToSQLType.get(postfixUpper); else return java.sql.Types.OTHER; } } }