public class Number extends oracle.sql.NUMBER implements NativeTypeDomainInterface, java.lang.Comparable, KeyAttributeInterface, oracle.sql.ORAData, oracle.jdbc.OracleData, java.io.Serializable
The oracle.jbo.domain.Number domain class is the Java representation of the underlying database type that you must use if you want to exploit the domain feature of Business Components for Java.
| Constructor and Description | 
|---|
Number()
Creates a  
Number Domain object representing zero. | 
Number(java.math.BigDecimal value)
Creates a  
Number Domain object from a
 BigDecimal. | 
Number(java.math.BigInteger value)
Creates a  
Number Domain object from a
 BigInteger. | 
Number(boolean value)
Creates a  
Number Domain object from a Boolean. | 
Number(byte value)
Creates a  
Number Domain object from a byte. | 
Number(byte[] value)
Internal: Applications should not invoke this method. 
 | 
Number(double value)
Creates a  
Number Domain object from an double. | 
Number(java.lang.Double value)
Creates a  
Number Domain object from an Double object. | 
Number(float value)
Creates a  
Number Domain object from an float. | 
Number(int value)
Creates a  
Number Domain object from an int. | 
Number(long value)
Creates a  
Number Domain object from an long. | 
Number(java.lang.Long value)
Creates a  
Number Domain object from an Long object. | 
Number(Number value)
Creates a  
Number identical to an
 existing Number. | 
Number(oracle.sql.NUMBER value)
Creates a  
Number Domain object from an SQL
 NUMBER. | 
Number(java.lang.Object value)
Creates a  
Number Domain object from an arbitrary
 Object. | 
Number(short value)
Creates a  
Number Domain object from an short. | 
Number(java.lang.String value)
Creates a  
Number Domain object from a
 Java String. | 
Number(java.lang.String value,
      int precision)
Creates a  
Number Domain object from a
 Java String. | 
| Modifier and Type | Method and Description | 
|---|---|
oracle.sql.NUMBER | 
abs()
Finds the absolute value of  
this. | 
oracle.sql.NUMBER | 
acos()
Calculates the arc cosine of  
this. | 
Number | 
add(double n)
Adds another number to  
this. | 
Number | 
add(int n)
Adds another number to  
this. | 
Number | 
add(Number n)
Adds another number to  
this. | 
oracle.sql.NUMBER | 
add(oracle.sql.NUMBER n)
Adds another number to  
this. | 
oracle.sql.NUMBER | 
asin()
Calculates the arc sine of  
this. | 
oracle.sql.NUMBER | 
atan()
Calculates the arc tangent of  
this. | 
Number | 
atan2(Number x)
Calculates  
atan(this, x). | 
oracle.sql.NUMBER | 
atan2(oracle.sql.NUMBER x)
Calculates  
atan(this, x). | 
java.math.BigDecimal | 
bigDecimalValue()
Calls NUMBER.bigDecimalValue() to convert internal Oracle Number into a Java 
 BigDecimal. 
 | 
java.math.BigInteger | 
bigIntegerValue()
Calls NUMBER.bigIntegerValue() to convert internal Oracle Number to a Java BigInteger. 
 | 
byte | 
byteValue()
Calls NUMBER.byteValue() to convert internal Oracle Number to a Java byte. 
 | 
oracle.sql.NUMBER | 
ceil()
Finds the ceiling of  
this. | 
int | 
compareTo(double n)
Returns -1 if NUMBER is less than n, 0 if NUMBER and n are equal (==), 
 1 if NUMBER is greater than n. 
 | 
int | 
compareTo(int n)
Returns -1 if NUMBER is less than n, 0 if NUMBER and n are equal (==), 
 1 if NUMBER is greater than n. 
 | 
