/**
   * 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(boolean theValue) {
   setCoreValue(theValue ? ONE : ZERO);
 }
 /**
  * Only to be called when the application sets a value using BigDecimal through setBigDecimal
  * calls.
  */
 public void setBigDecimal(Number theValue) throws StandardException {
   setCoreValue((BigDecimal) theValue);
 }
 /** @see NumberDataValue#setValue */
 public void setValue(float theValue) throws StandardException {
   setCoreValue((double) NumberDataType.normalizeREAL(theValue));
 }
 /**
  * @see NumberDataValue#setValue
  * @exception StandardException Thrown on error
  */
 public void setValue(double theValue) throws StandardException {
   setCoreValue(NumberDataType.normalizeDOUBLE(theValue));
 }
  protected void setFrom(DataValueDescriptor theValue) throws StandardException {

    setCoreValue(SQLDecimal.getBigDecimal(theValue));
  }