Class ClientResultSet
- All Implemented Interfaces:
AutoCloseable
,ResultSet
,Wrapper
,ResultSetCallbackInterface
,UnitOfWorkListener
- Direct Known Subclasses:
NetResultSet
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
protected Agent
(package private) boolean
private boolean[]
private boolean[]
Indicates which columns have been fetched as a stream or as a LOB for a row.private final ClientConnection
private Reader
private long
private CloseFilterInputStream
boolean
private boolean
private static final byte
private static final byte
private int
int
private long
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
boolean
private boolean
private long
private boolean
private LOBStateTracker
Tracker object for LOB state, used to free locators on the server.private long
(package private) boolean
boolean
(package private) ClientStatement
private ClientPreparedStatement
private ClientPreparedStatement
private ClientPreparedStatement
long
(package private) int
(package private) int
int
private long
Sqlca[]
int
int
private byte
private boolean
boolean
static final int
static final int
static final int
private static final int
private static final int
private static final int
private static final int
private static final int
static final int
int
static final int
static final int
static final int
static final int
protected int
private Object[]
private SqlWarning
private static final int
private static final int
private static final int
private int
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
ConstructorsModifierConstructorDescriptionprotected
ClientResultSet
(Agent agent, ClientStatement statement, Cursor cursor, int resultSetType, int resultSetConcurrency, int resultSetHoldability) -
Method Summary
Modifier and TypeMethodDescriptionboolean
absolute
(int row) private boolean
absoluteX
(int row) void
private void
adjustAbsoluteRowset
(long rowNumber) private void
private void
adjustLastRowset
(long row) private void
private void
adjustPreviousRowset
(int orientation, long rowNumber, boolean isAfterLastRow) private void
private void
adjustRelativeRowset
(long rowNumber) void
private void
void
private void
private String
private String
private String
void
protected final void
protected final void
checkForClosedResultSet
(String operation) private final void
checkForUpdatableResultSet
(String operation) private void
checkForValidColumnIndex
(int column) private final void
private final void
checkGetterPreconditions
(int column, String operation) private void
checkLOBMultiCall
(int columnIndex) Checks if a stream or a LOB object has already been created for the specified LOB column.private final void
private final int
private final int
checkRowsetSqlca
(int row) private final void
private final void
private final void
checkUpdatePreconditions
(int column, String operation) final void
Clear all warnings on thisResultSet
and make subsequent calls togetWarnings()
returnnull
until a new warning is reported.private void
void
close()
private void
Closes the current stream, if there is one.private void
Close Statement if it is set to closeOnCompletionfinal void
closeX()
void
completeLocalCommit
(Iterator listenerIterator) void
completeLocalRollback
(Iterator listenerIterator) int
completeSqlca
(Sqlca sqlca) private Date
convertFromDefaultCalendar
(Date date, Calendar cal) Convert a date originally set using the default calendar to a value representing the same date in a different calendar.private Time
convertFromDefaultCalendar
(Time time, Calendar cal) Convert a time originally set using the default calendar to a value representing the same time in a different calendar.private Timestamp
convertFromDefaultCalendar
(Timestamp ts, Calendar cal) Convert a timestamp originally set using the default calendar to a value representing the same timestamp in a different calendar.private static Calendar
createCalendar
(Date date) Create a calendar with default locale and time zone.private CloseFilterInputStream
(package private) final void
Initializes the LOB state tracker.private void
delete()
void
private void
void
earlyCloseComplete
(Sqlca sqlca) void
final int
findColumn
(String columnName) protected final int
findColumnX
(String columnName, String operation) boolean
first()
private boolean
firstX()
private void
private void
flowGetRowset
(int orientation, long rowNumber) private void
flowPositioningFetch
(int scrollOrientation, int rowToFetch) private boolean
getAbsoluteRowset
(long row) getArray
(int column) final Array
getAsciiStream
(int column) final InputStream
getAsciiStream
(String columnName) getBigDecimal
(int column) getBigDecimal
(int column, int scale) Deprecated.final BigDecimal
getBigDecimal
(String columnName) final BigDecimal
getBigDecimal
(String columnName, int scale) Deprecated.getBinaryStream
(int column) final InputStream
getBinaryStream
(String columnName) getBlob
(int column) final Blob
boolean
getBoolean
(int column) final boolean
getBoolean
(String columnName) byte
getByte
(int column) final byte
byte[]
getBytes
(int column) final byte[]
getCharacterStream
(int column) final Reader
getCharacterStream
(String columnName) getClob
(int column) final Clob
int
getDate
(int column) final Date
final Date
double
getDouble
(int column) final double
int
int
private boolean
float
getFloat
(int column) final float
final int
Retrieves the holdability for thisResultSet
object.int
getInt
(int column) final int
private boolean
getLastRowset
(long row) long
getLong
(int column) final long
(package private) ColumnMetaData
getNCharacterStream
(int columnIndex) getNCharacterStream
(String columnName) getNClob
(int i) private boolean
getNString
(int columnIndex) getNString
(String columnName) getObject
(int column) <T> T
Retrieve the column as an object of the desired type.final Object
<T> T
final Object
(package private) Object
getObjectX
(int column) private void
private void
private void
private boolean
getRef
(int column) final Ref
private boolean
private boolean
getRelativeRowset
(long rows) int
getRow()
protected void
getRowId
(int columnIndex) private final long
private int
getRowX()
byte
private String
short
getShort
(int column) final short
getSQLXML
(int columnIndex) Retrieves theStatement
object that produced this object, ornull
if theResultSet
was not produced by aStatement
object.getString
(int column) final String
private String
getTime
(int column) final Time
final Time
getTimestamp
(int column) getTimestamp
(int column, Calendar calendar) final Timestamp
getTimestamp
(String columnName) final Timestamp
getTimestamp
(String columnName, Calendar cal) int
getType()
getUnicodeStream
(int column) Deprecated.final InputStream
getUnicodeStream
(String columnName) Deprecated.getURL
(int columnIndex) final SQLWarning
Returns the firstSQLWarning
reported on thisResultSet
object, ornull
if there are no warnings.private void
insert()
void
private void
boolean
private boolean
boolean
private boolean
final boolean
isClosed()
Checks whether thisResultSet
object has been closed, either automatically or becauseclose()
has been called.boolean
isFirst()
private boolean
isFirstX()
boolean
isLast()
private boolean
isLastX()
private boolean
isNull
(int column) private boolean
private boolean
boolean
isWrapperFor
(Class<?> interfaces) Returns false unlessinterfaces
is implementedprivate SQLException
boolean
last()
private boolean
lastX()
void
(package private) void
(package private) void
Mark this ResultSet as closed.(package private) void
markClosed
(boolean removeListener) Mark this ResultSet as closed.void
Mark this ResultSet as closed on the server.final void
markLOBAsPublished
(int index) Marks the LOB at the specified column as published.private void
private SQLException
mismatchException
(String targetTypeName, int columnIndex) private void
private void
void
private void
Moves off the insert row if positioned there, and checks the current row for releasable LOB locators if positioned on a valid data row.void
final boolean
next()
(package private) boolean
nextX()
private void
private void
protected abstract void
(package private) void
private void
private void
protected abstract void
Method that is invoked bycloseX()
before the result set is actually being closed.boolean
previous()
private boolean
private void
(package private) void
private void
readCloseAndAutoCommit
(boolean readAutoCommit) abstract void
private void
abstract void
private void
abstract void
abstract void
private void
void
private void
boolean
relative
(int rows) private boolean
relativeX
(int rows) (package private) boolean
private void
private void
private final void
private final void
private boolean
(package private) boolean
boolean
boolean
private boolean
rowIsInCurrentRowset
(long rowNumber) private boolean
rowIsInCurrentRowset
(long rowNumber, int orientation) boolean
private void
void
setFetchDirection
(int direction) void
setFetchSize
(int rows) abstract void
setFetchSize_
(int rows) void
setRowCountEvent
(long rowCount) private void
private void
private void
void
setRSReturnability
(byte rsReturnability) void
setValidCursorPosition
(boolean isValidCursorPosition) private void
setWasNull
(int column) private void
Clears the flags for used columns, typically invoked when changing the result set position.<T> T
Returnsthis
if this class implements the interfaceprivate void
update()
void
updateArray
(int columnIndex, Array x) void
updateArray
(String columnName, Array x) void
updateAsciiStream
(int columnIndex, InputStream x) Updates the designated column with an ascii stream value.void
updateAsciiStream
(int column, InputStream x, int length) void
updateAsciiStream
(int columnIndex, InputStream x, long length) Update a column with an ascii stream value.void
updateAsciiStream
(String columnName, InputStream x) Updates the designated column with an ascii stream value.void
updateAsciiStream
(String columnName, InputStream x, int length) void
updateAsciiStream
(String columnName, InputStream x, long length) Update a column with an ascii stream value.void
updateBigDecimal
(int column, BigDecimal x) void
updateBigDecimal
(String columnName, BigDecimal x) void
updateBinaryStream
(int columnIndex, InputStream x) Updates the designated column with a binary stream value.void
updateBinaryStream
(int column, InputStream x, int length) void
updateBinaryStream
(int columnIndex, InputStream x, long length) Update a column with a binary stream value.void
updateBinaryStream
(String columnLabel, InputStream x) Updates the designated column with a binary stream value.void
updateBinaryStream
(String columnName, InputStream x, int length) void
updateBinaryStream
(String columnName, InputStream x, long length) Update a column with a binary stream value.void
updateBlob
(int columnIndex, InputStream x) Updates the designated column using the given input stream.void
updateBlob
(int columnIndex, InputStream x, long length) Updates the designated column using the given input stream, which will have the specified number of bytes.void
updateBlob
(int columnIndex, Blob x) Updates the designated column with ajava.sql.Blob
value.void
updateBlob
(String columnLabel, InputStream x) Updates the designated column using the given input stream.void
updateBlob
(String columnName, InputStream x, long length) Updates the designated column using the given input stream, which will have the specified number of bytes.void
updateBlob
(String columnName, Blob x) Updates the designated column with ajava.sql.Blob
value.void
updateBoolean
(int column, boolean x) void
updateBoolean
(String columnName, boolean x) void
updateByte
(int column, byte x) void
updateByte
(String columnName, byte x) void
updateBytes
(int column, byte[] x) void
updateBytes
(String columnName, byte[] x) void
updateCharacterStream
(int columnIndex, Reader reader) Updates the designated column with a character stream value.void
updateCharacterStream
(int column, Reader x, int length) void
updateCharacterStream
(int columnIndex, Reader x, long length) Update a column with a character stream value.void
updateCharacterStream
(String columnLabel, Reader reader) Updates the designated column with a character stream value.void
updateCharacterStream
(String columnName, Reader x, int length) void
updateCharacterStream
(String columnName, Reader reader, long length) Update a column with a character stream value.void
updateClob
(int columnIndex, Reader reader) Updates the designated column using the givenReader
object.void
updateClob
(int columnIndex, Reader x, long length) Updates the designated column using the givenReader
object, which is the given number of characters long.void
updateClob
(int columnIndex, Clob x) Updates the designated column with ajava.sql.Clob
value.void
updateClob
(String columnLabel, Reader reader) Updates the designated column using the givenReader
object.void
updateClob
(String columnName, Reader x, long length) Updates the designated column using the givenReader
object, which is the given number of characters long.void
updateClob
(String columnLabel, Clob x) Updates the designated column with ajava.sql.Clob
value.private void
updateColumn
(int column, Object value) private void
void
updateDate
(int column, Date x) void
updateDate
(String columnName, Date x) void
updateDouble
(int column, double x) void
updateDouble
(String columnName, double x) void
updateFloat
(int column, float x) void
updateFloat
(String columnName, float x) void
updateInt
(int column, int x) void
void
updateLong
(int column, long x) void
updateLong
(String columnName, long x) void
updateNCharacterStream
(int columnIndex, Reader x) void
updateNCharacterStream
(int columnIndex, Reader x, long length) void
updateNCharacterStream
(String columnName, Reader x) void
updateNCharacterStream
(String columnName, Reader x, long length) void
updateNClob
(int columnIndex, Reader reader) void
updateNClob
(int columnIndex, Reader x, long length) Updates the designated column with a java.sql.NClob value.void
updateNClob
(int columnIndex, NClob nClob) void
updateNClob
(String columnName, InputStream x, long length) Updates the designated column with a java.sql.NClob value.void
updateNClob
(String columnName, Reader reader) void
updateNClob
(String columnName, Reader x, long length) Updates the designated column with a java.sql.NClob value.void
updateNClob
(String columnName, NClob nClob) void
updateNString
(int columnIndex, String nString) void
updateNString
(String columnName, String nString) void
updateNull
(int column) void
updateNull
(String columnName) void
updateObject
(int column, Object x) void
updateObject
(int column, Object x, int scale) void
updateObject
(String columnName, Object x) void
updateObject
(String columnName, Object x, int scale) void
void
void
void
updateRowId
(int columnIndex, RowId x) void
updateRowId
(String columnName, RowId x) private boolean
void
updateShort
(int column, short x) void
updateShort
(String columnName, short x) void
updateSQLXML
(int columnIndex, SQLXML xmlObject) void
updateSQLXML
(String columnName, SQLXML xmlObject) void
updateString
(int column, String x) void
updateString
(String columnName, String x) void
updateTime
(int column, Time x) void
updateTime
(String columnName, Time x) void
updateTimestamp
(int column, Timestamp x) void
updateTimestamp
(String columnName, Timestamp x) private void
useStreamOrLOB
(int columnIndex) Mark a column as already having a stream or LOB accessed from it.private boolean
wasNonNullSensitiveUpdate
(int column) boolean
wasNull()
private boolean
wasNullSensitiveUpdate
(int column) (package private) void
private boolean
abstract void
writeCursorClose_
(Section section) private void
abstract void
writeFetch_
(Section section) private void
writeInsertRow
(boolean chainedWritesFollowingSetLob) abstract void
writePositioningFetch_
(Section section, int orientation, long rowToFetch) abstract void
writeScrollableFetch_
(Section section, int fetchSize, int orientation, long rowToFetch, boolean resetQueryBlocks) private void
writeUpdateRow
(boolean chainedWritesFollowingSetLob) 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
updateObject, updateObject, updateObject, updateObject
-
Field Details
-
statement_
-
outerStatement_
ClientStatement outerStatement_ -
resultSetMetaData_
-
warnings_
-
cursor_
-
lobState
Tracker object for LOB state, used to free locators on the server. -
agent_
-
generatedSection_
-
currentStream
-
currentReader
-
connection_
-
scrollOrientation_relative__
public static final int scrollOrientation_relative__- See Also:
-
scrollOrientation_absolute__
public static final int scrollOrientation_absolute__- See Also:
-
scrollOrientation_after__
public static final int scrollOrientation_after__- See Also:
-
scrollOrientation_before__
public static final int scrollOrientation_before__- See Also:
-
scrollOrientation_prior__
private static final int scrollOrientation_prior__- See Also:
-
scrollOrientation_first__
private static final int scrollOrientation_first__- See Also:
-
scrollOrientation_last__
private static final int scrollOrientation_last__- See Also:
-
scrollOrientation_current__
private static final int scrollOrientation_current__- See Also:
-
scrollOrientation_next__
private static final int scrollOrientation_next__- See Also:
-
sensitivity_unknown__
public static final int sensitivity_unknown__- See Also:
-
sensitivity_insensitive__
public static final int sensitivity_insensitive__- See Also:
-
sensitivity_sensitive_static__
public static final int sensitivity_sensitive_static__- See Also:
-
sensitivity_sensitive_dynamic__
public static final int sensitivity_sensitive_dynamic__- See Also:
-
WAS_NULL
private static final int WAS_NULL- See Also:
-
WAS_NOT_NULL
private static final int WAS_NOT_NULL- See Also:
-
WAS_NULL_UNSET
private static final int WAS_NULL_UNSET- See Also:
-
DDM_RETURN_CALLER
private static final byte DDM_RETURN_CALLER- See Also:
-
DDM_RETURN_CLIENT
private static final byte DDM_RETURN_CLIENT- See Also:
-
wasNull_
private int wasNull_ -
rsReturnability_
private byte rsReturnability_ -
openOnClient_
boolean openOnClient_ -
openOnServer_
public boolean openOnServer_ -
queryTerminatingSqlca_
-
autoCommitted_
boolean autoCommitted_ -
isValidCursorPosition_
private boolean isValidCursorPosition_ -
savedIsValidCursorPosition_
private boolean savedIsValidCursorPosition_ -
cursorHold_
public boolean cursorHold_ -
queryInstanceIdentifier_
public long queryInstanceIdentifier_ -
resultSetType_
public int resultSetType_ -
resultSetConcurrency_
int resultSetConcurrency_ -
resultSetHoldability_
int resultSetHoldability_ -
scrollable_
public boolean scrollable_ -
sensitivity_
public int sensitivity_ -
isRowsetCursor_
public boolean isRowsetCursor_ -
isBeforeFirst_
private boolean isBeforeFirst_ -
isAfterLast_
private boolean isAfterLast_ -
isFirst_
private boolean isFirst_ -
isLast_
private boolean isLast_ -
rowsetSqlca_
-
suggestedFetchSize_
protected int suggestedFetchSize_ -
fetchSize_
public int fetchSize_ -
fetchDirection_
private int fetchDirection_ -
rowCount_
private long rowCount_ -
absolutePosition_
private long absolutePosition_ -
firstRowInRowset_
private long firstRowInRowset_ -
lastRowInRowset_
private long lastRowInRowset_ -
currentRowInRowset_
private long currentRowInRowset_ -
isOnInsertRow_
private boolean isOnInsertRow_ -
isOnCurrentRow_
private boolean isOnCurrentRow_ -
rowsReceivedInCurrentRowset_
public int rowsReceivedInCurrentRowset_ -
rowsYetToBeReceivedForRowset_
public int rowsYetToBeReceivedForRowset_ -
updatedColumns_
-
columnUpdated_
private boolean[] columnUpdated_ -
preparedStatementForUpdate_
-
preparedStatementForDelete_
-
preparedStatementForInsert_
-
cursorUnpositionedOnServer_
private boolean cursorUnpositionedOnServer_ -
maxRows_
private long maxRows_ -
columnUsedFlags_
private boolean[] columnUsedFlags_Indicates which columns have been fetched as a stream or as a LOB for a row. Created on-demand by a getXXXStream or a get[BC]lob call. Note that we only track columns that can be accessed as a stream or a LOB object. -
listenToUnitOfWork_
private boolean listenToUnitOfWork_
-
-
Constructor Details
-
ClientResultSet
protected ClientResultSet(Agent agent, ClientStatement statement, Cursor cursor, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
-
-
Method Details
-
next
- Specified by:
next
in interfaceResultSet
- Throws:
SQLException
-
nextX
- Throws:
SqlException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceResultSet
- Throws:
SQLException
-
closeX
- Throws:
SqlException
-
closeStatementOnCompletion
private void closeStatementOnCompletion()Close Statement if it is set to closeOnCompletion -
nullDataForGC
private void nullDataForGC() -
flowCloseAndAutoCommitIfNotAutoCommitted
- Throws:
SqlException
-
writeCloseAndAutoCommit
- Throws:
SqlException
-
readCloseAndAutoCommit
- Throws:
SqlException
-
writeClose
- Throws:
SqlException
-
readClose
- Throws:
SqlException
-
readAutoCommitIfNotAutoCommitted
- Throws:
SqlException
-
wasNull
- Specified by:
wasNull
in interfaceResultSet
- Throws:
SQLException
-
getBoolean
- Specified by:
getBoolean
in interfaceResultSet
- Throws:
SQLException
-
getByte
- Specified by:
getByte
in interfaceResultSet
- Throws:
SQLException
-
getShort
- Specified by:
getShort
in interfaceResultSet
- Throws:
SQLException
-
getInt
- Specified by:
getInt
in interfaceResultSet
- Throws:
SQLException
-
getLong
- Specified by:
getLong
in interfaceResultSet
- Throws:
SQLException
-
getFloat
- Specified by:
getFloat
in interfaceResultSet
- Throws:
SQLException
-
getDouble
- Specified by:
getDouble
in interfaceResultSet
- Throws:
SQLException
-
getBigDecimal
Deprecated.- Specified by:
getBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
getBigDecimal
- Specified by:
getBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
getDate
- Specified by:
getDate
in interfaceResultSet
- Throws:
SQLException
-
getDate
- Specified by:
getDate
in interfaceResultSet
- Throws:
SQLException
-
getTime
- Specified by:
getTime
in interfaceResultSet
- Throws:
SQLException
-
getTime
- Specified by:
getTime
in interfaceResultSet
- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestamp
in interfaceResultSet
- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestamp
in interfaceResultSet
- Throws:
SQLException
-
createCalendar
Create a calendar with default locale and time zone.- Parameters:
date
- the initial time of the calendar- Returns:
- a calendar initialized to the specified time
-
convertFromDefaultCalendar
Convert a date originally set using the default calendar to a value representing the same date in a different calendar.- Parameters:
date
- the date to convertcal
- the calendar to convert it to- Returns:
- a date object that represents the date in
cal
-
convertFromDefaultCalendar
Convert a time originally set using the default calendar to a value representing the same time in a different calendar.- Parameters:
time
- the time to convertcal
- the calendar to convert it to- Returns:
- a time object that represents the time in
cal
-
convertFromDefaultCalendar
Convert a timestamp originally set using the default calendar to a value representing the same timestamp in a different calendar.- Parameters:
ts
- the timestamp to convertcal
- the calendar to convert it to- Returns:
- a timestamp object that represents the timestamp in
cal
-
getString
- Specified by:
getString
in interfaceResultSet
- Throws:
SQLException
-
getBytes
- Specified by:
getBytes
in interfaceResultSet
- Throws:
SQLException
-
getBinaryStream
- Specified by:
getBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
getAsciiStream
- Specified by:
getAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
getUnicodeStream
Deprecated.Retrieve the value of the specified column as a stream of two-byte Unicode characters. Deprecated in JDBC 2.0 and this method will just throw a feature not implemented exception.- Specified by:
getUnicodeStream
in interfaceResultSet
- Parameters:
column
- the column to retrieve as a Unicode stream- Throws:
SQLException
- throws feature not implemented
-
getCharacterStream
- Specified by:
getCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
getBlob
- Specified by:
getBlob
in interfaceResultSet
- Throws:
SQLException
-
getClob
- Specified by:
getClob
in interfaceResultSet
- Throws:
SQLException
-
getRef
- Specified by:
getRef
in interfaceResultSet
- Throws:
SQLException
-
getArray
- Specified by:
getArray
in interfaceResultSet
- Throws:
SQLException
-
getObject
- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
-
getObjectX
- Throws:
SqlException
-
getObject
- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
-
wasNonNullSensitiveUpdate
private boolean wasNonNullSensitiveUpdate(int column) -
wasNullSensitiveUpdate
private boolean wasNullSensitiveUpdate(int column) -
setWasNull
private void setWasNull(int column) -
isNull
private boolean isNull(int column) -
getBoolean
- Specified by:
getBoolean
in interfaceResultSet
- Throws:
SQLException
-
getByte
- Specified by:
getByte
in interfaceResultSet
- Throws:
SQLException
-
getShort
- Specified by:
getShort
in interfaceResultSet
- Throws:
SQLException
-
getInt
- Specified by:
getInt
in interfaceResultSet
- Throws:
SQLException
-
getLong
- Specified by:
getLong
in interfaceResultSet
- Throws:
SQLException
-
getFloat
- Specified by:
getFloat
in interfaceResultSet
- Throws:
SQLException
-
getDouble
- Specified by:
getDouble
in interfaceResultSet
- Throws:
SQLException
-
getBigDecimal
Deprecated.- Specified by:
getBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
getBigDecimal
- Specified by:
getBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
getDate
- Specified by:
getDate
in interfaceResultSet
- Throws:
SQLException
-
getDate
- Specified by:
getDate
in interfaceResultSet
- Throws:
SQLException
-
getTime
- Specified by:
getTime
in interfaceResultSet
- Throws:
SQLException
-
getTime
- Specified by:
getTime
in interfaceResultSet
- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestamp
in interfaceResultSet
- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestamp
in interfaceResultSet
- Throws:
SQLException
-
getString
- Specified by:
getString
in interfaceResultSet
- Throws:
SQLException
-
getBytes
- Specified by:
getBytes
in interfaceResultSet
- Throws:
SQLException
-
getBinaryStream
- Specified by:
getBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
getAsciiStream
- Specified by:
getAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
getUnicodeStream
Deprecated.- Specified by:
getUnicodeStream
in interfaceResultSet
- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
getBlob
- Specified by:
getBlob
in interfaceResultSet
- Throws:
SQLException
-
getClob
- Specified by:
getClob
in interfaceResultSet
- Throws:
SQLException
-
getArray
- Specified by:
getArray
in interfaceResultSet
- Throws:
SQLException
-
getRef
- Specified by:
getRef
in interfaceResultSet
- Throws:
SQLException
-
getObject
- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
-
getObject
- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
-
getWarnings
Returns the firstSQLWarning
reported on thisResultSet
object, ornull
if there are no warnings. Subsequent warnings are chained on the returned object.- Specified by:
getWarnings
in interfaceResultSet
- Returns:
- the first
SQLWarning
in the chain, ornull
if no warnings are reported - Throws:
SQLException
- if a database error occurs or the result set is closed
-
clearWarnings
Clear all warnings on thisResultSet
and make subsequent calls togetWarnings()
returnnull
until a new warning is reported.- Specified by:
clearWarnings
in interfaceResultSet
- Throws:
SQLException
- if a database error occurs or the result set is closed
-
clearWarningsX
private void clearWarningsX() -
getCursorName
- Specified by:
getCursorName
in interfaceResultSet
- Throws:
SQLException
-
getMetaData
- Specified by:
getMetaData
in interfaceResultSet
- Throws:
SQLException
-
getMetaDataX
- Throws:
SqlException
-
findColumn
- Specified by:
findColumn
in interfaceResultSet
- Throws:
SQLException
-
findColumnX
- Throws:
SqlException
-
isBeforeFirst
- Specified by:
isBeforeFirst
in interfaceResultSet
- Throws:
SQLException
-
isBeforeFirstX
- Throws:
SqlException
-
isAfterLast
- Specified by:
isAfterLast
in interfaceResultSet
- Throws:
SQLException
-
isAfterLastX
- Throws:
SqlException
-
isFirst
- Specified by:
isFirst
in interfaceResultSet
- Throws:
SQLException
-
isFirstX
private boolean isFirstX() -
isLast
- Specified by:
isLast
in interfaceResultSet
- Throws:
SQLException
-
isLastX
- Throws:
SqlException
-
beforeFirst
- Specified by:
beforeFirst
in interfaceResultSet
- Throws:
SQLException
-
beforeFirstX
- Throws:
SqlException
-
afterLast
- Specified by:
afterLast
in interfaceResultSet
- Throws:
SQLException
-
afterLastX
- Throws:
SqlException
-
first
- Specified by:
first
in interfaceResultSet
- Throws:
SQLException
-
firstX
- Throws:
SqlException
-
last
- Specified by:
last
in interfaceResultSet
- Throws:
SQLException
-
lastX
- Throws:
SqlException
-
getRow
- Specified by:
getRow
in interfaceResultSet
- Throws:
SQLException
-
getRowX
- Throws:
SqlException
-
absolute
- Specified by:
absolute
in interfaceResultSet
- Throws:
SQLException
-
absoluteX
- Throws:
SqlException
-
relative
- Specified by:
relative
in interfaceResultSet
- Throws:
SQLException
-
relativeX
- Throws:
SqlException
-
previous
- Specified by:
previous
in interfaceResultSet
- Throws:
SQLException
-
previousX
- Throws:
SqlException
-
setFetchDirection
- Specified by:
setFetchDirection
in interfaceResultSet
- Throws:
SQLException
-
getFetchDirection
- Specified by:
getFetchDirection
in interfaceResultSet
- Throws:
SQLException
-
setFetchSize
- Specified by:
setFetchSize
in interfaceResultSet
- Throws:
SQLException
-
getFetchSize
- Specified by:
getFetchSize
in interfaceResultSet
- Throws:
SQLException
-
getType
- Specified by:
getType
in interfaceResultSet
- Throws:
SQLException
-
getConcurrency
- Specified by:
getConcurrency
in interfaceResultSet
- Throws:
SQLException
-
rowUpdated
- Specified by:
rowUpdated
in interfaceResultSet
- Throws:
SQLException
-
rowInserted
- Specified by:
rowInserted
in interfaceResultSet
- Throws:
SQLException
-
rowDeleted
- Specified by:
rowDeleted
in interfaceResultSet
- Throws:
SQLException
-
updateNull
- Specified by:
updateNull
in interfaceResultSet
- Throws:
SQLException
-
updateBoolean
- Specified by:
updateBoolean
in interfaceResultSet
- Throws:
SQLException
-
updateByte
- Specified by:
updateByte
in interfaceResultSet
- Throws:
SQLException
-
updateShort
- Specified by:
updateShort
in interfaceResultSet
- Throws:
SQLException
-
updateInt
- Specified by:
updateInt
in interfaceResultSet
- Throws:
SQLException
-
updateLong
- Specified by:
updateLong
in interfaceResultSet
- Throws:
SQLException
-
updateFloat
- Specified by:
updateFloat
in interfaceResultSet
- Throws:
SQLException
-
updateDouble
- Specified by:
updateDouble
in interfaceResultSet
- Throws:
SQLException
-
updateBigDecimal
- Specified by:
updateBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
updateDate
- Specified by:
updateDate
in interfaceResultSet
- Throws:
SQLException
-
updateTime
- Specified by:
updateTime
in interfaceResultSet
- Throws:
SQLException
-
updateTimestamp
- Specified by:
updateTimestamp
in interfaceResultSet
- Throws:
SQLException
-
updateString
- Specified by:
updateString
in interfaceResultSet
- Throws:
SQLException
-
updateBytes
- Specified by:
updateBytes
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateObject
- Specified by:
updateObject
in interfaceResultSet
- Throws:
SQLException
-
updateObject
- Specified by:
updateObject
in interfaceResultSet
- Throws:
SQLException
-
updateNCharacterStream
- Specified by:
updateNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
updateNull
- Specified by:
updateNull
in interfaceResultSet
- Throws:
SQLException
-
updateBoolean
- Specified by:
updateBoolean
in interfaceResultSet
- Throws:
SQLException
-
updateByte
- Specified by:
updateByte
in interfaceResultSet
- Throws:
SQLException
-
updateShort
- Specified by:
updateShort
in interfaceResultSet
- Throws:
SQLException
-
updateInt
- Specified by:
updateInt
in interfaceResultSet
- Throws:
SQLException
-
updateLong
- Specified by:
updateLong
in interfaceResultSet
- Throws:
SQLException
-
updateFloat
- Specified by:
updateFloat
in interfaceResultSet
- Throws:
SQLException
-
updateDouble
- Specified by:
updateDouble
in interfaceResultSet
- Throws:
SQLException
-
updateBigDecimal
- Specified by:
updateBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
updateDate
- Specified by:
updateDate
in interfaceResultSet
- Throws:
SQLException
-
updateTime
- Specified by:
updateTime
in interfaceResultSet
- Throws:
SQLException
-
updateTimestamp
- Specified by:
updateTimestamp
in interfaceResultSet
- Throws:
SQLException
-
updateString
- Specified by:
updateString
in interfaceResultSet
- Throws:
SQLException
-
updateBytes
- Specified by:
updateBytes
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateObject
- Specified by:
updateObject
in interfaceResultSet
- Throws:
SQLException
-
updateObject
- Specified by:
updateObject
in interfaceResultSet
- Throws:
SQLException
-
updateNCharacterStream
- Specified by:
updateNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
insertRow
- Specified by:
insertRow
in interfaceResultSet
- Throws:
SQLException
-
insertRowX
- Throws:
SqlException
-
updateRow
- Specified by:
updateRow
in interfaceResultSet
- Throws:
SQLException
-
updateRowX
- Throws:
SqlException
-
deleteRow
- Specified by:
deleteRow
in interfaceResultSet
- Throws:
SQLException
-
deleteRowX
- Throws:
SqlException
-
refreshRow
- Specified by:
refreshRow
in interfaceResultSet
- Throws:
SQLException
-
refreshRowX
- Throws:
SqlException
-
cancelRowUpdates
- Specified by:
cancelRowUpdates
in interfaceResultSet
- Throws:
SQLException
-
moveToInsertRow
- Specified by:
moveToInsertRow
in interfaceResultSet
- Throws:
SQLException
-
moveToCurrentRow
- Specified by:
moveToCurrentRow
in interfaceResultSet
- Throws:
SQLException
-
moveToCurrentRowX
Moves off the insert row if positioned there, and checks the current row for releasable LOB locators if positioned on a valid data row.- Throws:
SqlException
- if releasing a LOB locator fails
-
getStatement
Retrieves theStatement
object that produced this object, ornull
if theResultSet
was not produced by aStatement
object.- Specified by:
getStatement
in interfaceResultSet
- Returns:
- the
Statement
that produced this object ornull
- Throws:
SQLException
- if a database error occurs or the result set is closed
-
getURL
- Specified by:
getURL
in interfaceResultSet
- Throws:
SQLException
-
getURL
- Specified by:
getURL
in interfaceResultSet
- Throws:
SQLException
-
updateRef
- Specified by:
updateRef
in interfaceResultSet
- Throws:
SQLException
-
updateRef
- Specified by:
updateRef
in interfaceResultSet
- Throws:
SQLException
-
updateBlob
Updates the designated column with ajava.sql.Blob
value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateBlob
in interfaceResultSet
- Parameters:
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value- Throws:
SQLException
- if the columnIndex is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateBlob
Updates the designated column with ajava.sql.Blob
value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateBlob
in interfaceResultSet
- Parameters:
columnName
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnx
- the new column value- Throws:
SQLException
- if the columnLabel is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateBlob
Updates the designated column using the given input stream, which will have the specified number of bytes. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateBlob
in interfaceResultSet
- Parameters:
columnIndex
- the first column is 1, the second is 2, ...x
- An object that contains the data to set the parameter value to.length
- the number of bytes in the parameter data.- Throws:
SQLException
- if the columnIndex is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateBlob
Updates the designated column using the given input stream, which will have the specified number of bytes. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateBlob
in interfaceResultSet
- Parameters:
columnName
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnx
- An object that contains the data to set the parameter value to.length
- the number of bytes in the parameter data.- Throws:
SQLException
- if the columnLabel is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateArray
- Specified by:
updateArray
in interfaceResultSet
- Throws:
SQLException
-
updateArray
- Specified by:
updateArray
in interfaceResultSet
- Throws:
SQLException
-
repositionScrollableResultSetBeforeJDBC1PositionedUpdateDelete
- Throws:
SqlException
-
flowPositioningFetch
- Throws:
DisconnectException
-
positionToCurrentRowAndUpdate
- Throws:
SqlException
-
insert
- Throws:
SqlException
-
update
- Throws:
SqlException
-
positionToCurrentRowAndDelete
- Throws:
SqlException
-
delete
- Throws:
SqlException
-
setRowsetAfterLastEvent
- Throws:
SqlException
-
setRowsetBeforeFirstEvent
- Throws:
SqlException
-
setRowsetNoRowsEvent
private void setRowsetNoRowsEvent() -
isServersCursorPositionBeforeFirst
- Throws:
SqlException
-
isServerCursorPositionAfterLast
private boolean isServerCursorPositionAfterLast() -
setValidCursorPosition
public void setValidCursorPosition(boolean isValidCursorPosition) -
moveToAfterLast
- Throws:
DisconnectException
-
moveToBeforeFirst
- Throws:
DisconnectException
-
writeInsertRow
- Throws:
SQLException
-
writeUpdateRow
- Throws:
SQLException
-
writeDeleteRow
- Throws:
SQLException
-
readInsertRow
- Throws:
DisconnectException
SqlException
-
readUpdateRow
- Throws:
DisconnectException
SqlException
-
readDeleteRow
- Throws:
DisconnectException
SqlException
-
listenToUnitOfWork
public void listenToUnitOfWork()- Specified by:
listenToUnitOfWork
in interfaceUnitOfWorkListener
-
completeLocalCommit
- Specified by:
completeLocalCommit
in interfaceUnitOfWorkListener
-
completeLocalRollback
- Specified by:
completeLocalRollback
in interfaceUnitOfWorkListener
-
nullOutReferenceInStatement
private void nullOutReferenceInStatement() -
markClosed
void markClosed()Mark this ResultSet as closed. The ResultSet will not be removed from the commit and rollback listeners list inConnection
. -
markClosed
void markClosed(boolean removeListener) Mark this ResultSet as closed.- Parameters:
removeListener
- if true the ResultSet will be removed from the commit and rollback listeners list inConnection
.
-
markClosedOnServer
public void markClosedOnServer()Mark this ResultSet as closed on the server. -
markAutoCommitted
void markAutoCommitted() -
earlyCloseComplete
- Specified by:
earlyCloseComplete
in interfaceResultSetCallbackInterface
-
completeSqlca
- Specified by:
completeSqlca
in interfaceResultSetCallbackInterface
-
setRowCountEvent
- Throws:
DisconnectException
-
accumulateWarning
- Specified by:
accumulateWarning
in interfaceResultSetCallbackInterface
-
rowCountIsUnknown
boolean rowCountIsUnknown() -
updateColumn
-
buildInsertString
- Throws:
SqlException
-
buildUpdateString
- Throws:
SqlException
-
buildDeleteString
- Throws:
SqlException
-
getTableName
- Throws:
SqlException
-
getServerCursorName
- Throws:
SqlException
-
getPreparedStatementForInsert
- Throws:
SqlException
-
getPreparedStatementForUpdate
- Throws:
SqlException
-
getPreparedStatementForDelete
- Throws:
SqlException
-
resetUpdatedColumnsForInsert
private final void resetUpdatedColumnsForInsert() -
resetUpdatedColumns
private final void resetUpdatedColumns() -
getRowUncast
private final long getRowUncast() -
checkGetterPreconditions
- Throws:
SqlException
-
checkUpdatePreconditions
- Throws:
SqlException
-
checkForValidColumnIndex
- Throws:
SqlException
-
checkForClosedResultSet
- Throws:
SqlException
-
checkForUpdatableResultSet
- Throws:
SqlException
-
checkForValidCursorPosition
- Throws:
SqlException
-
checkPositionedOnPlainRow
- Throws:
SqlException
-
checkThatResultSetTypeIsScrollable
- Throws:
SqlException
-
checkThatResultSetIsNotDynamic
- Throws:
SqlException
-
resultSetContainsNoRows
- Throws:
SqlException
-
rowIsInCurrentRowset
- Throws:
SqlException
-
rowIsInCurrentRowset
private boolean rowIsInCurrentRowset(long rowNumber) -
markPositionedUpdateDeletePreparedStatementsClosed
private void markPositionedUpdateDeletePreparedStatementsClosed() -
updateColumnInfoFromCache
private void updateColumnInfoFromCache() -
checkAndThrowReceivedQueryTerminatingException
- Throws:
SqlException
-
parseScrollableRowset
- Throws:
SqlException
-
getRSReturnability
public byte getRSReturnability() -
setRSReturnability
public void setRSReturnability(byte rsReturnability) -
getRowCount
- Throws:
SqlException
-
flowGetRowset
- Throws:
SqlException
-
getNextRowset
- Throws:
SqlException
-
adjustNextRowset
private void adjustNextRowset() -
getPreviousRowset
- Throws:
SqlException
-
adjustPreviousRowset
private void adjustPreviousRowset(int orientation, long rowNumber, boolean isAfterLastRow) -
getAbsoluteRowset
- Throws:
SqlException
-
adjustAbsoluteRowset
private void adjustAbsoluteRowset(long rowNumber) -
getRelativeRowset
- Throws:
SqlException
-
adjustRelativeRowset
private void adjustRelativeRowset(long rowNumber) -
getFirstRowset
- Throws:
SqlException
-
adjustFirstRowset
private void adjustFirstRowset() -
getLastRowset
- Throws:
SqlException
-
adjustLastRowset
private void adjustLastRowset(long row) -
getRefreshRowset
- Throws:
SqlException
-
adjustRefreshRowset
private void adjustRefreshRowset() -
setAbsolutePositionBasedOnAllRowsReceived
private void setAbsolutePositionBasedOnAllRowsReceived() -
writeFetch_
- Throws:
SqlException
-
readFetch_
- Throws:
SqlException
-
writeScrollableFetch_
public abstract void writeScrollableFetch_(Section section, int fetchSize, int orientation, long rowToFetch, boolean resetQueryBlocks) throws SqlException - Throws:
SqlException
-
readScrollableFetch_
- Throws:
SqlException
-
writePositioningFetch_
public abstract void writePositioningFetch_(Section section, int orientation, long rowToFetch) throws SqlException - Throws:
SqlException
-
readPositioningFetch_
- Throws:
SqlException
-
writeCursorClose_
- Throws:
SqlException
-
readCursorClose_
- Throws:
SqlException
-
parseRowset_
- Throws:
SqlException
-
setFetchSize_
public abstract void setFetchSize_(int rows) -
preClose_
Method that is invoked bycloseX()
before the result set is actually being closed. Subclasses may override this method if work needs to be done before closing.- Throws:
SqlException
-
getConnectionCallbackInterface
- Specified by:
getConnectionCallbackInterface
in interfaceResultSetCallbackInterface
-
getStatementCallbackInterface
- Specified by:
getStatementCallbackInterface
in interfaceResultSetCallbackInterface
-
expandRowsetSqlca
public void expandRowsetSqlca() -
checkRowsetSqlca
- Throws:
SqlException
-
checkRowsetSqlca
- Throws:
SqlException
-
resetRowsetFlags
private void resetRowsetFlags() -
resetRowsetSqlca
private void resetRowsetSqlca() -
createCloseFilterInputStream
- Throws:
SqlException
-
closeOpenStreams
Closes the current stream, if there is one.Note that streams are implicitly closed when the next value is fetched.
- Throws:
SqlException
- if closing the stream fails
-
useStreamOrLOB
Mark a column as already having a stream or LOB accessed from it. If the column was already accessed, throw an exception.- Parameters:
columnIndex
- 1-based column index- Throws:
SQLException
- if the column has already been accessedSqlException
-
checkLOBMultiCall
Checks if a stream or a LOB object has already been created for the specified LOB column.Accessing a LOB column more than once is not forbidden by the JDBC specification, but the Java API states that for maximum portability, result set columns within each row should be read in left-to-right order, and each column should be read only once. The restriction was implemented in Derby due to complexities with the positioning of store streams when the user was given multiple handles to the stream.
- Parameters:
columnIndex
- 1-based index of the LOB column- Throws:
SqlException
- if the column has already been accessed
-
unuseStreamsAndLOBs
private void unuseStreamsAndLOBs()Clears the flags for used columns, typically invoked when changing the result set position. -
jdbc3MethodNotSupported
-
getHoldability
Retrieves the holdability for thisResultSet
object.- Specified by:
getHoldability
in interfaceResultSet
- Returns:
- either
ResultSet.HOLD_CURSORS_OVER_COMMIT
orResultSet.CLOSE_CURSORS_AT_COMMIT
- Throws:
SQLException
- if a database error occurs
-
isClosed
Checks whether thisResultSet
object has been closed, either automatically or becauseclose()
has been called.- Specified by:
isClosed
in interfaceResultSet
- Returns:
true
if theResultSet
is closed,false
otherwise- Throws:
SQLException
- if a database error occurs
-
updateAsciiStream
Updates the designated column with an ascii stream value. The data will be read from the stream as needed until end-of-stream is reached. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateAsciiStream
in interfaceResultSet
- Parameters:
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value- Throws:
SQLException
- if the columnIndex is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateAsciiStream
Update a column with an ascii stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.- Specified by:
updateAsciiStream
in interfaceResultSet
- Parameters:
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valuelength
- the length of the stream- Throws:
SQLException
- if a database-access error occurs
-
updateBinaryStream
Updates the designated column with a binary stream value. The data will be read from the stream as needed until end-of-stream is reached. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateBinaryStream
in interfaceResultSet
- Parameters:
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value- Throws:
SQLException
- if the columnIndex is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateBinaryStream
Update a column with a binary stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.- Specified by:
updateBinaryStream
in interfaceResultSet
- Parameters:
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valuelength
- the length of the stream- Throws:
SQLException
- if a database-access error occurs
-
updateBlob
Updates the designated column using the given input stream. The data will be read from the stream as needed until end-of-stream is reached. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateBlob
in interfaceResultSet
- Parameters:
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value- Throws:
SQLException
- if the columnIndex is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateCharacterStream
Updates the designated column with a character stream value. The data will be read from the stream as needed until end-of-stream is reached. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateCharacterStream
in interfaceResultSet
- Parameters:
columnIndex
- the first column is 1, the second is 2, ...reader
- the new column value- Throws:
SQLException
- if the columnLabel is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateCharacterStream
Update a column with a character stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.- Specified by:
updateCharacterStream
in interfaceResultSet
- Parameters:
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valuelength
- the length of the stream- Throws:
SQLException
- if a database-access error occurs
-
updateClob
Updates the designated column using the givenReader
object. The data will be read from the stream as needed until end-of-stream is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateClob
in interfaceResultSet
- Parameters:
columnIndex
- the first column is 1, the second is 2, ...reader
- an object that contains the data to set the parameter value to.- Throws:
SQLException
- if the columnIndex is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateAsciiStream
Updates the designated column with an ascii stream value. The data will be read from the stream as needed until end-of-stream is reached. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateAsciiStream
in interfaceResultSet
- Parameters:
columnName
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnx
- the new column value- Throws:
SQLException
- if the columnLabel is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateAsciiStream
Update a column with an ascii stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.- Specified by:
updateAsciiStream
in interfaceResultSet
- Parameters:
columnName
- the name of the columnx
- the new column valuelength
- of the stream- Throws:
SQLException
- if a database-access error occurs
-
updateBinaryStream
Updates the designated column with a binary stream value. The data will be read from the stream as needed until end-of-stream is reached. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateBinaryStream
in interfaceResultSet
- Parameters:
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnx
- the new column value- Throws:
SQLException
- if the columnLabel is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateBinaryStream
Update a column with a binary stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.- Specified by:
updateBinaryStream
in interfaceResultSet
- Parameters:
columnName
- the name of the columnx
- the new column valuelength
- of the stream- Throws:
SQLException
- if a database-access error occurs
-
updateBlob
Updates the designated column using the given input stream. The data will be read from the stream as needed until end-of-stream is reached. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateBlob
in interfaceResultSet
- Parameters:
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnx
- the new column value- Throws:
SQLException
- if the columnLabel is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateCharacterStream
Updates the designated column with a character stream value. The data will be read from the stream as needed until end-of-stream is reached. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateCharacterStream
in interfaceResultSet
- Parameters:
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnreader
- the new column value- Throws:
SQLException
- if the columnLabel is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateCharacterStream
public void updateCharacterStream(String columnName, Reader reader, long length) throws SQLException Update a column with a character stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.- Specified by:
updateCharacterStream
in interfaceResultSet
- Parameters:
columnName
- the name of the columnreader
- the new column valuelength
- length of the stream- Throws:
SQLException
- if a database-access error occurs
-
updateClob
Updates the designated column using the givenReader
object. The data will be read from the stream as needed until end-of-stream is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateClob
in interfaceResultSet
- Parameters:
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnreader
- an object that contains the data to set the parameter value to.- Throws:
SQLException
- if the columnIndex is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateClob
Updates the designated column using the givenReader
object, which is the given number of characters long. When a very large UNICODE value is input to aLONGVARCHAR
parameter, it may be more practical to send it via ajava.io.Reader
object. The JDBC driver will do any necessary conversion from UNICODE to the database char format.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the
updateRow
orinsertRow
methods are called to update the database.- Specified by:
updateClob
in interfaceResultSet
- Parameters:
columnIndex
- the first column is 1, the second is 2, ...x
- An object that contains the data to set the parameter value to.length
- the number of characters in the parameter data.- Throws:
SQLException
- if the columnIndex is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result setSQLFeatureNotSupportedException
- if the JDBC driver does not support this method
-
updateClob
Updates the designated column using the givenReader
object, which is the given number of characters long. When a very large UNICODE value is input to aLONGVARCHAR
parameter, it may be more practical to send it via ajava.io.Reader
object. The JDBC driver will do any necessary conversion from UNICODE to the database char format.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the
updateRow
orinsertRow
methods are called to update the database.- Specified by:
updateClob
in interfaceResultSet
- Parameters:
columnName
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnx
- An object that contains the data to set the parameter value to.length
- the number of characters in the parameter data.- Throws:
SQLException
- if the columnLabel is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result setSQLFeatureNotSupportedException
- if the JDBC driver does not support this method
-
updateClob
Updates the designated column with ajava.sql.Clob
value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateClob
in interfaceResultSet
- Parameters:
columnIndex
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnx
- the new column value- Throws:
SQLException
- if the columnLabel is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
updateClob
Updates the designated column with ajava.sql.Clob
value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead theupdateRow
orinsertRow
methods are called to update the database.- Specified by:
updateClob
in interfaceResultSet
- Parameters:
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnx
- the new column value- Throws:
SQLException
- if the columnLabel is not valid; if a database access error occurs; the result set concurrency isCONCUR_READ_ONLY
or this method is called on a closed result set
-
markLOBAsPublished
public final void markLOBAsPublished(int index) Marks the LOB at the specified column as published.When a LOB is marked as published, the release mechanism will not be invoked by the result set. It is expected that the code accessing the LOB releases the locator when it is done with the LOB, or that the commit/rollback handles the release.
- Parameters:
index
- 1-based column index
-
createLOBColumnTracker
final void createLOBColumnTracker()Initializes the LOB state tracker.The state tracker is used to free LOB locators on the server. If the server doesn't support locators, or there are no LOBs in the result set, a no-op tracker will be used.
-
getNCharacterStream
- Specified by:
getNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
getNCharacterStream
- Specified by:
getNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
getNString
- Specified by:
getNString
in interfaceResultSet
- Throws:
SQLException
-
getNString
- Specified by:
getNString
in interfaceResultSet
- Throws:
SQLException
-
getRowId
- Specified by:
getRowId
in interfaceResultSet
- Throws:
SQLException
-
getRowId
- Specified by:
getRowId
in interfaceResultSet
- Throws:
SQLException
-
updateRowId
- Specified by:
updateRowId
in interfaceResultSet
- Throws:
SQLException
-
updateRowId
- Specified by:
updateRowId
in interfaceResultSet
- Throws:
SQLException
-
updateNString
- Specified by:
updateNString
in interfaceResultSet
- Throws:
SQLException
-
updateNString
- Specified by:
updateNString
in interfaceResultSet
- Throws:
SQLException
-
updateNCharacterStream
- Specified by:
updateNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateNCharacterStream
- Specified by:
updateNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
getNClob
- Specified by:
getNClob
in interfaceResultSet
- Throws:
SQLException
-
getNClob
- Specified by:
getNClob
in interfaceResultSet
- Throws:
SQLException
-
getSQLXML
- Specified by:
getSQLXML
in interfaceResultSet
- Throws:
SQLException
-
getSQLXML
- Specified by:
getSQLXML
in interfaceResultSet
- Throws:
SQLException
-
updateSQLXML
- Specified by:
updateSQLXML
in interfaceResultSet
- Throws:
SQLException
-
updateSQLXML
- Specified by:
updateSQLXML
in interfaceResultSet
- Throws:
SQLException
-
isWrapperFor
Returns false unlessinterfaces
is implemented- Specified by:
isWrapperFor
in interfaceWrapper
- Parameters:
interfaces
- a Class defining an interface.- Returns:
- true if this implements the interface or directly or indirectly wraps an object that does.
- Throws:
SQLException
- if an error occurs while determining whether this is a wrapper for an object with the given interface.
-
unwrap
Returnsthis
if this class implements the interface- Specified by:
unwrap
in interfaceWrapper
- Parameters:
interfaces
- a Class defining an interface- Returns:
- an object that implements the interface
- Throws:
SQLException
- if no object if found that implements the interface
-
updateNClob
Updates the designated column with a java.sql.NClob value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.- Specified by:
updateNClob
in interfaceResultSet
- Parameters:
columnIndex
- - the first column is 1, the second is 2x
- - the new column value- Throws:
SQLException
- Feature not implemented for now.
-
updateNClob
Updates the designated column with a java.sql.NClob value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.- Parameters:
columnName
- - the name of the Clob columnx
- - the new column value- Throws:
SQLException
- Feature not implemented for now.
-
updateNClob
Updates the designated column with a java.sql.NClob value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.- Specified by:
updateNClob
in interfaceResultSet
- Parameters:
columnName
- - the name of the Clob columnx
- - the new column value- Throws:
SQLException
- Feature not implemented for now.
-
getObject
Retrieve the column as an object of the desired type.- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
-
mismatchException
- Throws:
SQLException
-
getObject
- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
-