int | 
compareTo(java.lang.Object n)  | 
oracle.sql.NUMBER | 
cos()
Calculates the cosine of  
this. | 
oracle.sql.NUMBER | 
cosh()
Calculates the hyperbolic cosine of  
this. | 
oracle.sql.NUMBER | 
decrement()
Subtracts  
1 from this. | 
oracle.sql.NUMBER | 
div(java.lang.Number n)  | 
oracle.sql.NUMBER | 
div(oracle.sql.NUMBER n)
Divides  
this by another number. | 
Number | 
divide(double n)
Divides  
this by another number. | 
Number | 
divide(int n)
Divides  
this by another number. | 
Number | 
divide(Number n)
Divides  
this by another number. | 
oracle.sql.NUMBER | 
divide(oracle.sql.NUMBER n)
Divides  
this by another number. | 
boolean | 
equals(java.lang.Object other)
Tests  
this for equality with another object. | 
oracle.sql.NUMBER | 
exp()
Raises  
e to the power of this. | 
oracle.sql.NUMBER | 
floatingPointRound(int precision)
Rounds  
this to a specified precision. | 
oracle.sql.NUMBER | 
floor()
Finds the floor of  
this. | 
static oracle.sql.NUMBER | 
formattedTextToNumber(java.lang.String num,
                     java.lang.String fmt,
                     java.lang.String lang)
Interprets a string as a number. 
 | 
java.math.BigDecimal | 
getBigDecimalValue()
Return a this domain's value as BigDecimal
 This method may be used to access the value for this domain in EL-expressions. 
 | 
java.lang.Object | 
getData()
Internal: Applications should not invoke this method.
 Converts  
this to a JDBC object. | 
static java.lang.Class | 
getNativeClass()  | 
java.lang.Object | 
getNativeObject()  | 
static oracle.sql.ORADataFactory | 
getORADataFactory()
Internal: Applications should not invoke this method. 
 | 
double | 
getValue()
Return a this domain's value as double
 This method may be used to access the value for this domain in EL-expressions. 
 | 
int | 
hashCode()
Computes the hash code. 
 | 
oracle.sql.NUMBER | 
increment()
Adds  
1 to this. | 
int | 
intValue()
Calls NUMBER.intValue() to convert internal Oracle Number to a Java int. 
 | 
oracle.sql.NUMBER | 
ln()
Calculates the natural logarithm of  
this. | 
Number | 
log(double base)
Calculates the log of  
this to the specified base. | 
Number | 
log(int base)
Calculates the log of  
this to the specified base. | 
Number | 
log(Number base)
Calculates the log of  
this to the specified base. | 
oracle.sql.NUMBER | 
log(oracle.sql.NUMBER base)
Calculates the log of  
this to the specified base. | 
long | 
longValue()
Calls NUMBER.longValue() to convert internal Oracle Number to a Java long. 
 | 
static void | 
main(java.lang.String[] argv)
Internal: Applications should not invoke this method. 
 | 
oracle.sql.NUMBER | 
minus(java.lang.Number n)
Calls subtract 
 | 
oracle.sql.NUMBER | 
minus(oracle.sql.NUMBER n)  | 
Number | 
mod(double n)
Calculates the remainder of  
this/n. | 
Number | 
mod(int n)
Calculates the remainder of  
this/n. | 
Number | 
mod(Number n)
Calculates the remainder of  
this/n. | 
oracle.sql.NUMBER | 
mod(oracle.sql.NUMBER n)
Calculates the remainder of  
this/n. | 
oracle.sql.NUMBER | 
mul(java.lang.Number n)
Calls multiply 
 | 
oracle.sql.NUMBER | 
mul(oracle.sql.NUMBER n)
Multiplies  
this by another number. | 
Number | 
multiply(double n)
Multiplies  
this by another number. | 
Number | 
multiply(int n)
Multiplies  
this by another number. | 
Number | 
multiply(Number n)
Multiplies  
this by another number. | 
Number | 
multiply(java.lang.Number n)  | 
oracle.sql.NUMBER | 
multiply(oracle.sql.NUMBER n)
Multiplies  
this by another number. | 
oracle.sql.NUMBER | 
negate()
Calculates  
0 - this. | 
Number | 
plus(Number n)
Calls add 
 | 
Number | 
plus(java.lang.Number n)
Calls add 
 | 
oracle.sql.NUMBER | 
pow(int exp)
Raises  
this to the power of exp. | 
Number | 
pow(Number exp)
Raises  
this to the power of exp. | 
oracle.sql.NUMBER | 
pow(oracle.sql.NUMBER exp)
Raises  
this to the power of exp. | 
oracle.sql.NUMBER | 
round(int decimal_place)
Rounds  
this to a specified precision. | 
oracle.sql.NUMBER | 
scale(int left,
     int right,
     boolean[] big)
