Here you can find the source of getObjectType(Object param)
public static int getObjectType(Object param)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; import java.sql.Array; import java.sql.Blob; import java.sql.Clob; import java.sql.Date; import java.sql.Timestamp; import java.sql.Types; public class Main { public static int getObjectType(Object param) { int value = 0; if (param == null) { value = Types.NULL;/*from w w w .j av a 2 s . c o m*/ } else if (param instanceof Integer) { value = Types.INTEGER; } else if (param instanceof String) { value = Types.VARCHAR; } else if (param instanceof Double) { value = Types.DOUBLE; } else if (param instanceof Float) { value = Types.FLOAT; } else if (param instanceof Long) { value = Types.BIGINT; } else if (param instanceof Boolean) { value = Types.BOOLEAN; } else if (param instanceof Date) { value = Types.DATE; } else if (param instanceof Blob) { value = Types.BLOB; } else if (param instanceof byte[]) { value = Types.BLOB; } else if (param instanceof Clob) { value = Types.CLOB; } else if (param instanceof Timestamp) { value = Types.TIMESTAMP; } else if (param instanceof BigDecimal) { value = Types.DECIMAL; } else if (param instanceof Array) { value = Types.ARRAY; } return value; } }