/** * Called when setting a DECIMAL value internally or from through a procedure or function. Handles * long in addition to BigDecimal to handle identity being stored as a long but returned as a * DECIMAL. */ public void setValue(Number theValue) throws StandardException { if (SanityManager.ASSERT) { if (theValue != null && !(theValue instanceof java.math.BigDecimal) && !(theValue instanceof java.lang.Long)) SanityManager.THROWASSERT("SQLDecimal.setValue(Number) passed a " + theValue.getClass()); } if (theValue instanceof BigDecimal || theValue == null) setCoreValue((BigDecimal) theValue); else setValue(theValue.longValue()); }
/** @see NumberDataValue#setValue */ public void setValue(int theValue) { setValue((long) theValue); }
/** * Set the value from a correctly typed BigDecimal object. * * @throws StandardException */ void setObject(Object theValue) throws StandardException { setValue((BigDecimal) theValue); }