Rounds  
this to a specified precision, and tests for excessive
 magnitude. | 
void | 
setContext(DomainOwnerInterface owner,
          Transaction trans,
          java.lang.Object ctx)
Internal: Applications should not invoke this method. 
 | 
oracle.sql.NUMBER | 
shift(int digits)
Shift  
this a specified number of decimal places. | 
short | 
shortValue()
Calls NUMBER.shortValue() to convert internal Oracle Number to a Java short. 
 | 
oracle.sql.NUMBER | 
sin()
Calculates the sine of  
this. | 
oracle.sql.NUMBER | 
sinh()
Calculates the hyperbolic sine of  
this. | 
oracle.sql.NUMBER | 
sqroot()
Calculates the square root of  
this. | 
oracle.sql.NUMBER | 
sub(oracle.sql.NUMBER n)
Subtracts another number from  
this. | 
Number | 
subtract(double n)
Subtracts another number from  
this. | 
Number | 
subtract(int n)
Subtracts another number from  
this. | 
Number | 
subtract(Number n)
Subtracts another number from  
this. | 
oracle.sql.NUMBER | 
subtract(oracle.sql.NUMBER n)
Subtracts another number from  
this. | 
oracle.sql.NUMBER | 
tan()
Calculates the tangent of  
this. | 
oracle.sql.NUMBER | 
tanh()
Calculates the hyperbolic tangent of  
this. | 
static oracle.sql.NUMBER | 
textToPrecisionNumber(java.lang.String num,
                     boolean precflag,
                     int preclen,
                     boolean scaleflag,
                     int scalelen,
                     java.lang.String lang)
Converts a string to a number with specified precision. 
 | 
oracle.sql.Datum | 
toDatum(java.sql.Connection conn)
Internal: Applications should not invoke this method. 
 | 
java.lang.Object | 
toJDBCObject(java.sql.Connection connection)  | 
java.lang.String | 
toString()
For testing purposes only: converts  
this to a fixed-point number presented as a string. | 
oracle.sql.NUMBER | 
truncate(int decimal_place)
Truncates  
this. | 
booleanValue, compareTo, doubleValue, e, floatValue, isConvertibleTo, isInf, isInt, isNegInf, isPosInf, isValid, isZero, ln10, makeJdbcArray, negInf, pi, posInf, sign, stringValue, toBigDecimal, toBigInteger, toBoolean, toByte, toBytes, toBytes, toBytes, toBytes, toBytes, toBytes, toBytes, toBytes, toBytes, toBytes, toBytes, toDouble, toFloat, toFormattedText, toInt, toJdbc, toLong, toShort, toString, toText, zeroasciiStreamValue, binaryStreamValue, bytesEqual, bytesHashCode, characterStreamValue, compareBytes, dateValue, getBytes, getConnectionDuringExceptionHandling, getLength, getStream, isNull, setBytes, setShareBytes, shareBytes, stringValue, timestampValue, timestampValue, timeValue, timeValue, toClassclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBytes, setBytespublic Number()
Number Domain object representing zero.
 Use one of the NullValue() constructors to create
 a null Number object.public Number(byte[] value)
Creates a Number Domain object from the given byte array.
value - a value returned by a previous call to
 getBytes() on an SQL object compatable with
 Number.public Number(byte value)
Number Domain object from a byte.value - an 8-bit signed integer.public Number(int value)
Number Domain object from an int.value - a 32-bit signed integer.public Number(java.lang.Long value)
Number Domain object from an Long object.value - a 32-bit floating-point value.public Number(long value)
Number Domain object from an long.value - a 64-bit signed integer.public Number(short value)
Number Domain object from an short.value - a 16-bit signed integer.public Number(float value)
Number Domain object from an float.value - a 32-bit floating-point value.public Number(double value)
       throws java.sql.SQLException
Number Domain object from an double.value - a 64-bit floating-point value.SQLException - on over/underflow of the exponent
 or on overflow of the mantissa.java.sql.SQLExceptionpublic Number(java.lang.Double value)
       throws java.sql.SQLException
