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() throws SQLException
getNumber in class AbstractCursor.BigNumberAccessorSQLExceptionpublic BigDecimal getBigDecimal(int scale) throws SQLException
getBigDecimal in interface Cursor.AccessorgetBigDecimal in class AbstractCursor.AccessorImplSQLExceptionpublic BigDecimal getBigDecimal() throws SQLException
getBigDecimal in interface Cursor.AccessorgetBigDecimal in class AbstractCursor.AccessorImplSQLExceptionCopyright © 2012–2016 The Apache Software Foundation. All rights reserved.