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 TypeMethodDescriptionbooleangetBoolean(int columnIndex) Deprecated.booleangetBoolean(String columnLabel) Deprecated.booleangetBooleanOrFalse(int columnIndex) Returnsfalsewhennull.booleangetBooleanOrFalse(String columnLabel) Returnsfalsewhennull.getBooleanOrNull(int columnIndex) Returnsnullwhen null, notfalseas JDBC does by default!getBooleanOrNull(String columnLabel) Returnsnullwhen null, notfalseas JDBC does by default!bytegetByte(int columnIndex) Deprecated.byteDeprecated.getByteOrNull(int columnIndex) Returnsnullwhen null, not0as JDBC does by default!getByteOrNull(String columnLabel) Returnsnullwhen null, not0as JDBC does by default!getByteOrZero(int columnIndex) Returns0when null.getByteOrZero(String columnLabel) Returns0when null.doublegetDouble(int columnIndex) Deprecated.doubleDeprecated.getDoubleOrNull(int columnIndex) Returnsnullwhen null, not0as JDBC does by default!getDoubleOrNull(String columnLabel) Returnsnullwhen null, not0as JDBC does by default!getDoubleOrZero(int columnIndex) Returns0when null.getDoubleOrZero(String columnLabel) Returns0when null.floatgetFloat(int columnIndex) Deprecated.floatDeprecated.getFloatOrNull(int columnIndex) Returnsnullwhen null, not0as JDBC does by default!getFloatOrNull(String columnLabel) Returnsnullwhen null, not0as JDBC does by default!getFloatOrZero(int columnIndex) Returns0when null.getFloatOrZero(String columnLabel) Returns0when null.getInstant(int columnIndex) Returns anInstantfrom aTIMESTAMP WITH TIME ZONE(ie: "TIMESTAMPTZ") column.getInstant(String columnLabel) Returns anInstantfrom aTIMESTAMP WITH TIME ZONE(ie: "TIMESTAMPTZ") column.intgetInt(int columnIndex) Deprecated.intDeprecated.getIntegerOrNull(int columnIndex) Returnsnullwhen null, not0as JDBC does by default!getIntegerOrNull(String columnLabel) Returnsnullwhen null, not0as JDBC does by default!getIntegerOrZero(int columnIndex) Returns0when null.getIntegerOrZero(String columnLabel) Returns0when null.longgetLong(int columnIndex) Deprecated.longDeprecated.getLongOrNull(int columnIndex) Returnsnullwhen null, not0as JDBC does by default!getLongOrNull(String columnLabel) Returnsnullwhen null, not0as JDBC does by default!getLongOrZero(int columnIndex) Returns0when null.getLongOrZero(String columnLabel) Returns0when null.shortgetShort(int columnIndex) Deprecated.shortDeprecated.getShortOrNull(int columnIndex) Returnsnullwhen null, not0as JDBC does by default!getShortOrNull(String columnLabel) Returnsnullwhen null, not0as JDBC does by default!getShortOrZero(int columnIndex) Returns0when null.getShortOrZero(String columnLabel) Returns0when 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, wasNullMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Method Details
-
getBooleanOrNull
Returnsnullwhen null, notfalseas JDBC does by default!- Throws:
SQLException
-
getBooleanOrNull
Returnsnullwhen null, notfalseas JDBC does by default!- Throws:
SQLException
-
getBooleanOrFalse
Returnsfalsewhennull.- Throws:
SQLException
-
getBooleanOrFalse
Returnsfalsewhennull.- Throws:
SQLException
-
getByteOrNull
Returnsnullwhen null, not0as JDBC does by default!- Throws:
SQLException
-
getByteOrNull
Returnsnullwhen null, not0as JDBC does by default!- Throws:
SQLException
-
getByteOrZero
Returns0when null.- Throws:
SQLException
-
getByteOrZero
Returns0when null.- Throws:
SQLException
-
getShortOrNull
Returnsnullwhen null, not0as JDBC does by default!- Throws:
SQLException
-
getShortOrNull
Returnsnullwhen null, not0as JDBC does by default!- Throws:
SQLException
-
getShortOrZero
Returns0when null.- Throws:
SQLException
-
getShortOrZero
Returns0when null.- Throws:
SQLException
-
getIntegerOrNull
Returnsnullwhen null, not0as JDBC does by default!- Throws:
SQLException
-
getIntegerOrNull
Returnsnullwhen null, not0as JDBC does by default!- Throws:
SQLException
-
getIntegerOrZero
Returns0when null.- Throws:
SQLException
-
getIntegerOrZero
Returns0when null.- Throws:
SQLException
-
getLongOrNull
Returnsnullwhen null, not0as JDBC does by default!- Throws:
SQLException
-
getLongOrNull
Returnsnullwhen null, not0as JDBC does by default!- Throws:
SQLException
-
getLongOrZero
Returns0when null.- Throws:
SQLException
-
getLongOrZero
Returns0when null.- Throws:
SQLException
-
getFloatOrNull
Returnsnullwhen null, not0as JDBC does by default!- Throws:
SQLException
-
getFloatOrNull
Returnsnullwhen null, not0as JDBC does by default!- Throws:
SQLException
-
getFloatOrZero
Returns0when null.- Throws:
SQLException
-
getFloatOrZero
Returns0when null.- Throws:
SQLException
-
getDoubleOrNull
Returnsnullwhen null, not0as JDBC does by default!- Throws:
SQLException
-
getDoubleOrNull
Returnsnullwhen null, not0as JDBC does by default!- Throws:
SQLException
-
getDoubleOrZero
Returns0when null.- Throws:
SQLException
-
getDoubleOrZero
Returns0when null.- Throws:
SQLException
-
getBoolean
Deprecated.UsegetBooleanOrNull(int)orgetBooleanOrFalse(int)instead.- Specified by:
getBooleanin interfaceResultSet- Throws:
SQLException
-
getBoolean
Deprecated.UsegetBooleanOrNull(String)orgetBooleanOrFalse(String)instead.- Specified by:
getBooleanin interfaceResultSet- Throws:
SQLException
-
getByte
Deprecated.UsegetByteOrNull(int)orgetByteOrZero(int)instead.- Specified by:
getBytein interfaceResultSet- Throws:
SQLException
-
getByte
Deprecated.UsegetByteOrNull(String)orgetByteOrZero(String)instead.- Specified by:
getBytein interfaceResultSet- Throws:
SQLException
-
getShort
Deprecated.UsegetShortOrNull(int)orgetShortOrZero(int)} instead.- Specified by:
getShortin interfaceResultSet- Throws:
SQLException
-
getShort
Deprecated.UsegetShortOrNull(String)orgetShortOrZero(String)instead.- Specified by:
getShortin interfaceResultSet- Throws:
SQLException
-
getInt
Deprecated.UsegetIntegerOrNull(int)orgetIntegerOrZero(int)instead.- Specified by:
getIntin interfaceResultSet- Throws:
SQLException
-
getInt
Deprecated.UsegetIntegerOrNull(String)orgetIntegerOrZero(String)instead.- Specified by:
getIntin interfaceResultSet- Throws:
SQLException
-
getLong
Deprecated.UsegetLongOrNull(int)or#getLongOrLong(int)instead.- Specified by:
getLongin interfaceResultSet- Throws:
SQLException
-
getLong
Deprecated.UsegetLongOrNull(String)orgetLongOrZero(String)instead.- Specified by:
getLongin interfaceResultSet- Throws:
SQLException
-
getFloat
Deprecated.UsegetFloatOrNull(int)orgetFloatOrZero(int)instead.- Specified by:
getFloatin interfaceResultSet- Throws:
SQLException
-
getFloat
Deprecated.UsegetFloatOrNull(String)orgetFloatOrZero(String)instead.- Specified by:
getFloatin interfaceResultSet- Throws:
SQLException
-
getDouble
Deprecated.UsegetDoubleOrNull(int)orgetDoubleOrZero(int)instead.- Specified by:
getDoublein interfaceResultSet- Throws:
SQLException
-
getDouble
Deprecated.UsegetDoubleOrNull(String)orgetDoubleOrZero(String)instead.- Specified by:
getDoublein interfaceResultSet- Throws:
SQLException
-
getInstant
Returns anInstantfrom 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 anInstantfrom 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
-