public BigDecimal getBigDecimal(int columnIndex, int scale) throws  SQLException { Object obj = getObject(columnIndex); if (obj == null) { return null; } if (obj instanceof BigDecimal) { return (BigDecimal) obj; } if (obj instanceof Number) { return new BigDecimal(((Number) obj).doubleValue()); } if (obj instanceof String) { try { return new BigDecimal((String) obj); } catch (NumberFormatException ex) { throw new SQLException("Number format error"); } } else { throw new SQLException("Illegal type conversion"); }
public BigDecimal getBigDecimal(int columnIndex) throws SQLException { return getField(columnIndex).getBigDecimal();
    public BigDecimal getBigDecimal(int columnIndex, int scale) throws  SQLException {        Object obj = getObject(columnIndex);        if (obj == null) {            return null;        } if (obj instanceof BigDecimal) {            return (BigDecimal) obj;        } if (obj instanceof Number) {            return new BigDecimal(((Number) obj).doubleValue());        } if (obj instanceof String) {            try {                return new BigDecimal((String) obj);            } catch (NumberFormatException ex) {                throw new SQLException("Number format error");            }        } else {            throw new SQLException("Illegal type conversion");        }    }