Adobe LiveCycle Business Activity Monitoring ES API

com.celequest.api.type
Interface ISQLNumeric

All Superinterfaces:
Comparable, ISQLValue, Serializable
All Known Subinterfaces:
ISQLDecimal, ISQLDouble, ISQLInteger, ISQLLong

public interface ISQLNumeric
extends ISQLValue

SQL "NUMERIC" values.

Since:
2.5.3

Method Summary
 void abs()
          Changes this numeric to an unsigned value.
 void ceil()
          Changes this numeric to the smallest integer greater than or equal to it.
 void floor()
          Changes this numeric to the greatest integer less than or equal to it.
 BigDecimal getBigDecimal()
          Get the value of this numeric as a decimal.
 double getDouble()
          Get the value of this numeric as a double.
 int getInt()
          Get the value of this numeric as an integer.
 long getLong()
          Get the value of this numeric as an integer.
 void round(int n)
          Changes this numeric to its value rounded to n places right of the decimal point.
 void set(BigDecimal v)
          Set the value of this numeric with the specified decimal.
 void set(double v)
          Set the value of this numeric with the specified double.
 void set(int v)
          Set the value of this numeric with the specified integer.
 void set(long v)
          Set the value of this numeric with the specified long.
 int sign()
          Returns an integer indicating the sign of this numeric.
 void trunc(int n)
          Changes this numeric to its value truncated to n places right of the decimal point.
 
Methods inherited from interface com.celequest.api.type.ISQLValue
getString, isNull, set, set, setNull
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

set

public void set(int v)
Set the value of this numeric with the specified integer.

Parameters:
v - an integer value
Throws:
RuntimeException - on overflow

set

public void set(double v)
Set the value of this numeric with the specified double.

Parameters:
v - a double value
Throws:
RuntimeException - on overflow

set

public void set(BigDecimal v)
Set the value of this numeric with the specified decimal.

Parameters:
v - a decimal value
Throws:
RuntimeException - on overflow

set

public void set(long v)
Set the value of this numeric with the specified long.

Parameters:
v - a long value
Throws:
RuntimeException - on overflow

getInt

public int getInt()
Get the value of this numeric as an integer.

Returns:
integer value
Throws:
RuntimeException - on overflow or if value is a SQL NULL

getLong

public long getLong()
Get the value of this numeric as an integer.

Returns:
integer value
Throws:
RuntimeException - on overflow or if value is a SQL NULL

getDouble

public double getDouble()
Get the value of this numeric as a double.

Returns:
double value
Throws:
RuntimeException - on overflow or if value is a SQL NULL

getBigDecimal

public BigDecimal getBigDecimal()
Get the value of this numeric as a decimal.

Returns:
java.math.BigDecimal value
Throws:
RuntimeException - on overflow or if value is a SQL NULL

abs

public void abs()
Changes this numeric to an unsigned value. Nothing is done if the value is a SQL NULL.

Throws:
RuntimeException - iff the value is a SQL NULL

sign

public int sign()
Returns an integer indicating the sign of this numeric.

Returns:
-1 (-ve), 0 (zero) or 1 (+ve).
Throws:
RuntimeException - iff the value is a SQL NULL

floor

public void floor()
Changes this numeric to the greatest integer less than or equal to it.

Throws:
RuntimeException - iff the value is a SQL NULL

ceil

public void ceil()
Changes this numeric to the smallest integer greater than or equal to it.

Throws:
RuntimeException - iff the value is a SQL NULL

trunc

public void trunc(int n)
Changes this numeric to its value truncated to n places right of the decimal point. N can be negative to truncate digits left of the decimal point.

Parameters:
n - number of places to the right of the decimal point
Throws:
RuntimeException - iff the value is a SQL NULL

round

public void round(int n)
Changes this numeric to its value rounded to n places right of the decimal point. N can be negative to round off digits left of the decimal point.

Parameters:
n - number of places to the right of the decimal point
Throws:
RuntimeException - iff the value is a SQL NULL

Adobe LiveCycle Business Activity Monitoring ES API

Copyright © 2004-2007 Adobe Systems Incorporated. All rights reserved.
Copyright © 2002-2007 Celequest Corp. All Rights Reserved.

Take a survey