org.axiondb.types

Class BigDecimalType

public class BigDecimalType extends BaseNumberDataType implements DataType.ExactNumeric

A DataTyperepresenting an number value.

Version: $Revision: 1.16 $ $Date: 2005/12/22 09:02:31 $

Author: Chuck Burdick Rodney Waldhoff Ahimanikya Satapathy Jonathan Giron

Field Summary
static intDEFAULT_PRECISION
static intDEFAULT_SCALE
static intMAX_PRECISION
static intROUNDING_RULE
Constructor Summary
BigDecimalType()
BigDecimalType(int scale)
BigDecimalType(int precision, int scale)
BigDecimalType(BigDecimal result)
Method Summary
booleanaccepts(Object value)
intcompare(Object a, Object b)
Objectconvert(Object value)
Returns a BigDecimal converted from the given value , or throws IllegalArgumentExceptionif the given value isn't acceptable.
intgetColumnDisplaySize()
protected ComparatorgetComparator()
intgetJdbcType()
intgetPrecision()
StringgetPreferredValueClassName()
intgetScale()
DataTypemakeNewInstance()
DataType.ExactNumericmakeNewInstance(int newPrecision, int newScale)
Objectread(DataInput in)
booleanrequiresRounding(BigDecimal value)
voidsetPrecision(int newPrecision)
voidsetScale(int newScale)
Objectsuccessor(Object value)
booleansupportsSuccessor()
false
StringtoString()
Returns "BigDecimal"
voidwrite(Object value, DataOutput out)

Field Detail

DEFAULT_PRECISION

public static final int DEFAULT_PRECISION

DEFAULT_SCALE

public static final int DEFAULT_SCALE

MAX_PRECISION

public static final int MAX_PRECISION

ROUNDING_RULE

public static final int ROUNDING_RULE

Constructor Detail

BigDecimalType

public BigDecimalType()

BigDecimalType

public BigDecimalType(int scale)

BigDecimalType

public BigDecimalType(int precision, int scale)

BigDecimalType

public BigDecimalType(BigDecimal result)

Method Detail

accepts

public boolean accepts(Object value)

compare

public int compare(Object a, Object b)

convert

public Object convert(Object value)
Returns a BigDecimal converted from the given value , or throws IllegalArgumentExceptionif the given value isn't acceptable.

getColumnDisplaySize

public int getColumnDisplaySize()

getComparator

protected Comparator getComparator()

getJdbcType

public int getJdbcType()

getPrecision

public int getPrecision()

getPreferredValueClassName

public String getPreferredValueClassName()

getScale

public int getScale()

makeNewInstance

public DataType makeNewInstance()

makeNewInstance

public DataType.ExactNumeric makeNewInstance(int newPrecision, int newScale)

read

public Object read(DataInput in)

See Also: BigDecimalType

requiresRounding

public boolean requiresRounding(BigDecimal value)

setPrecision

public void setPrecision(int newPrecision)

setScale

public void setScale(int newScale)

successor

public Object successor(Object value)

supportsSuccessor

public boolean supportsSuccessor()
false

toString

public String toString()
Returns "BigDecimal"

Returns: "BigDecimal"

write

public void write(Object value, DataOutput out)