static class AbstractCursor.NumberAccessor extends AbstractCursor.BigNumberAccessor
Number;
corresponds to Types.NUMERIC.
This is useful when numbers have been translated over JSON. JSON converts a 0L (0 long) value to the string "0" and back to 0 (0 int). So you cannot be sure that the source and target type are the same.
| Modifier and Type | Field and Description |
|---|---|
private int |
scale |
getter| Constructor and Description |
|---|
AbstractCursor.NumberAccessor(AbstractCursor.Getter getter,
int scale) |
| Modifier and Type | Method and Description |
|---|---|
BigDecimal |
getBigDecimal() |
BigDecimal |
getBigDecimal(int scale) |
protected Number |
getNumber() |
getBoolean, getByte, getDouble, getFloat, getInt, getLong, getShortgetArray, getAsciiStream, getBinaryStream, getBlob, getBytes, getCharacterStream, getClob, getDate, getNCharacterStream, getNClob, getNString, getObject, getObject, getObject, getRef, getSQLXML, getString, getStruct, getTime, getTimestamp, getUnicodeStream, getURL, wasNullpublic AbstractCursor.NumberAccessor(AbstractCursor.Getter getter, int scale)
protected Number getNumber()
getNumber in class AbstractCursor.BigNumberAccessorpublic BigDecimal getBigDecimal(int scale)
getBigDecimal in interface Cursor.AccessorgetBigDecimal in class AbstractCursor.AccessorImplpublic BigDecimal getBigDecimal()
getBigDecimal in interface Cursor.AccessorgetBigDecimal in class AbstractCursor.AccessorImplCopyright © 2012–2016 The Apache Software Foundation. All rights reserved.