org.axiondb
Interface DataType.ExactNumeric
- All Superinterfaces:
- Comparator, DataType, DataType.NonFixedPrecision, 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.
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 |
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 |
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 instancenewScale
- scale of the new instance
- Returns:
- new instance of ExactNumeric implementation with the given precision
and scale