Number Domain object from an Double object.value - a 64-bit floating-point value.SQLException - on over/underflow of the exponent
 or on overflow of the mantissa.java.sql.SQLExceptionpublic Number(java.math.BigDecimal value)
       throws java.sql.SQLException
Number Domain object from a
 BigDecimal.
 Limitations:
BigDecimal distinguishes between 0 and -0.
         This information will be lost in the conversion.
     value - an arbitrarily precise floating-point value.SQLException - on over/underflow of the exponent
 or on overflow of the mantissa.java.sql.SQLExceptionpublic Number(java.math.BigInteger value)
       throws java.sql.SQLException
Number Domain object from a
 BigInteger.value - an arbitrarily integer.SQLException - on overflow.java.sql.SQLExceptionpublic Number(java.lang.String value,
              int precision)
       throws java.sql.SQLException
Number Domain object from a
 Java String.value - a textual representation of a fixed-point number.precision - the maximum length of the string.SQLException - on overflow.NumberFormatException - if value does not represent a 
 valid  BigDecimal value.java.sql.SQLExceptionpublic Number(java.lang.String value)
       throws java.sql.SQLException
Number Domain object from a
 Java String.value - a textual representation of a BigDecimal.SQLException - on over/underflow of the exponentNumberFormatException - if value does not represent a 
 valid  BigDecimal value.java.sql.SQLExceptionpublic Number(boolean value)
Number Domain object from a Boolean.value - true or false.
 The instance is 0 if value is false,
 or 1 otherwise.public Number(java.lang.Object value)
       throws java.sql.SQLException
Number Domain object from an arbitrary
 Object.
 One of the other constructors for Number is invoked,
 depending on the type of the argument.value - an arbitrary object.SQLException - if the called method fails,
 or if the argument's type is not recognized.NumberFormatException - if value does not represent a 
 valid  BigDecimal value.java.sql.SQLExceptionpublic Number(Number value)
Number identical to an
 existing Number.value - a Number Domain object.SQLException - never.public Number(oracle.sql.NUMBER value)
Number Domain object from an SQL
 NUMBER.value - a NUMBER SQL object.SQLException - never.public static oracle.sql.ORADataFactory getORADataFactory()
Initializes the Number Domain.
 This method is invoked when JBO is initialized.
ORADataFactory for the
 Number Domain.public oracle.sql.Datum toDatum(java.sql.Connection conn)
                         throws java.sql.SQLException
Converts this Number Domain object back into an
 SQL NUMBER object.
toDatum in interface oracle.sql.ORADataconn - OracleConnection Not used.Datum containing NUMBER object.SQLException - Never.java.sql.SQLExceptionpublic java.math.BigDecimal getBigDecimalValue()
public java.lang.Object getNativeObject()
getNativeObject in interface NativeTypeDomainInterfacepublic static java.lang.Class getNativeClass()
getNativeClass in interface NativeTypeDomainInterfacepublic double getValue()
public java.lang.Object getData()
this to a JDBC object.getData in interface DomainInterfacepublic void setContext(DomainOwnerInterface owner, Transaction trans, java.lang.Object ctx)
setContext in interface DomainInterfacepublic java.lang.String toString()
this to a fixed-point number presented as a string.toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
this for equality with another object.
 The argument is converted to a Number object, if necessary.equals in class oracle.sql.Datumother - an arbitrary Object.true if conversion was successful and the converted
 argument is identical to this.public int hashCode()
