Package org.spincast.plugins.jdbc
Interface SpincastResultSet
- All Superinterfaces:
AutoCloseable
,ResultSet
,Wrapper
- All Known Implementing Classes:
SpincastResultSetDefault
Resultset that adds a "getXXXOrNull()"
method for every primitive types.
By default, Jdbc will return 0 when a value is
null and "getInt()" or "getLong()" is used, for example.
Also add some new getters.
-
Field Summary
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getBoolean
(int columnIndex) Deprecated.boolean
getBoolean
(String columnLabel) Deprecated.boolean
getBooleanOrFalse
(int columnIndex) Returnsfalse
whennull
.boolean
getBooleanOrFalse
(String columnLabel) Returnsfalse
whennull
.getBooleanOrNull
(int columnIndex) Returnsnull
when null, notfalse
as JDBC does by default!getBooleanOrNull
(String columnLabel) Returnsnull
when null, notfalse
as JDBC does by default!byte
getByte
(int columnIndex) Deprecated.byte
Deprecated.getByteOrNull
(int columnIndex) Returnsnull
when null, not0
as JDBC does by default!getByteOrNull
(String columnLabel) Returnsnull
when null, not0
as JDBC does by default!getByteOrZero
(int columnIndex) Returns0
when null.getByteOrZero
(String columnLabel) Returns0
when null.double
getDouble
(int columnIndex) Deprecated.double
Deprecated.getDoubleOrNull
(int columnIndex) Returnsnull
when null, not0
as JDBC does by default!getDoubleOrNull
(String columnLabel) Returnsnull
when null, not0
as JDBC does by default!getDoubleOrZero
(int columnIndex) Returns0
when null.getDoubleOrZero
(String columnLabel) Returns0
when null.float
getFloat
(int columnIndex) Deprecated.float
Deprecated.getFloatOrNull
(int columnIndex) Returnsnull
when null, not0
as JDBC does by default!getFloatOrNull
(String columnLabel) Returnsnull
when null, not0
as JDBC does by default!getFloatOrZero
(int columnIndex) Returns0
when null.getFloatOrZero
(String columnLabel) Returns0
when null.getInstant
(int columnIndex) Returns anInstant
from aTIMESTAMP WITH TIME ZONE
(ie: "TIMESTAMPTZ") column.getInstant
(String columnLabel) Returns anInstant
from aTIMESTAMP WITH TIME ZONE
(ie: "TIMESTAMPTZ") column.int
getInt
(int columnIndex) Deprecated.int
Deprecated.getIntegerOrNull
(int columnIndex) Returnsnull
when null, not0
as JDBC does by default!getIntegerOrNull
(String columnLabel) Returnsnull
when null, not0
as JDBC does by default!getIntegerOrZero
(int columnIndex) Returns0
when null.getIntegerOrZero
(String columnLabel) Returns0
when null.long
getLong
(int columnIndex) Deprecated.long
Deprecated.getLongOrNull
(int columnIndex) Returnsnull
when null, not0
as JDBC does by default!getLongOrNull
(String columnLabel) Returnsnull
when null, not0
as JDBC does by default!getLongOrZero
(int columnIndex) Returns0
when null.getLongOrZero
(String columnLabel) Returns0
when null.short
getShort
(int columnIndex) Deprecated.short
Deprecated.getShortOrNull
(int columnIndex) Returnsnull
when null, not0
as JDBC does by default!getShortOrNull
(String columnLabel) Returnsnull
when null, not0
as JDBC does by default!getShortOrZero
(int columnIndex) Returns0
when null.getShortOrZero
(String columnLabel) Returns0
when null.Methods inherited from interface java.sql.ResultSet
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getFetchDirection, getFetchSize, getHoldability, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getRowId, getRowId, getSQLXML, getSQLXML, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Method Details
-
getBooleanOrNull
Returnsnull
when null, notfalse
as JDBC does by default!- Throws:
SQLException
-
getBooleanOrNull
Returnsnull
when null, notfalse
as JDBC does by default!- Throws:
SQLException
-
getBooleanOrFalse
Returnsfalse
whennull
.- Throws:
SQLException
-
getBooleanOrFalse
Returnsfalse
whennull
.- Throws:
SQLException
-
getByteOrNull
Returnsnull
when null, not0
as JDBC does by default!- Throws:
SQLException
-
getByteOrNull
Returnsnull
when null, not0
as JDBC does by default!- Throws:
SQLException
-
getByteOrZero
Returns0
when null.- Throws:
SQLException
-
getByteOrZero
Returns0
when null.- Throws:
SQLException
-
getShortOrNull
Returnsnull
when null, not0
as JDBC does by default!- Throws:
SQLException
-
getShortOrNull
Returnsnull
when null, not0
as JDBC does by default!- Throws:
SQLException
-
getShortOrZero
Returns0
when null.- Throws:
SQLException
-
getShortOrZero
Returns0
when null.- Throws:
SQLException
-
getIntegerOrNull
Returnsnull
when null, not0
as JDBC does by default!- Throws:
SQLException
-
getIntegerOrNull
Returnsnull
when null, not0
as JDBC does by default!- Throws:
SQLException
-
getIntegerOrZero
Returns0
when null.- Throws:
SQLException
-
getIntegerOrZero
Returns0
when null.- Throws:
SQLException
-
getLongOrNull
Returnsnull
when null, not0
as JDBC does by default!- Throws:
SQLException
-
getLongOrNull
Returnsnull
when null, not0
as JDBC does by default!- Throws:
SQLException
-
getLongOrZero
Returns0
when null.- Throws:
SQLException
-
getLongOrZero
Returns0
when null.- Throws:
SQLException
-
getFloatOrNull
Returnsnull
when null, not0
as JDBC does by default!- Throws:
SQLException
-
getFloatOrNull
Returnsnull
when null, not0
as JDBC does by default!- Throws:
SQLException
-
getFloatOrZero
Returns0
when null.- Throws:
SQLException
-
getFloatOrZero
Returns0
when null.- Throws:
SQLException
-
getDoubleOrNull
Returnsnull
when null, not0
as JDBC does by default!- Throws:
SQLException
-
getDoubleOrNull
Returnsnull
when null, not0
as JDBC does by default!- Throws:
SQLException
-
getDoubleOrZero
Returns0
when null.- Throws:
SQLException
-
getDoubleOrZero
Returns0
when null.- Throws:
SQLException
-
getBoolean
Deprecated.UsegetBooleanOrNull(int)
orgetBooleanOrFalse(int)
instead.- Specified by:
getBoolean
in interfaceResultSet
- Throws:
SQLException
-
getBoolean
Deprecated.UsegetBooleanOrNull(String)
orgetBooleanOrFalse(String)
instead.- Specified by:
getBoolean
in interfaceResultSet
- Throws:
SQLException
-
getByte
Deprecated.UsegetByteOrNull(int)
orgetByteOrZero(int)
instead.- Specified by:
getByte
in interfaceResultSet
- Throws:
SQLException
-
getByte
Deprecated.UsegetByteOrNull(String)
orgetByteOrZero(String)
instead.- Specified by:
getByte
in interfaceResultSet
- Throws:
SQLException
-
getShort
Deprecated.UsegetShortOrNull(int)
orgetShortOrZero(int)
} instead.- Specified by:
getShort
in interfaceResultSet
- Throws:
SQLException
-
getShort
Deprecated.UsegetShortOrNull(String)
orgetShortOrZero(String)
instead.- Specified by:
getShort
in interfaceResultSet
- Throws:
SQLException
-
getInt
Deprecated.UsegetIntegerOrNull(int)
orgetIntegerOrZero(int)
instead.- Specified by:
getInt
in interfaceResultSet
- Throws:
SQLException
-
getInt
Deprecated.UsegetIntegerOrNull(String)
orgetIntegerOrZero(String)
instead.- Specified by:
getInt
in interfaceResultSet
- Throws:
SQLException
-
getLong
Deprecated.UsegetLongOrNull(int)
or#getLongOrLong(int)
instead.- Specified by:
getLong
in interfaceResultSet
- Throws:
SQLException
-
getLong
Deprecated.UsegetLongOrNull(String)
orgetLongOrZero(String)
instead.- Specified by:
getLong
in interfaceResultSet
- Throws:
SQLException
-
getFloat
Deprecated.UsegetFloatOrNull(int)
orgetFloatOrZero(int)
instead.- Specified by:
getFloat
in interfaceResultSet
- Throws:
SQLException
-
getFloat
Deprecated.UsegetFloatOrNull(String)
orgetFloatOrZero(String)
instead.- Specified by:
getFloat
in interfaceResultSet
- Throws:
SQLException
-
getDouble
Deprecated.UsegetDoubleOrNull(int)
orgetDoubleOrZero(int)
instead.- Specified by:
getDouble
in interfaceResultSet
- Throws:
SQLException
-
getDouble
Deprecated.UsegetDoubleOrNull(String)
orgetDoubleOrZero(String)
instead.- Specified by:
getDouble
in interfaceResultSet
- Throws:
SQLException
-
getInstant
Returns anInstant
from aTIMESTAMP WITH TIME ZONE
(ie: "TIMESTAMPTZ") column.Make sure the type of the column you use can store up to nanoseconds, if this is required.
- Throws:
SQLException
-
getInstant
Returns anInstant
from aTIMESTAMP WITH TIME ZONE
(ie: "TIMESTAMPTZ") column.Make sure the type of the column you use can store up to nanoseconds, if this is required.
- Throws:
SQLException
-