| org.apache.derby.iapi.types.NumberDataValue
All known Subclasses: org.apache.derby.iapi.types.NumberDataType,
Method Summary | |
public NumberDataValue | absolute(NumberDataValue result) The SQL ABSOLUTE operator. | public NumberDataValue | divide(NumberDataValue dividend, NumberDataValue divisor, NumberDataValue result) The SQL / operator. | public NumberDataValue | divide(NumberDataValue dividend, NumberDataValue divisor, NumberDataValue result, int scale) The SQL / operator.
Parameters: dividend - The numerator Parameters: divisor - The denominator Parameters: result - The result of the previous call to this method, nullif not called yet. Parameters: scale - The scale of the result, for decimal type. | public int | getDecimalValuePrecision() Return the SQL precision of this specific DECIMAL value. | public int | getDecimalValueScale() Return the SQL scale of this specific DECIMAL value. | public NumberDataValue | minus(NumberDataValue left, NumberDataValue right, NumberDataValue result) The SQL - operator. | public NumberDataValue | minus(NumberDataValue result) The SQL unary - operator. | public NumberDataValue | mod(NumberDataValue dividend, NumberDataValue divisor, NumberDataValue result) The SQL mod operator. | public NumberDataValue | plus(NumberDataValue addend1, NumberDataValue addend2, NumberDataValue result) The SQL + operator. | public void | setValue(Number theValue) Set the value of this NumberDataValue to the given value.
This is only intended to be called when mapping values from
the Java space into the SQL space, e.g. | public NumberDataValue | sqrt(NumberDataValue result) The SQL SQRT operator. | public NumberDataValue | times(NumberDataValue left, NumberDataValue right, NumberDataValue result) The SQL * operator. |
MAX_DECIMAL_PRECISION_SCALE | final public static int MAX_DECIMAL_PRECISION_SCALE(Code) | | |
MIN_DECIMAL_DIVIDE_SCALE | final public static int MIN_DECIMAL_DIVIDE_SCALE(Code) | | The minimum scale when dividing Decimals
|
absolute | public NumberDataValue absolute(NumberDataValue result) throws StandardException(Code) | | The SQL ABSOLUTE operator. Absolute value of this NumberDataValue.
Parameters: result - The result of the previous call to this method, nullif not called yet. exception: StandardException - Thrown on error, if result is non-null then its value will be unchanged. |
divide | public NumberDataValue divide(NumberDataValue dividend, NumberDataValue divisor, NumberDataValue result, int scale) throws StandardException(Code) | | The SQL / operator.
Parameters: dividend - The numerator Parameters: divisor - The denominator Parameters: result - The result of the previous call to this method, nullif not called yet. Parameters: scale - The scale of the result, for decimal type. If passin value < 0, can calculate it dynamically. dividend / divisor exception: StandardException - Thrown on error, if result is non-null then its value will be unchanged. |
getDecimalValuePrecision | public int getDecimalValuePrecision()(Code) | | Return the SQL precision of this specific DECIMAL value.
This does not match the return from BigDecimal.precision()
added in J2SE 5.0, which represents the precision of the unscaled value.
If the value does not represent a SQL DECIMAL then
the return is undefined.
|
getDecimalValueScale | public int getDecimalValueScale()(Code) | | Return the SQL scale of this specific DECIMAL value.
This does not match the return from BigDecimal.scale()
since in J2SE 5.0 onwards that can return negative scales.
If the value does not represent a SQL DECIMAL then
the return is undefined.
|
setValue | public void setValue(Number theValue) throws StandardException(Code) | | Set the value of this NumberDataValue to the given value.
This is only intended to be called when mapping values from
the Java space into the SQL space, e.g. parameters and return
types from procedures and functions. Each specific type is only
expected to handle the explicit type according the JDBC.
- SMALLINT from java.lang.Integer
- INTEGER from java.lang.Integer
- LONG from java.lang.Long
- FLOAT from java.lang.Float
- DOUBLE from java.lang.Double
- DECIMAL from java.math.BigDecimal
Parameters: theValue - An Number containing the value to set thisNumberDataValue to. Null means set the valueto SQL null. |
sqrt | public NumberDataValue sqrt(NumberDataValue result) throws StandardException(Code) | | The SQL SQRT operator. Sqrt value of this NumberDataValue.
Parameters: result - The result of the previous call to this method, nullif not call yet. exception: StandardException - Thrown on error (a negative number), if result is non-null then its value will be unchanged. |
|
|