Here you can find the source of getJdbcTypeName(int jdbcType)
public static String getJdbcTypeName(int jdbcType)
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Field; import java.util.HashMap; import java.util.Map; import org.apache.log4j.Logger; public class Main { private static Logger logger = Logger.getLogger("DBUtils"); private static Map map; public static String getJdbcTypeName(int jdbcType) { // Use reflection to populate a map of int values to names if (map != null) return (String) map.get(new Integer(jdbcType)); map = new HashMap(); // Get all field in java.sql.Types Field[] fields = java.sql.Types.class.getFields(); for (int i = 0; i < fields.length; i++) { try { // Get field name and value String name = fields[i].getName(); Integer value = (Integer) fields[i].get(null); // Add to map map.put(value, name);//w w w .jav a2 s . c om } catch (IllegalAccessException e) { logger.error("Could not retrieve value for field..."); } } // Return the JDBC type name return (String) map.get(Integer.valueOf(jdbcType)); } }