Here you can find the source of sqlTypeToSqlTypeName(final int type)
public static String sqlTypeToSqlTypeName(final int type)
//package com.java2s; /**//from w w w . j a v a 2s. com * JDBCPersistence framework for java * Copyright (C) 2004-2014 Alex Rojkov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact me by email jdbcpersistence a t gmail d o t com * */ import java.lang.reflect.Field; import java.sql.*; public class Main { public static String sqlTypeToSqlTypeName(final int type) { try { final Integer typeValue = new Integer(type); final Field[] fields = Types.class.getDeclaredFields(); for (int i = 0; i < fields.length; i++) { final Field field = fields[i]; final Integer l = (Integer) field.get(null); if (typeValue.equals(l)) { return field.getName(); } } } catch (IllegalAccessException e) { } return "" + type; } }