Here you can find the source of isKeyAnInteger(Connection dbConn)
public static boolean isKeyAnInteger(Connection dbConn)
//package com.java2s; //License from project: Open Source License import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; import java.sql.Types; public class Main { public static boolean isKeyAnInteger(Connection dbConn) { Statement stmt = null;/* w w w . j a v a 2s . co m*/ ResultSet rs = null; boolean isInt = false; try { stmt = dbConn.createStatement(); rs = stmt.executeQuery("SELECT Key FROM Indexer LIMIT 1"); int type = rs.getMetaData().getColumnType(1); isInt = type == Types.BIGINT; } catch (Exception e) { } finally { try { if (rs != null) rs.close(); if (stmt != null) stmt.close(); } catch (Exception e) { } } return isInt; } }