Here you can find the source of convertOracleValue(Object value, int type)
public static Object convertOracleValue(Object value, int type)
//package com.java2s; //License from project: Open Source License import java.sql.Types; public class Main { public static Object convertOracleValue(Object value, int type) { String s = value.toString(); if (type == Types.NUMERIC) { if (s.contains(".")) { return Double.valueOf(s); }// w ww .j a va 2s .c o m if (s.length() > 11) { return Long.valueOf(s); } if (s.length() <= 11) { return Integer.valueOf(s); } } if (type == Types.CHAR) { if (s.equals("1")) { return Boolean.TRUE; } else { return Boolean.FALSE; } } return value; } }