if (value.unscaledValue().compareTo(MAX_LONG) > 0 || value.unscaledValue().compareTo(MIN_LONG) < 0) throw (SQLException)createException( BIGDECIMAL_CONVERSION_ERROR).fillInStackTrace();
    void setBigDecimal(BigDecimal value) throws SQLException {        value = value.setScale(-field.sqlscale, BigDecimal.ROUND_HALF_UP);        if (isType(field, Types.SMALLINT)) {            long longValue = value.unscaledValue().longValue();            // check if value is withing bounds            if (longValue > MAX_SHORT_VALUE ||                longValue < MIN_SHORT_VALUE)                    throw (SQLException)createException(                        BIGDECIMAL_CONVERSION_ERROR).fillInStackTrace();            field.sqldata = new Short((short)longValue);        } else        if (isType(field, Types.INTEGER)) {            long longValue = value.unscaledValue().longValue();            // check if value is withing bounds            if (longValue > MAX_INT_VALUE ||                longValue < MIN_INT_VALUE)                    throw (SQLException)createException(                        BIGDECIMAL_CONVERSION_ERROR).fillInStackTrace();            field.sqldata = new Integer((int)longValue);        } else        if (isType(field, Types.BIGINT)) {            field.sqldata = new Long(value.unscaledValue().longValue());        } else            throw (SQLException)createException(                BIGDECIMAL_CONVERSION_ERROR).fillInStackTrace();        setNull(false);    }