hashCode in class java.lang.Objectthis.public long longValue()
longValue in class oracle.sql.NUMBERpublic int intValue()
intValue in class oracle.sql.NUMBERpublic short shortValue()
shortValue in class oracle.sql.NUMBERpublic byte byteValue()
byteValue in class oracle.sql.NUMBERpublic java.math.BigInteger bigIntegerValue()
bigIntegerValue in class oracle.sql.NUMBERpublic java.math.BigDecimal bigDecimalValue()
bigDecimalValue in class oracle.sql.NUMBERpublic Number add(Number n)
this.n - an SQL number.Number object.public Number add(double n)
this.n - an SQL number.Number object.public Number add(int n)
this.n - an SQL number.Number object.public oracle.sql.NUMBER add(oracle.sql.NUMBER n)
this.add in class oracle.sql.NUMBERn - an SQL number.Number object.java.sql.SQLException - if the Java implementation is not available.public Number subtract(Number n)
this.n - an SQL number.Number object.public Number subtract(double n)
this.n - a double numberNumber object.public Number subtract(int n)
this.n - a int numberNumber object.public oracle.sql.NUMBER subtract(oracle.sql.NUMBER n)
this.n - an SQL number.Number object.public Number multiply(Number n)
this by another number.n - an SQL number.Number object.public Number multiply(java.lang.Number n)
public Number plus(java.lang.Number n)
public Number multiply(double n)
this by another number.n - an SQL number.Number object.public Number multiply(int n)
this by another number.n - an SQL number.Number object.public oracle.sql.NUMBER multiply(oracle.sql.NUMBER n)
this by another number.n - an SQL number.Number object.public Number divide(Number n)
this by another number.n - an SQL number.Number object.public Number divide(double n)
this by another number.n - an SQL number.Number object.public Number divide(int n)
this by another number.n - an SQL number.Number object.public oracle.sql.NUMBER divide(oracle.sql.NUMBER n)
this by another number.n - an SQL number.Number object.public oracle.sql.NUMBER abs()
this.abs in class oracle.sql.NUMBERNumber object.SQLException - if the Java implementation is not available.public oracle.sql.NUMBER acos()
this.acos in class oracle.sql.NUMBERNumber object.public oracle.sql.NUMBER asin()
this.asin in class oracle.sql.NUMBERNumber object.public oracle.sql.NUMBER atan()
this.atan in class oracle.sql.NUMBERNumber object.public Number atan2(Number x)
atan(this, x).x - an SQL number.Number object.public oracle.sql.NUMBER atan2(oracle.sql.NUMBER x)
atan(this, x).atan2 in class oracle.sql.NUMBERx - an SQL number.Number object.java.sql.SQLException - if the Java implementation is not available.public oracle.sql.NUMBER ceil()
this.ceil in class oracle.sql.NUMBERNumber object.public int compareTo(int n)
n - input Oracle Numberpublic int compareTo(java.lang.Object n)
compareTo in interface java.lang.Comparablepublic int compareTo(double n)
n - input Oracle Numberpublic oracle.sql.NUMBER cos()
this.cos in class oracle.sql.NUMBERNumber object.public oracle.sql.NUMBER cosh()
this.cosh in class oracle.sql.NUMBERNumber object.public oracle.sql.NUMBER decrement()
1 from this.decrement in class oracle.sql.NUMBERNumber object.public oracle.sql.NUMBER div(oracle.sql.NUMBER n)
this by another number.div in class oracle.sql.NUMBERn - an SQL number.Number object.public oracle.sql.NUMBER div(java.lang.Number n)
public oracle.sql.NUMBER exp()
e to the power of this.exp in class oracle.sql.NUMBERNumber object.public oracle.sql.NUMBER floatingPointRound(int precision)
this to a specified precision.floatingPointRound in class oracle.sql.NUMBERprecision - the number of significant decimal places.Number object.public oracle.sql.NUMBER floor()
this.floor in class oracle.sql.NUMBERNumber object.public oracle.sql.NUMBER increment()
1 to this.increment in class oracle.sql.NUMBERNumber object.public oracle.sql.NUMBER ln()
this.ln in class oracle.sql.NUMBERNumber object.public Number log(Number base)
this to the specified base.base - an SQL number.Number object.public Number log(double base)
this to the specified base.base - an SQL number.Number object.public Number log(int base)
this to the specified base.base - an SQL number.Number object.public oracle.sql.NUMBER log(oracle.sql.NUMBER base)
this to the specified base.log in class oracle.sql.NUMBERbase - an SQL number.Number object.public Number mod(Number n)
this/n.n - an SQL number.Number object.public Number mod(double n)
this/n.n - an SQL number.Number object.public Number mod(int n)
this/n.n - an SQL number.Number object.public oracle.sql.NUMBER mod(oracle.sql.NUMBER n)
this/n.mod in class oracle.sql.NUMBERn - an SQL number.Number object.public oracle.sql.NUMBER mul(oracle.sql.NUMBER n)
this by another number.mul in class oracle.sql.NUMBERn - an SQL number.Number object.public oracle.sql.NUMBER mul(java.lang.Number n)
public oracle.sql.NUMBER negate()
0 - this.negate in class oracle.sql.NUMBERNumber object.public Number pow(Number exp)
this to the power of exp.exp - an SQL number.Number object.public oracle.sql.NUMBER pow(int exp)
this to the power of exp.pow in class oracle.sql.NUMBERexp - a Java 32-bit integer.Number object.public oracle.sql.NUMBER pow(oracle.sql.NUMBER exp)
this to the power of exp.pow in class oracle.sql.NUMBERexp - a Java 32-bit integer.Number object.public oracle.sql.NUMBER round(int decimal_place)
this to a specified precision.round in class oracle.sql.NUMBERdecimal_place - the number of significant decimal places.public oracle.sql.NUMBER scale(int left,
                               int right,
                               boolean[] big)
