org.axiondb
Interface DataType.ExactNumeric

All Superinterfaces:
java.util.Comparator, DataType, DataType.NonFixedPrecision, java.io.Serializable
All Known Implementing Classes:
BigDecimalType
Enclosing interface:
DataType

public static interface DataType.ExactNumeric
extends DataType.NonFixedPrecision

Extension of NonFixedPrecision to indicate that the scale of the implementing class is not fixed by the implementation, but rather can be declared by the user.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.axiondb.DataType
DataType.BinaryRepresentation, DataType.ExactNumeric, DataType.NonFixedPrecision
 
Method Summary
 DataType.ExactNumeric makeNewInstance(int newPrecision, int newScale)
          Creates a new instance of the implementing ExactNumeric type with the given precision and scale.
 void setScale(int newScale)
          Overrides the default scale with the given value.
 
Methods inherited from interface org.axiondb.DataType.NonFixedPrecision
setPrecision
 
Methods inherited from interface org.axiondb.DataType
accepts, convert, getColumnDisplaySize, getJdbcType, getLiteralPrefix, getLiteralSuffix, getNullableCode, getPrecision, getPrecisionRadix, getPreferredValueClassName, getScale, getSearchableCode, isCaseSensitive, isCurrency, isUnsigned, makeNewInstance, read, successor, supportsSuccessor, toBigDecimal, toBigInteger, toBlob, toBoolean, toByte, toByteArray, toClob, toDate, toDouble, toFloat, toInt, toLong, toShort, toString, toTime, toTimestamp, toURL, write
 
Methods inherited from interface java.util.Comparator
compare, equals
 

Method Detail

setScale

void setScale(int newScale)
Overrides the default scale with the given value.

Parameters:
newScale - new scale value. The appropriate value depends on the current precision and radix - precision can be modified by the user, but the radix is fixed for each implementing type.

makeNewInstance

DataType.ExactNumeric makeNewInstance(int newPrecision,
                                      int newScale)
Creates a new instance of the implementing ExactNumeric type with the given precision and scale.

Parameters:
newPrecision - precision of the new instance
newScale - scale of the new instance
Returns:
new instance of ExactNumeric implementation with the given precision and scale