java.lang.Object
org.postgresql.pljava.jdbc.AbstractResultSet
org.postgresql.pljava.jdbc.ObjectResultSet
- All Implemented Interfaces:
AutoCloseable
,ResultSet
,Wrapper
- Direct Known Subclasses:
ReadOnlyResultSet
,SingleRowResultSet
Implements most getters in terms of
getValue(int, java.lang.Class<T>)
, getNumber(int, java.lang.Class)
,
or a few other ResultSet
getters that are so implemented, tracks
wasNull
, and provides getObjectValue(int)
as the
chief method for subclasses to implement; turns most updaters into
ResultSet.updateObject(int,Object)
.- Author:
- Thomas Hallgren
-
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This is a noop since warnings are not supported.getArray
(int columnIndex) Implemented overgetValue
.getAsciiStream
(int columnIndex) Implemented overgetClob
.getBigDecimal
(int columnIndex) Implemented overgetValue
.getBigDecimal
(int columnIndex, int scale) Throws "unsupported" exception.getBinaryStream
(int columnIndex) Implemented overgetBlob
.getBlob
(int columnIndex) Implemented overgetBytes
.boolean
getBoolean
(int columnIndex) Implemented overgetValue
.byte
getByte
(int columnIndex) Implemented overgetNumber
.byte[]
getBytes
(int columnIndex) Implemented overgetValue
.getCharacterStream
(int columnIndex) Implemented overgetClob
.getClob
(int columnIndex) Implemented overgetString
.getDate
(int columnIndex) Implemented overgetValue
.Implemented overgetValue
.double
getDouble
(int columnIndex) Implemented overgetNumber
.float
getFloat
(int columnIndex) Implemented overgetNumber
.int
getInt
(int columnIndex) Implemented overgetNumber
.long
getLong
(int columnIndex) Implemented overgetNumber
.Throws "unsupported" exception if not overridden in a subclass.protected final Number
Implemented overgetObjectValue(int, java.util.Map)
, trackswasNull
, appliesSPIConnection.basicNumericCoercion(java.lang.Class, java.lang.Object)
tocls
.final Object
getObject
(int columnIndex) Implemented overgetObjectValue
.final <T> T
Implemented overgetObjectValue
.final Object
Implemented overgetObjectValue
.protected Object
getObjectValue
(int columnIndex) Implemented overgetObjectValue(int,Class)
, passing null for the class.protected abstract Object
getObjectValue
(int columnIndex, Class<?> type) Primary method for subclass to override to retrieve a value.protected Object
getObjectValue
(int columnIndex, Map typeMap) Implemented overgetObjectValue(int)
, complains iftypeMap
is non-null.getRef
(int columnIndex) Implemented overgetValue
.short
getShort
(int columnIndex) Implemented overgetNumber
.getString
(int columnIndex) Implemented overgetValue
.getTime
(int columnIndex) Implemented overgetValue
.Implemented overgetValue
.getTimestamp
(int columnIndex) Implemented overgetValue
.getTimestamp
(int columnIndex, Calendar cal) Implemented overgetValue
.getUnicodeStream
(int columnIndex) Throws "unsupported" exception.getURL
(int columnIndex) Implemented overgetValue
.protected final <T> T
Implemented overgetObject(int)
, appliesSPIConnection.basicCoercion(java.lang.Class<T>, java.lang.Object)
tocls
.protected <T> T
Implemented overgetObject(int)
, appliesSPIConnection.basicCalendricalCoercion(java.lang.Class<T>, java.lang.Object, java.util.Calendar)
tocls
.Returns null if not overridden in a subclass.void
Refresh row is not yet implemented.void
updateArray
(int columnIndex, Array x) Implemented overupdateObject
.void
updateAsciiStream
(int columnIndex, InputStream x, int length) Implemented overClobValue
andupdateObject
.void
updateBigDecimal
(int columnIndex, BigDecimal x) Implemented overupdateObject
.void
updateBinaryStream
(int columnIndex, InputStream x, int length) Implemented overBlobValue
andupdateBlob
.void
updateBlob
(int columnIndex, Blob x) Implemented overupdateObject
.void
updateBoolean
(int columnIndex, boolean x) Implemented overupdateObject
.void
updateByte
(int columnIndex, byte x) Implemented overupdateObject
.void
updateBytes
(int columnIndex, byte[] x) Implemented overupdateObject
.void
updateCharacterStream
(int columnIndex, Reader x, int length) Implemented overClobValue
andupdateClob
.void
updateClob
(int columnIndex, Clob x) Implemented overupdateObject
.void
updateDate
(int columnIndex, Date x) Implemented overupdateObject
.void
updateDouble
(int columnIndex, double x) Implemented overupdateObject
.void
updateFloat
(int columnIndex, float x) Implemented overupdateObject
.void
updateInt
(int columnIndex, int x) Implemented overupdateObject
.void
updateLong
(int columnIndex, long x) Implemented overupdateObject
.void
updateNull
(int columnIndex) Implemented overupdateObject
.void
Implemented overupdateObject
.void
updateShort
(int columnIndex, short x) Implemented overupdateObject
.void
updateString
(int columnIndex, String x) Implemented overupdateObject
.void
updateTime
(int columnIndex, Time x) Implemented overupdateObject
.void
updateTimestamp
(int columnIndex, Timestamp x) Implemented overupdateObject
.boolean
wasNull()
Returns a private value updated by final methods in this class.Methods inherited from class org.postgresql.pljava.jdbc.AbstractResultSet
getArray, getAsciiStream, getBigDecimal, getBigDecimal, getBinaryStream, getBlob, getBoolean, getByte, getBytes, getCharacterStream, getClob, getCursorName, getDate, getDate, getDouble, getFloat, getInt, getLong, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getRef, getRowId, getRowId, getShort, getSQLXML, getSQLXML, getStatement, getString, getTime, getTime, getTimestamp, getTimestamp, getUnicodeStream, getURL, isWrapperFor, unwrap, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateByte, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDouble, updateFloat, updateInt, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateObject, updateObject, updateRef, updateRowId, updateRowId, updateShort, updateSQLXML, updateSQLXML, updateString, updateTime, updateTimestamp
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.sql.ResultSet
absolute, afterLast, beforeFirst, cancelRowUpdates, close, deleteRow, findColumn, first, getConcurrency, getFetchDirection, getFetchSize, getHoldability, getRow, getType, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateRow
-
Constructor Details
-
ObjectResultSet
public ObjectResultSet()
-
-
Method Details
-
wasNull
public boolean wasNull()Returns a private value updated by final methods in this class. -
clearWarnings
This is a noop since warnings are not supported.- Throws:
SQLException
-
getWarnings
Returns null if not overridden in a subclass.- Throws:
SQLException
-
getMetaData
Throws "unsupported" exception if not overridden in a subclass.- Throws:
SQLException
- indicating that this feature is not supported.
-
getArray
Implemented overgetValue
.- Throws:
SQLException
-
getAsciiStream
Implemented overgetClob
.- Throws:
SQLException
-
getBigDecimal
Implemented overgetValue
.- Throws:
SQLException
-
getBigDecimal
Throws "unsupported" exception.- Throws:
SQLException
-
getBinaryStream
Implemented overgetBlob
.- Throws:
SQLException
-
getBlob
Implemented overgetBytes
.- Throws:
SQLException
-
getBoolean
Implemented overgetValue
.- Throws:
SQLException
-
getByte
Implemented overgetNumber
.- Throws:
SQLException
-
getBytes
Implemented overgetValue
.- Throws:
SQLException
-
getCharacterStream
Implemented overgetClob
.- Throws:
SQLException
-
getClob
Implemented overgetString
.- Throws:
SQLException
-
getDate
Implemented overgetValue
.- Throws:
SQLException
-
getDate
Implemented overgetValue
.- Throws:
SQLException
-
getDouble
Implemented overgetNumber
.- Throws:
SQLException
-
getFloat
Implemented overgetNumber
.- Throws:
SQLException
-
getInt
Implemented overgetNumber
.- Throws:
SQLException
-
getLong
Implemented overgetNumber
.- Throws:
SQLException
-
getObject
Implemented overgetObjectValue
. Final because it recordswasNull
for use by other methods.- Throws:
SQLException
-
getObject
Implemented overgetObjectValue
. Final because it recordswasNull
for use by other methods.- Throws:
SQLException
-
getRef
Implemented overgetValue
.- Throws:
SQLException
-
getShort
Implemented overgetNumber
.- Throws:
SQLException
-
getString
Implemented overgetValue
.- Throws:
SQLException
-
getTime
Implemented overgetValue
.- Throws:
SQLException
-
getTime
Implemented overgetValue
.- Throws:
SQLException
-
getTimestamp
Implemented overgetValue
.- Throws:
SQLException
-
getTimestamp
Implemented overgetValue
.- Throws:
SQLException
-
getUnicodeStream
Throws "unsupported" exception.- Throws:
SQLException
-
getURL
Implemented overgetValue
.- Throws:
SQLException
-
refreshRow
Refresh row is not yet implemented.- Throws:
SQLException
- indicating that this feature is not supported.
-
updateArray
Implemented overupdateObject
.- Throws:
SQLException
-
updateAsciiStream
Implemented overClobValue
andupdateObject
.- Throws:
SQLException
-
updateBigDecimal
Implemented overupdateObject
.- Throws:
SQLException
-
updateBinaryStream
Implemented overBlobValue
andupdateBlob
.- Throws:
SQLException
-
updateBlob
Implemented overupdateObject
.- Throws:
SQLException
-
updateBoolean
Implemented overupdateObject
.- Throws:
SQLException
-
updateByte
Implemented overupdateObject
.- Throws:
SQLException
-
updateBytes
Implemented overupdateObject
.- Throws:
SQLException
-
updateCharacterStream
Implemented overClobValue
andupdateClob
.- Throws:
SQLException
-
updateClob
Implemented overupdateObject
.- Throws:
SQLException
-
updateDate
Implemented overupdateObject
.- Throws:
SQLException
-
updateDouble
Implemented overupdateObject
.- Throws:
SQLException
-
updateFloat
Implemented overupdateObject
.- Throws:
SQLException
-
updateInt
Implemented overupdateObject
.- Throws:
SQLException
-
updateLong
Implemented overupdateObject
.- Throws:
SQLException
-
updateNull
Implemented overupdateObject
.- Throws:
SQLException
-
updateRef
Implemented overupdateObject
.- Throws:
SQLException
-
updateShort
Implemented overupdateObject
.- Throws:
SQLException
-
updateString
Implemented overupdateObject
.- Throws:
SQLException
-
updateTime
Implemented overupdateObject
.- Throws:
SQLException
-
updateTimestamp
Implemented overupdateObject
.- Throws:
SQLException
-
getObject
Implemented overgetObjectValue
. Final because it recordswasNull
for use by other methods.- Throws:
SQLException
-
getNumber
Implemented overgetObjectValue(int, java.util.Map)
, trackswasNull
, appliesSPIConnection.basicNumericCoercion(java.lang.Class, java.lang.Object)
tocls
.- Throws:
SQLException
-
getValue
Implemented overgetObject(int)
, appliesSPIConnection.basicCoercion(java.lang.Class<T>, java.lang.Object)
tocls
.- Throws:
SQLException
-
getValue
Implemented overgetObject(int)
, appliesSPIConnection.basicCalendricalCoercion(java.lang.Class<T>, java.lang.Object, java.util.Calendar)
tocls
.- Throws:
SQLException
-
getObjectValue
Implemented overgetObjectValue(int)
, complains iftypeMap
is non-null.- Throws:
SQLException
-
getObjectValue
Implemented overgetObjectValue(int,Class)
, passing null for the class.To preserve back-compatible behavior in the 1.5.x branch, this is still what ends up getting called in all cases that do not explicitly use the JDBC 4.1 new
getObject(int,Class)
.- Throws:
SQLException
-
getObjectValue
Primary method for subclass to override to retrieve a value.The signature does not constrain this to return an object of the requested class, so it can still be used as before by methods that may do additional coercions. When called by
getObject(int,Class)
, that caller enforces the class of the result.- Throws:
SQLException
-