this to a specified precision, and tests for excessive
 magnitude.scale in class oracle.sql.NUMBERleft - the maximum number of decimal digits allowed to the left of the
                     decimal point. If this limit is exceeded
                     big is set, but digits are not truncated.right - the maximum number of decimal digits allowed to the right of the
                     decimal point. The result is rounded to this precision.
                     When this parameter is negative digits to the
                     right of the decimal are forced to zero.big - a flag set to true only if the number of
                  digits left of the decimal exceeds left.Number objectSQLException - if the Java implementation is not available.public oracle.sql.NUMBER shift(int digits)
this a specified number of decimal places.
 Positive values shift right, negative values shift left.shift in class oracle.sql.NUMBERdigits - a Java int.public oracle.sql.NUMBER sin()
this.sin in class oracle.sql.NUMBERNumber object.public oracle.sql.NUMBER sinh()
this.sinh in class oracle.sql.NUMBERNumber object.public oracle.sql.NUMBER sqroot()
this.sqroot in class oracle.sql.NUMBERNumber object.public oracle.sql.NUMBER sub(oracle.sql.NUMBER n)
this.sub in class oracle.sql.NUMBERn - an SQL number.Number object.public oracle.sql.NUMBER minus(oracle.sql.NUMBER n)
public oracle.sql.NUMBER minus(java.lang.Number n)
public oracle.sql.NUMBER tan()
this.tan in class oracle.sql.NUMBERNumber object.public oracle.sql.NUMBER tanh()
this.tanh in class oracle.sql.NUMBERNumber object.public oracle.sql.NUMBER truncate(int decimal_place)
this.truncate in class oracle.sql.NUMBERdecimal_place - a Java integer.Number object.public static oracle.sql.NUMBER formattedTextToNumber(java.lang.String num,
                                                      java.lang.String fmt,
                                                      java.lang.String lang)
num - a string representing a numeric value.fmt - a format string [see "Oracle 8 Server Concepts
                        Manual" or "CORE User's Guide Appendix D"]lang - the NLS language the conversion is to be
                        performed in.  If null the default language is used.Number object.public static oracle.sql.NUMBER textToPrecisionNumber(java.lang.String num,
                                                      boolean precflag,
                                                      int preclen,
                                                      boolean scaleflag,
                                                      int scalelen,
                                                      java.lang.String lang)
num - a string representing a numeric value.precflag - a flag indicating that precision restriction
                          should be applied.preclen - the maximum number of the decimal digits the
 result may have, subject to the scale requirement.
 This argument is ignored if precflag is false.
 If the number of digits would otherwise exceed preclen
 the number will be rounded.scaleflag - a flag indicating that the scale restriction should
                          be applied.scalelen - the maximum number of decimal places allowed
 to the right of the decimal point. Negative values are allowed.
 This argument is ignored if scaleflag is false.
 This argument takes precedence over preclen.
 If precision is specified but scale is not, the
 scale is assumed to be 0.lang - the NLS language the conversion is to be
                        performed in.  If null the default language is used.Number object.public static void main(java.lang.String[] argv)
                 throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.Object toJDBCObject(java.sql.Connection connection)
                              throws java.sql.SQLException
toJDBCObject in interface oracle.jdbc.OracleDatajava.sql.SQLException