Here you can find the source of getJDBCTypeName(int value)
public static String getJDBCTypeName(int value)
//package com.java2s; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.sql.Types; import java.util.HashMap; import java.util.Map; public class Main { static Map<Object, String> jdbcTypeValues; public static String getJDBCTypeName(int value) { if (jdbcTypeValues == null) { jdbcTypeValues = new HashMap<Object, String>(); Field[] fields = Types.class.getFields(); for (int i = 0; i < fields.length; i++) { Field field = fields[i]; if (Modifier.isStatic(field.getModifiers())) { try { jdbcTypeValues.put(field.get(Types.class), field.getName()); } catch (IllegalArgumentException e) { // ignore } catch (IllegalAccessException e) { // ignore }//w w w.j a v a 2 s . com } } } String name = (String) jdbcTypeValues.get(new Integer(value)); if (name != null) { return name; } else { return "" + value; //$NON-NLS-1$ } } }