Here you can find the source of isNumberType(int sqlType)
public static boolean isNumberType(int sqlType)
//package com.java2s; /******************************************************************************* * Copyright (c) 2013 hangum.//from www . j a v a 2 s . c o m * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser Public License v2.1 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * * Contributors: * hangum - initial API and implementation ******************************************************************************/ import java.sql.Types; import java.util.HashMap; import java.util.Map; public class Main { private static Map<String, Integer> mapTypes = new HashMap<String, Integer>(); public static boolean isNumberType(int sqlType) { switch (sqlType) { case Types.BIGINT: case Types.DECIMAL: case Types.DOUBLE: case Types.FLOAT: case Types.INTEGER: case Types.NUMERIC: case Types.BIT: case Types.SMALLINT: case Types.TINYINT: return true; } return false; } public static boolean isNumberType(String rdbType) { return isNumberType(mapTypes.get(rdbType)); } }