public.javadoc.org.spincast.plugins.jdbc.SpincastResultSet.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
SpincastResultSet (org.spincast:spincast-framework 1.13.0 API)
org.spincast.plugins.jdbc
Interface SpincastResultSet
-
- All Superinterfaces:
- AutoCloseable, ResultSet, Wrapper
- All Known Implementing Classes:
- SpincastResultSetDefault
public interface SpincastResultSet
extends ResultSet
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
All Methods Instance Methods Abstract Methods Deprecated Methods
Modifier and Type
Method and Description
boolean
getBoolean(int columnIndex)
Deprecated.
boolean
getBoolean(String columnLabel)
Deprecated.
boolean
getBooleanOrFalse(int columnIndex)
Returns false
when null
.
boolean
getBooleanOrFalse(String columnLabel)
Returns false
when null
.
Boolean
getBooleanOrNull(int columnIndex)
Returns null
when null, not false
as
JDBC does by default!
Boolean
getBooleanOrNull(String columnLabel)
Returns null
when null, not false
as
JDBC does by default!
byte
getByte(int columnIndex)
Deprecated.
byte
getByte(String columnLabel)
Deprecated.
Byte
getByteOrNull(int columnIndex)
Returns null
when null, not 0
as
JDBC does by default!
Byte
getByteOrNull(String columnLabel)
Returns null
when null, not 0
as
JDBC does by default!
Byte
getByteOrZero(int columnIndex)
Returns 0
when null.
Byte
getByteOrZero(String columnLabel)
Returns 0
when null.
double
getDouble(int columnIndex)
Deprecated.
double
getDouble(String columnLabel)
Deprecated.
Double
getDoubleOrNull(int columnIndex)
Returns null
when null, not 0
as
JDBC does by default!
Double
getDoubleOrNull(String columnLabel)
Returns null
when null, not 0
as
JDBC does by default!
Double
getDoubleOrZero(int columnIndex)
Returns 0
when null.
Double
getDoubleOrZero(String columnLabel)
Returns 0
when null.
float
getFloat(int columnIndex)
Deprecated.
float
getFloat(String columnLabel)
Deprecated.
Float
getFloatOrNull(int columnIndex)
Returns null
when null, not 0
as
JDBC does by default!
Float
getFloatOrNull(String columnLabel)
Returns null
when null, not 0
as
JDBC does by default!
Float
getFloatOrZero(int columnIndex)
Returns 0
when null.
Float
getFloatOrZero(String columnLabel)
Returns 0
when null.
Instant
getInstant(int columnIndex)
Returns an Instant
from a TIMESTAMP WITH TIME ZONE
(ie: "TIMESTAMPTZ") column.
Instant
getInstant(String columnLabel)
Returns an Instant
from a TIMESTAMP WITH TIME ZONE
(ie: "TIMESTAMPTZ") column.
int
getInt(int columnIndex)
Deprecated.
int
getInt(String columnLabel)
Deprecated.
Integer
getIntegerOrNull(int columnIndex)
Returns null
when null, not 0
as
JDBC does by default!
Integer
getIntegerOrNull(String columnLabel)
Returns null
when null, not 0
as
JDBC does by default!
Integer
getIntegerOrZero(int columnIndex)
Returns 0
when null.
Integer
getIntegerOrZero(String columnLabel)
Returns 0
when null.
long
getLong(int columnIndex)
Deprecated.
long
getLong(String columnLabel)
Deprecated.
Long
getLongOrNull(int columnIndex)
Returns null
when null, not 0
as
JDBC does by default!
Long
getLongOrNull(String columnLabel)
Returns null
when null, not 0
as
JDBC does by default!
Long
getLongOrZero(int columnIndex)
Returns 0
when null.
Long
getLongOrZero(String columnLabel)
Returns 0
when null.
short
getShort(int columnIndex)
Deprecated.
short
getShort(String columnLabel)
Deprecated.
Short
getShortOrNull(int columnIndex)
Returns null
when null, not 0
as
JDBC does by default!
Short
getShortOrNull(String columnLabel)
Returns null
when null, not 0
as
JDBC does by default!
Short
getShortOrZero(int columnIndex)
Returns 0
when null.
Short
getShortOrZero(String columnLabel)
Returns 0
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 Detail
-
getBooleanOrNull
Boolean getBooleanOrNull(int columnIndex)
throws SQLException
Returns null
when null, not false
as
JDBC does by default!
- Throws:
SQLException
-
getBooleanOrNull
Boolean getBooleanOrNull(String columnLabel)
throws SQLException
Returns null
when null, not false
as
JDBC does by default!
- Throws:
SQLException
-
getBooleanOrFalse
boolean getBooleanOrFalse(int columnIndex)
throws SQLException
Returns false
when null
.
- Throws:
SQLException
-
getBooleanOrFalse
boolean getBooleanOrFalse(String columnLabel)
throws SQLException
Returns false
when null
.
- Throws:
SQLException
-
getByteOrNull
Byte getByteOrNull(int columnIndex)
throws SQLException
Returns null
when null, not 0
as
JDBC does by default!
- Throws:
SQLException
-
getByteOrNull
Byte getByteOrNull(String columnLabel)
throws SQLException
Returns null
when null, not 0
as
JDBC does by default!
- Throws:
SQLException
-
getByteOrZero
Byte getByteOrZero(int columnIndex)
throws SQLException
Returns 0
when null.
- Throws:
SQLException
-
getByteOrZero
Byte getByteOrZero(String columnLabel)
throws SQLException
Returns 0
when null.
- Throws:
SQLException
-
getShortOrNull
Short getShortOrNull(int columnIndex)
throws SQLException
Returns null
when null, not 0
as
JDBC does by default!
- Throws:
SQLException
-
getShortOrNull
Short getShortOrNull(String columnLabel)
throws SQLException
Returns null
when null, not 0
as
JDBC does by default!
- Throws:
SQLException
-
getShortOrZero
Short getShortOrZero(int columnIndex)
throws SQLException
Returns 0
when null.
- Throws:
SQLException
-
getShortOrZero
Short getShortOrZero(String columnLabel)
throws SQLException
Returns 0
when null.
- Throws:
SQLException
-
getIntegerOrNull
Integer getIntegerOrNull(int columnIndex)
throws SQLException
Returns null
when null, not 0
as
JDBC does by default!
- Throws:
SQLException
-
getIntegerOrNull
Integer getIntegerOrNull(String columnLabel)
throws SQLException
Returns null
when null, not 0
as
JDBC does by default!
- Throws:
SQLException
-
getIntegerOrZero
Integer getIntegerOrZero(int columnIndex)
throws SQLException
Returns 0
when null.
- Throws:
SQLException
-
getIntegerOrZero
Integer getIntegerOrZero(String columnLabel)
throws SQLException
Returns 0
when null.
- Throws:
SQLException
-
getLongOrNull
Long getLongOrNull(int columnIndex)
throws SQLException
Returns null
when null, not 0
as
JDBC does by default!
- Throws:
SQLException
-
getLongOrNull
Long getLongOrNull(String columnLabel)
throws SQLException
Returns null
when null, not 0
as
JDBC does by default!
- Throws:
SQLException
-
getLongOrZero
Long getLongOrZero(int columnIndex)
throws SQLException
Returns 0
when null.
- Throws:
SQLException
-
getLongOrZero
Long getLongOrZero(String columnLabel)
throws SQLException
Returns 0
when null.
- Throws:
SQLException
-
getFloatOrNull
Float getFloatOrNull(int columnIndex)
throws SQLException
Returns null
when null, not 0
as
JDBC does by default!
- Throws:
SQLException
-
getFloatOrNull
Float getFloatOrNull(String columnLabel)
throws SQLException
Returns null
when null, not 0
as
JDBC does by default!
- Throws:
SQLException
-
getFloatOrZero
Float getFloatOrZero(int columnIndex)
throws SQLException
Returns 0
when null.
- Throws:
SQLException
-
getFloatOrZero
Float getFloatOrZero(String columnLabel)
throws SQLException
Returns 0
when null.
- Throws:
SQLException
-
getDoubleOrNull
Double getDoubleOrNull(int columnIndex)
throws SQLException
Returns null
when null, not 0
as
JDBC does by default!
- Throws:
SQLException
-
getDoubleOrNull
Double getDoubleOrNull(String columnLabel)
throws SQLException
Returns null
when null, not 0
as
JDBC does by default!
- Throws:
SQLException
-
getDoubleOrZero
Double getDoubleOrZero(int columnIndex)
throws SQLException
Returns 0
when null.
- Throws:
SQLException
-
getDoubleOrZero
Double getDoubleOrZero(String columnLabel)
throws SQLException
Returns 0
when null.
- Throws:
SQLException
-
getBoolean
@Deprecated
boolean getBoolean(int columnIndex)
throws SQLException
Deprecated.
Use getBooleanOrNull(int)
or
getBooleanOrFalse(int)
instead.
- Specified by:
getBoolean
in interface ResultSet
- Throws:
SQLException
-
getBoolean
@Deprecated
boolean getBoolean(String columnLabel)
throws SQLException
Deprecated.
Use getBooleanOrNull(String)
or
getBooleanOrFalse(String)
instead.
- Specified by:
getBoolean
in interface ResultSet
- Throws:
SQLException
-
getByte
@Deprecated
byte getByte(int columnIndex)
throws SQLException
Deprecated.
Use getByteOrNull(int)
or getByteOrZero(int)
instead.
- Specified by:
getByte
in interface ResultSet
- Throws:
SQLException
-
getByte
@Deprecated
byte getByte(String columnLabel)
throws SQLException
Deprecated.
Use getByteOrNull(String)
or getByteOrZero(String)
instead.
- Specified by:
getByte
in interface ResultSet
- Throws:
SQLException
-
getShort
@Deprecated
short getShort(int columnIndex)
throws SQLException
Deprecated.
Use getShortOrNull(int)
or getShortOrZero(int)
} instead.
- Specified by:
getShort
in interface ResultSet
- Throws:
SQLException
-
getShort
@Deprecated
short getShort(String columnLabel)
throws SQLException
Deprecated.
Use getShortOrNull(String)
or getShortOrZero(String)
instead.
- Specified by:
getShort
in interface ResultSet
- Throws:
SQLException
-
getInt
@Deprecated
int getInt(int columnIndex)
throws SQLException
Deprecated.
Use getIntegerOrNull(int)
or getIntegerOrZero(int)
instead.
- Specified by:
getInt
in interface ResultSet
- Throws:
SQLException
-
getInt
@Deprecated
int getInt(String columnLabel)
throws SQLException
Deprecated.
Use getIntegerOrNull(String)
or getIntegerOrZero(String)
instead.
- Specified by:
getInt
in interface ResultSet
- Throws:
SQLException
-
getLong
@Deprecated
long getLong(int columnIndex)
throws SQLException
Deprecated.
Use getLongOrNull(int)
or #getLongOrLong(int)
instead.
- Specified by:
getLong
in interface ResultSet
- Throws:
SQLException
-
getLong
@Deprecated
long getLong(String columnLabel)
throws SQLException
Deprecated.
Use getLongOrNull(String)
or getLongOrZero(String)
instead.
- Specified by:
getLong
in interface ResultSet
- Throws:
SQLException
-
getFloat
@Deprecated
float getFloat(int columnIndex)
throws SQLException
Deprecated.
Use getFloatOrNull(int)
or getFloatOrZero(int)
instead.
- Specified by:
getFloat
in interface ResultSet
- Throws:
SQLException
-
getFloat
@Deprecated
float getFloat(String columnLabel)
throws SQLException
Deprecated.
Use getFloatOrNull(String)
or getFloatOrZero(String)
instead.
- Specified by:
getFloat
in interface ResultSet
- Throws:
SQLException
-
getDouble
@Deprecated
double getDouble(int columnIndex)
throws SQLException
Deprecated.
Use getDoubleOrNull(int)
or getDoubleOrZero(int)
instead.
- Specified by:
getDouble
in interface ResultSet
- Throws:
SQLException
-
getDouble
@Deprecated
double getDouble(String columnLabel)
throws SQLException
Deprecated.
Use getDoubleOrNull(String)
or getDoubleOrZero(String)
instead.
- Specified by:
getDouble
in interface ResultSet
- Throws:
SQLException
-
getInstant
Instant getInstant(int columnIndex)
throws SQLException
Returns an Instant
from a TIMESTAMP WITH TIME ZONE
(ie: "TIMESTAMPTZ") column.
- Throws:
SQLException
-
getInstant
Instant getInstant(String columnLabel)
throws SQLException
Returns an Instant
from a TIMESTAMP WITH TIME ZONE
(ie: "TIMESTAMPTZ") column.
- Throws:
SQLException
Copyright © 2019. All rights reserved.