Class ClientResultSet

java.lang.Object
org.apache.derby.client.am.ClientResultSet
All Implemented Interfaces:
AutoCloseable, ResultSet, Wrapper, ResultSetCallbackInterface, UnitOfWorkListener
Direct Known Subclasses:
NetResultSet

public abstract class ClientResultSet extends Object implements ResultSet, ResultSetCallbackInterface
  • Field Details

    • statement_

      public ClientStatement statement_
    • outerStatement_

      ClientStatement outerStatement_
    • resultSetMetaData_

      public ColumnMetaData resultSetMetaData_
    • warnings_

      private SqlWarning warnings_
    • cursor_

      public Cursor cursor_
    • lobState

      private LOBStateTracker lobState
      Tracker object for LOB state, used to free locators on the server.
    • agent_

      protected Agent agent_
    • generatedSection_

      public Section generatedSection_
    • currentStream

      private CloseFilterInputStream currentStream
    • currentReader

      private Reader currentReader
    • connection_

      private final ClientConnection 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_

      public Sqlca 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_

      public Sqlca[] 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_

      private Object[] updatedColumns_
    • columnUpdated_

      private boolean[] columnUpdated_
    • preparedStatementForUpdate_

      private ClientPreparedStatement preparedStatementForUpdate_
    • preparedStatementForDelete_

      private ClientPreparedStatement preparedStatementForDelete_
    • preparedStatementForInsert_

      private ClientPreparedStatement 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

      public final boolean next() throws SQLException
      Specified by:
      next in interface ResultSet
      Throws:
      SQLException
    • nextX

      boolean nextX() throws SqlException
      Throws:
      SqlException
    • close

      public void close() throws SQLException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface ResultSet
      Throws:
      SQLException
    • closeX

      public final void closeX() throws SqlException
      Throws:
      SqlException
    • closeStatementOnCompletion

      private void closeStatementOnCompletion()
      Close Statement if it is set to closeOnCompletion
    • nullDataForGC

      private void nullDataForGC()
    • flowCloseAndAutoCommitIfNotAutoCommitted

      private void flowCloseAndAutoCommitIfNotAutoCommitted() throws SqlException
      Throws:
      SqlException
    • writeCloseAndAutoCommit

      private boolean writeCloseAndAutoCommit() throws SqlException
      Throws:
      SqlException
    • readCloseAndAutoCommit

      private void readCloseAndAutoCommit(boolean readAutoCommit) throws SqlException
      Throws:
      SqlException
    • writeClose

      void writeClose() throws SqlException
      Throws:
      SqlException
    • readClose

      void readClose() throws SqlException
      Throws:
      SqlException
    • readAutoCommitIfNotAutoCommitted

      private void readAutoCommitIfNotAutoCommitted() throws SqlException
      Throws:
      SqlException
    • wasNull

      public boolean wasNull() throws SQLException
      Specified by:
      wasNull in interface ResultSet
      Throws:
      SQLException
    • getBoolean

      public boolean getBoolean(int column) throws SQLException
      Specified by:
      getBoolean in interface ResultSet
      Throws:
      SQLException
    • getByte

      public byte getByte(int column) throws SQLException
      Specified by:
      getByte in interface ResultSet
      Throws:
      SQLException
    • getShort

      public short getShort(int column) throws SQLException
      Specified by:
      getShort in interface ResultSet
      Throws:
      SQLException
    • getInt

      public int getInt(int column) throws SQLException
      Specified by:
      getInt in interface ResultSet
      Throws:
      SQLException
    • getLong

      public long getLong(int column) throws SQLException
      Specified by:
      getLong in interface ResultSet
      Throws:
      SQLException
    • getFloat

      public float getFloat(int column) throws SQLException
      Specified by:
      getFloat in interface ResultSet
      Throws:
      SQLException
    • getDouble

      public double getDouble(int column) throws SQLException
      Specified by:
      getDouble in interface ResultSet
      Throws:
      SQLException
    • getBigDecimal

      public BigDecimal getBigDecimal(int column, int scale) throws SQLException
      Deprecated.
      Specified by:
      getBigDecimal in interface ResultSet
      Throws:
      SQLException
    • getBigDecimal

      public BigDecimal getBigDecimal(int column) throws SQLException
      Specified by:
      getBigDecimal in interface ResultSet
      Throws:
      SQLException
    • getDate

      public Date getDate(int column, Calendar cal) throws SQLException
      Specified by:
      getDate in interface ResultSet
      Throws:
      SQLException
    • getDate

      public Date getDate(int column) throws SQLException
      Specified by:
      getDate in interface ResultSet
      Throws:
      SQLException
    • getTime

      public Time getTime(int column, Calendar cal) throws SQLException
      Specified by:
      getTime in interface ResultSet
      Throws:
      SQLException
    • getTime

      public Time getTime(int column) throws SQLException
      Specified by:
      getTime in interface ResultSet
      Throws:
      SQLException
    • getTimestamp

      public Timestamp getTimestamp(int column, Calendar calendar) throws SQLException
      Specified by:
      getTimestamp in interface ResultSet
      Throws:
      SQLException
    • getTimestamp

      public Timestamp getTimestamp(int column) throws SQLException
      Specified by:
      getTimestamp in interface ResultSet
      Throws:
      SQLException
    • createCalendar

      private static Calendar createCalendar(Date date)
      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

      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.
      Parameters:
      date - the date to convert
      cal - the calendar to convert it to
      Returns:
      a date object that represents the date in cal
    • convertFromDefaultCalendar

      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.
      Parameters:
      time - the time to convert
      cal - the calendar to convert it to
      Returns:
      a time object that represents the time in cal
    • convertFromDefaultCalendar

      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.
      Parameters:
      ts - the timestamp to convert
      cal - the calendar to convert it to
      Returns:
      a timestamp object that represents the timestamp in cal
    • getString

      public String getString(int column) throws SQLException
      Specified by:
      getString in interface ResultSet
      Throws:
      SQLException
    • getBytes

      public byte[] getBytes(int column) throws SQLException
      Specified by:
      getBytes in interface ResultSet
      Throws:
      SQLException
    • getBinaryStream

      public InputStream getBinaryStream(int column) throws SQLException
      Specified by:
      getBinaryStream in interface ResultSet
      Throws:
      SQLException
    • getAsciiStream

      public InputStream getAsciiStream(int column) throws SQLException
      Specified by:
      getAsciiStream in interface ResultSet
      Throws:
      SQLException
    • getUnicodeStream

      public InputStream getUnicodeStream(int column) throws SQLException
      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 interface ResultSet
      Parameters:
      column - the column to retrieve as a Unicode stream
      Throws:
      SQLException - throws feature not implemented
    • getCharacterStream

      public Reader getCharacterStream(int column) throws SQLException
      Specified by:
      getCharacterStream in interface ResultSet
      Throws:
      SQLException
    • getBlob

      public Blob getBlob(int column) throws SQLException
      Specified by:
      getBlob in interface ResultSet
      Throws:
      SQLException
    • getClob

      public Clob getClob(int column) throws SQLException
      Specified by:
      getClob in interface ResultSet
      Throws:
      SQLException
    • getRef

      public Ref getRef(int column) throws SQLException
      Specified by:
      getRef in interface ResultSet
      Throws:
      SQLException
    • getArray

      public Array getArray(int column) throws SQLException
      Specified by:
      getArray in interface ResultSet
      Throws:
      SQLException
    • getObject

      public Object getObject(int column) throws SQLException
      Specified by:
      getObject in interface ResultSet
      Throws:
      SQLException
    • getObjectX

      Object getObjectX(int column) throws SqlException
      Throws:
      SqlException
    • getObject

      public Object getObject(int column, Map map) throws SQLException
      Specified by:
      getObject in interface ResultSet
      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

      public final boolean getBoolean(String columnName) throws SQLException
      Specified by:
      getBoolean in interface ResultSet
      Throws:
      SQLException
    • getByte

      public final byte getByte(String columnName) throws SQLException
      Specified by:
      getByte in interface ResultSet
      Throws:
      SQLException
    • getShort

      public final short getShort(String columnName) throws SQLException
      Specified by:
      getShort in interface ResultSet
      Throws:
      SQLException
    • getInt

      public final int getInt(String columnName) throws SQLException
      Specified by:
      getInt in interface ResultSet
      Throws:
      SQLException
    • getLong

      public final long getLong(String columnName) throws SQLException
      Specified by:
      getLong in interface ResultSet
      Throws:
      SQLException
    • getFloat

      public final float getFloat(String columnName) throws SQLException
      Specified by:
      getFloat in interface ResultSet
      Throws:
      SQLException
    • getDouble

      public final double getDouble(String columnName) throws SQLException
      Specified by:
      getDouble in interface ResultSet
      Throws:
      SQLException
    • getBigDecimal

      public final BigDecimal getBigDecimal(String columnName, int scale) throws SQLException
      Deprecated.
      Specified by:
      getBigDecimal in interface ResultSet
      Throws:
      SQLException
    • getBigDecimal

      public final BigDecimal getBigDecimal(String columnName) throws SQLException
      Specified by:
      getBigDecimal in interface ResultSet
      Throws:
      SQLException
    • getDate

      public final Date getDate(String columnName) throws SQLException
      Specified by:
      getDate in interface ResultSet
      Throws:
      SQLException
    • getDate

      public final Date getDate(String columnName, Calendar cal) throws SQLException
      Specified by:
      getDate in interface ResultSet
      Throws:
      SQLException
    • getTime

      public final Time getTime(String columnName) throws SQLException
      Specified by:
      getTime in interface ResultSet
      Throws:
      SQLException
    • getTime

      public final Time getTime(String columnName, Calendar cal) throws SQLException
      Specified by:
      getTime in interface ResultSet
      Throws:
      SQLException
    • getTimestamp

      public final Timestamp getTimestamp(String columnName) throws SQLException
      Specified by:
      getTimestamp in interface ResultSet
      Throws:
      SQLException
    • getTimestamp

      public final Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException
      Specified by:
      getTimestamp in interface ResultSet
      Throws:
      SQLException
    • getString

      public final String getString(String columnName) throws SQLException
      Specified by:
      getString in interface ResultSet
      Throws:
      SQLException
    • getBytes

      public final byte[] getBytes(String columnName) throws SQLException
      Specified by:
      getBytes in interface ResultSet
      Throws:
      SQLException
    • getBinaryStream

      public final InputStream getBinaryStream(String columnName) throws SQLException
      Specified by:
      getBinaryStream in interface ResultSet
      Throws:
      SQLException
    • getAsciiStream

      public final InputStream getAsciiStream(String columnName) throws SQLException
      Specified by:
      getAsciiStream in interface ResultSet
      Throws:
      SQLException
    • getUnicodeStream

      public final InputStream getUnicodeStream(String columnName) throws SQLException
      Deprecated.
      Specified by:
      getUnicodeStream in interface ResultSet
      Throws:
      SQLException
    • getCharacterStream

      public final Reader getCharacterStream(String columnName) throws SQLException
      Specified by:
      getCharacterStream in interface ResultSet
      Throws:
      SQLException
    • getBlob

      public final Blob getBlob(String columnName) throws SQLException
      Specified by:
      getBlob in interface ResultSet
      Throws:
      SQLException
    • getClob

      public final Clob getClob(String columnName) throws SQLException
      Specified by:
      getClob in interface ResultSet
      Throws:
      SQLException
    • getArray

      public final Array getArray(String columnName) throws SQLException
      Specified by:
      getArray in interface ResultSet
      Throws:
      SQLException
    • getRef

      public final Ref getRef(String columnName) throws SQLException
      Specified by:
      getRef in interface ResultSet
      Throws:
      SQLException
    • getObject

      public final Object getObject(String columnName) throws SQLException
      Specified by:
      getObject in interface ResultSet
      Throws:
      SQLException
    • getObject

      public final Object getObject(String columnName, Map map) throws SQLException
      Specified by:
      getObject in interface ResultSet
      Throws:
      SQLException
    • getWarnings

      public final SQLWarning getWarnings() throws SQLException
      Returns the first SQLWarning reported on this ResultSet object, or null if there are no warnings. Subsequent warnings are chained on the returned object.
      Specified by:
      getWarnings in interface ResultSet
      Returns:
      the first SQLWarning in the chain, or null if no warnings are reported
      Throws:
      SQLException - if a database error occurs or the result set is closed
    • clearWarnings

      public final void clearWarnings() throws SQLException
      Clear all warnings on this ResultSet and make subsequent calls to getWarnings() return null until a new warning is reported.
      Specified by:
      clearWarnings in interface ResultSet
      Throws:
      SQLException - if a database error occurs or the result set is closed
    • clearWarningsX

      private void clearWarningsX()
    • getCursorName

      public String getCursorName() throws SQLException
      Specified by:
      getCursorName in interface ResultSet
      Throws:
      SQLException
    • getMetaData

      public ResultSetMetaData getMetaData() throws SQLException
      Specified by:
      getMetaData in interface ResultSet
      Throws:
      SQLException
    • getMetaDataX

      ColumnMetaData getMetaDataX() throws SqlException
      Throws:
      SqlException
    • findColumn

      public final int findColumn(String columnName) throws SQLException
      Specified by:
      findColumn in interface ResultSet
      Throws:
      SQLException
    • findColumnX

      protected final int findColumnX(String columnName, String operation) throws SqlException
      Throws:
      SqlException
    • isBeforeFirst

      public boolean isBeforeFirst() throws SQLException
      Specified by:
      isBeforeFirst in interface ResultSet
      Throws:
      SQLException
    • isBeforeFirstX

      private boolean isBeforeFirstX() throws SqlException
      Throws:
      SqlException
    • isAfterLast

      public boolean isAfterLast() throws SQLException
      Specified by:
      isAfterLast in interface ResultSet
      Throws:
      SQLException
    • isAfterLastX

      private boolean isAfterLastX() throws SqlException
      Throws:
      SqlException
    • isFirst

      public boolean isFirst() throws SQLException
      Specified by:
      isFirst in interface ResultSet
      Throws:
      SQLException
    • isFirstX

      private boolean isFirstX()
    • isLast

      public boolean isLast() throws SQLException
      Specified by:
      isLast in interface ResultSet
      Throws:
      SQLException
    • isLastX

      private boolean isLastX() throws SqlException
      Throws:
      SqlException
    • beforeFirst

      public void beforeFirst() throws SQLException
      Specified by:
      beforeFirst in interface ResultSet
      Throws:
      SQLException
    • beforeFirstX

      private void beforeFirstX() throws SqlException
      Throws:
      SqlException
    • afterLast

      public void afterLast() throws SQLException
      Specified by:
      afterLast in interface ResultSet
      Throws:
      SQLException
    • afterLastX

      private void afterLastX() throws SqlException
      Throws:
      SqlException
    • first

      public boolean first() throws SQLException
      Specified by:
      first in interface ResultSet
      Throws:
      SQLException
    • firstX

      private boolean firstX() throws SqlException
      Throws:
      SqlException
    • last

      public boolean last() throws SQLException
      Specified by:
      last in interface ResultSet
      Throws:
      SQLException
    • lastX

      private boolean lastX() throws SqlException
      Throws:
      SqlException
    • getRow

      public int getRow() throws SQLException
      Specified by:
      getRow in interface ResultSet
      Throws:
      SQLException
    • getRowX

      private int getRowX() throws SqlException
      Throws:
      SqlException
    • absolute

      public boolean absolute(int row) throws SQLException
      Specified by:
      absolute in interface ResultSet
      Throws:
      SQLException
    • absoluteX

      private boolean absoluteX(int row) throws SqlException
      Throws:
      SqlException
    • relative

      public boolean relative(int rows) throws SQLException
      Specified by:
      relative in interface ResultSet
      Throws:
      SQLException
    • relativeX

      private boolean relativeX(int rows) throws SqlException
      Throws:
      SqlException
    • previous

      public boolean previous() throws SQLException
      Specified by:
      previous in interface ResultSet
      Throws:
      SQLException
    • previousX

      private boolean previousX() throws SqlException
      Throws:
      SqlException
    • setFetchDirection

      public void setFetchDirection(int direction) throws SQLException
      Specified by:
      setFetchDirection in interface ResultSet
      Throws:
      SQLException
    • getFetchDirection

      public int getFetchDirection() throws SQLException
      Specified by:
      getFetchDirection in interface ResultSet
      Throws:
      SQLException
    • setFetchSize

      public void setFetchSize(int rows) throws SQLException
      Specified by:
      setFetchSize in interface ResultSet
      Throws:
      SQLException
    • getFetchSize

      public int getFetchSize() throws SQLException
      Specified by:
      getFetchSize in interface ResultSet
      Throws:
      SQLException
    • getType

      public int getType() throws SQLException
      Specified by:
      getType in interface ResultSet
      Throws:
      SQLException
    • getConcurrency

      public int getConcurrency() throws SQLException
      Specified by:
      getConcurrency in interface ResultSet
      Throws:
      SQLException
    • rowUpdated

      public boolean rowUpdated() throws SQLException
      Specified by:
      rowUpdated in interface ResultSet
      Throws:
      SQLException
    • rowInserted

      public boolean rowInserted() throws SQLException
      Specified by:
      rowInserted in interface ResultSet
      Throws:
      SQLException
    • rowDeleted

      public boolean rowDeleted() throws SQLException
      Specified by:
      rowDeleted in interface ResultSet
      Throws:
      SQLException
    • updateNull

      public void updateNull(int column) throws SQLException
      Specified by:
      updateNull in interface ResultSet
      Throws:
      SQLException
    • updateBoolean

      public void updateBoolean(int column, boolean x) throws SQLException
      Specified by:
      updateBoolean in interface ResultSet
      Throws:
      SQLException
    • updateByte

      public void updateByte(int column, byte x) throws SQLException
      Specified by:
      updateByte in interface ResultSet
      Throws:
      SQLException
    • updateShort

      public void updateShort(int column, short x) throws SQLException
      Specified by:
      updateShort in interface ResultSet
      Throws:
      SQLException
    • updateInt

      public void updateInt(int column, int x) throws SQLException
      Specified by:
      updateInt in interface ResultSet
      Throws:
      SQLException
    • updateLong

      public void updateLong(int column, long x) throws SQLException
      Specified by:
      updateLong in interface ResultSet
      Throws:
      SQLException
    • updateFloat

      public void updateFloat(int column, float x) throws SQLException
      Specified by:
      updateFloat in interface ResultSet
      Throws:
      SQLException
    • updateDouble

      public void updateDouble(int column, double x) throws SQLException
      Specified by:
      updateDouble in interface ResultSet
      Throws:
      SQLException
    • updateBigDecimal

      public void updateBigDecimal(int column, BigDecimal x) throws SQLException
      Specified by:
      updateBigDecimal in interface ResultSet
      Throws:
      SQLException
    • updateDate

      public void updateDate(int column, Date x) throws SQLException
      Specified by:
      updateDate in interface ResultSet
      Throws:
      SQLException
    • updateTime

      public void updateTime(int column, Time x) throws SQLException
      Specified by:
      updateTime in interface ResultSet
      Throws:
      SQLException
    • updateTimestamp

      public void updateTimestamp(int column, Timestamp x) throws SQLException
      Specified by:
      updateTimestamp in interface ResultSet
      Throws:
      SQLException
    • updateString

      public void updateString(int column, String x) throws SQLException
      Specified by:
      updateString in interface ResultSet
      Throws:
      SQLException
    • updateBytes

      public void updateBytes(int column, byte[] x) throws SQLException
      Specified by:
      updateBytes in interface ResultSet
      Throws:
      SQLException
    • updateBinaryStream

      public void updateBinaryStream(int column, InputStream x, int length) throws SQLException
      Specified by:
      updateBinaryStream in interface ResultSet
      Throws:
      SQLException
    • updateAsciiStream

      public void updateAsciiStream(int column, InputStream x, int length) throws SQLException
      Specified by:
      updateAsciiStream in interface ResultSet
      Throws:
      SQLException
    • updateCharacterStream

      public void updateCharacterStream(int column, Reader x, int length) throws SQLException
      Specified by:
      updateCharacterStream in interface ResultSet
      Throws:
      SQLException
    • updateObject

      public void updateObject(int column, Object x, int scale) throws SQLException
      Specified by:
      updateObject in interface ResultSet
      Throws:
      SQLException
    • updateObject

      public void updateObject(int column, Object x) throws SQLException
      Specified by:
      updateObject in interface ResultSet
      Throws:
      SQLException
    • updateNCharacterStream

      public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException
      Specified by:
      updateNCharacterStream in interface ResultSet
      Throws:
      SQLException
    • updateNClob

      public void updateNClob(int columnIndex, Reader reader) throws SQLException
      Specified by:
      updateNClob in interface ResultSet
      Throws:
      SQLException
    • updateNull

      public void updateNull(String columnName) throws SQLException
      Specified by:
      updateNull in interface ResultSet
      Throws:
      SQLException
    • updateBoolean

      public void updateBoolean(String columnName, boolean x) throws SQLException
      Specified by:
      updateBoolean in interface ResultSet
      Throws:
      SQLException
    • updateByte

      public void updateByte(String columnName, byte x) throws SQLException
      Specified by:
      updateByte in interface ResultSet
      Throws:
      SQLException
    • updateShort

      public void updateShort(String columnName, short x) throws SQLException
      Specified by:
      updateShort in interface ResultSet
      Throws:
      SQLException
    • updateInt

      public void updateInt(String columnName, int x) throws SQLException
      Specified by:
      updateInt in interface ResultSet
      Throws:
      SQLException
    • updateLong

      public void updateLong(String columnName, long x) throws SQLException
      Specified by:
      updateLong in interface ResultSet
      Throws:
      SQLException
    • updateFloat

      public void updateFloat(String columnName, float x) throws SQLException
      Specified by:
      updateFloat in interface ResultSet
      Throws:
      SQLException
    • updateDouble

      public void updateDouble(String columnName, double x) throws SQLException
      Specified by:
      updateDouble in interface ResultSet
      Throws:
      SQLException
    • updateBigDecimal

      public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException
      Specified by:
      updateBigDecimal in interface ResultSet
      Throws:
      SQLException
    • updateDate

      public void updateDate(String columnName, Date x) throws SQLException
      Specified by:
      updateDate in interface ResultSet
      Throws:
      SQLException
    • updateTime

      public void updateTime(String columnName, Time x) throws SQLException
      Specified by:
      updateTime in interface ResultSet
      Throws:
      SQLException
    • updateTimestamp

      public void updateTimestamp(String columnName, Timestamp x) throws SQLException
      Specified by:
      updateTimestamp in interface ResultSet
      Throws:
      SQLException
    • updateString

      public void updateString(String columnName, String x) throws SQLException
      Specified by:
      updateString in interface ResultSet
      Throws:
      SQLException
    • updateBytes

      public void updateBytes(String columnName, byte[] x) throws SQLException
      Specified by:
      updateBytes in interface ResultSet
      Throws:
      SQLException
    • updateBinaryStream

      public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException
      Specified by:
      updateBinaryStream in interface ResultSet
      Throws:
      SQLException
    • updateAsciiStream

      public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException
      Specified by:
      updateAsciiStream in interface ResultSet
      Throws:
      SQLException
    • updateCharacterStream

      public void updateCharacterStream(String columnName, Reader x, int length) throws SQLException
      Specified by:
      updateCharacterStream in interface ResultSet
      Throws:
      SQLException
    • updateObject

      public void updateObject(String columnName, Object x, int scale) throws SQLException
      Specified by:
      updateObject in interface ResultSet
      Throws:
      SQLException
    • updateObject

      public void updateObject(String columnName, Object x) throws SQLException
      Specified by:
      updateObject in interface ResultSet
      Throws:
      SQLException
    • updateNCharacterStream

      public void updateNCharacterStream(String columnName, Reader x) throws SQLException
      Specified by:
      updateNCharacterStream in interface ResultSet
      Throws:
      SQLException
    • updateNClob

      public void updateNClob(String columnName, Reader reader) throws SQLException
      Specified by:
      updateNClob in interface ResultSet
      Throws:
      SQLException
    • insertRow

      public void insertRow() throws SQLException
      Specified by:
      insertRow in interface ResultSet
      Throws:
      SQLException
    • insertRowX

      private void insertRowX() throws SqlException
      Throws:
      SqlException
    • updateRow

      public void updateRow() throws SQLException
      Specified by:
      updateRow in interface ResultSet
      Throws:
      SQLException
    • updateRowX

      private boolean updateRowX() throws SqlException
      Throws:
      SqlException
    • deleteRow

      public void deleteRow() throws SQLException
      Specified by:
      deleteRow in interface ResultSet
      Throws:
      SQLException
    • deleteRowX

      private void deleteRowX() throws SqlException
      Throws:
      SqlException
    • refreshRow

      public void refreshRow() throws SQLException
      Specified by:
      refreshRow in interface ResultSet
      Throws:
      SQLException
    • refreshRowX

      private void refreshRowX() throws SqlException
      Throws:
      SqlException
    • cancelRowUpdates

      public void cancelRowUpdates() throws SQLException
      Specified by:
      cancelRowUpdates in interface ResultSet
      Throws:
      SQLException
    • moveToInsertRow

      public void moveToInsertRow() throws SQLException
      Specified by:
      moveToInsertRow in interface ResultSet
      Throws:
      SQLException
    • moveToCurrentRow

      public void moveToCurrentRow() throws SQLException
      Specified by:
      moveToCurrentRow in interface ResultSet
      Throws:
      SQLException
    • moveToCurrentRowX

      private void moveToCurrentRowX() throws SqlException
      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

      public Statement getStatement() throws SQLException
      Retrieves the Statement object that produced this object, or null if the ResultSet was not produced by a Statement object.
      Specified by:
      getStatement in interface ResultSet
      Returns:
      the Statement that produced this object or null
      Throws:
      SQLException - if a database error occurs or the result set is closed
    • getURL

      public URL getURL(int columnIndex) throws SQLException
      Specified by:
      getURL in interface ResultSet
      Throws:
      SQLException
    • getURL

      public URL getURL(String columnName) throws SQLException
      Specified by:
      getURL in interface ResultSet
      Throws:
      SQLException
    • updateRef

      public void updateRef(int columnIndex, Ref x) throws SQLException
      Specified by:
      updateRef in interface ResultSet
      Throws:
      SQLException
    • updateRef

      public void updateRef(String columnName, Ref x) throws SQLException
      Specified by:
      updateRef in interface ResultSet
      Throws:
      SQLException
    • updateBlob

      public void updateBlob(int columnIndex, Blob x) throws SQLException
      Updates the designated column with a java.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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateBlob in interface ResultSet
      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 is CONCUR_READ_ONLY or this method is called on a closed result set
    • updateBlob

      public void updateBlob(String columnName, Blob x) throws SQLException
      Updates the designated column with a java.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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateBlob in interface ResultSet
      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 column
      x - the new column value
      Throws:
      SQLException - if the columnLabel is not valid; if a database access error occurs; the result set concurrency is CONCUR_READ_ONLY or this method is called on a closed result set
    • updateBlob

      public void updateBlob(int columnIndex, InputStream x, long length) throws SQLException
      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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateBlob in interface ResultSet
      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 is CONCUR_READ_ONLY or this method is called on a closed result set
    • updateBlob

      public void updateBlob(String columnName, InputStream x, long length) throws SQLException
      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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateBlob in interface ResultSet
      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 column
      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 columnLabel is not valid; if a database access error occurs; the result set concurrency is CONCUR_READ_ONLY or this method is called on a closed result set
    • updateArray

      public void updateArray(int columnIndex, Array x) throws SQLException
      Specified by:
      updateArray in interface ResultSet
      Throws:
      SQLException
    • updateArray

      public void updateArray(String columnName, Array x) throws SQLException
      Specified by:
      updateArray in interface ResultSet
      Throws:
      SQLException
    • repositionScrollableResultSetBeforeJDBC1PositionedUpdateDelete

      boolean repositionScrollableResultSetBeforeJDBC1PositionedUpdateDelete() throws SqlException
      Throws:
      SqlException
    • flowPositioningFetch

      private void flowPositioningFetch(int scrollOrientation, int rowToFetch) throws DisconnectException
      Throws:
      DisconnectException
    • positionToCurrentRowAndUpdate

      private void positionToCurrentRowAndUpdate() throws SqlException
      Throws:
      SqlException
    • insert

      private void insert() throws SqlException
      Throws:
      SqlException
    • update

      private void update() throws SqlException
      Throws:
      SqlException
    • positionToCurrentRowAndDelete

      private void positionToCurrentRowAndDelete() throws SqlException
      Throws:
      SqlException
    • delete

      private void delete() throws SqlException
      Throws:
      SqlException
    • setRowsetAfterLastEvent

      private void setRowsetAfterLastEvent() throws SqlException
      Throws:
      SqlException
    • setRowsetBeforeFirstEvent

      private void setRowsetBeforeFirstEvent() throws SqlException
      Throws:
      SqlException
    • setRowsetNoRowsEvent

      private void setRowsetNoRowsEvent()
    • isServersCursorPositionBeforeFirst

      private boolean isServersCursorPositionBeforeFirst() throws SqlException
      Throws:
      SqlException
    • isServerCursorPositionAfterLast

      private boolean isServerCursorPositionAfterLast()
    • setValidCursorPosition

      public void setValidCursorPosition(boolean isValidCursorPosition)
    • moveToAfterLast

      private void moveToAfterLast() throws DisconnectException
      Throws:
      DisconnectException
    • moveToBeforeFirst

      private void moveToBeforeFirst() throws DisconnectException
      Throws:
      DisconnectException
    • writeInsertRow

      private void writeInsertRow(boolean chainedWritesFollowingSetLob) throws SQLException
      Throws:
      SQLException
    • writeUpdateRow

      private void writeUpdateRow(boolean chainedWritesFollowingSetLob) throws SQLException
      Throws:
      SQLException
    • writeDeleteRow

      private void writeDeleteRow() throws SQLException
      Throws:
      SQLException
    • readInsertRow

      private void readInsertRow() throws DisconnectException, SqlException
      Throws:
      DisconnectException
      SqlException
    • readUpdateRow

      private void readUpdateRow() throws DisconnectException, SqlException
      Throws:
      DisconnectException
      SqlException
    • readDeleteRow

      private void readDeleteRow() throws DisconnectException, SqlException
      Throws:
      DisconnectException
      SqlException
    • listenToUnitOfWork

      public void listenToUnitOfWork()
      Specified by:
      listenToUnitOfWork in interface UnitOfWorkListener
    • completeLocalCommit

      public void completeLocalCommit(Iterator listenerIterator)
      Specified by:
      completeLocalCommit in interface UnitOfWorkListener
    • completeLocalRollback

      public void completeLocalRollback(Iterator listenerIterator)
      Specified by:
      completeLocalRollback in interface UnitOfWorkListener
    • 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 in Connection.
    • 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 in Connection.
    • markClosedOnServer

      public void markClosedOnServer()
      Mark this ResultSet as closed on the server.
    • markAutoCommitted

      void markAutoCommitted()
    • earlyCloseComplete

      public void earlyCloseComplete(Sqlca sqlca)
      Specified by:
      earlyCloseComplete in interface ResultSetCallbackInterface
    • completeSqlca

      public int completeSqlca(Sqlca sqlca)
      Specified by:
      completeSqlca in interface ResultSetCallbackInterface
    • setRowCountEvent

      public void setRowCountEvent(long rowCount) throws DisconnectException
      Throws:
      DisconnectException
    • accumulateWarning

      public void accumulateWarning(SqlWarning e)
      Specified by:
      accumulateWarning in interface ResultSetCallbackInterface
    • rowCountIsUnknown

      boolean rowCountIsUnknown()
    • updateColumn

      private void updateColumn(int column, Object value)
    • buildInsertString

      private String buildInsertString() throws SqlException
      Throws:
      SqlException
    • buildUpdateString

      private String buildUpdateString() throws SqlException
      Throws:
      SqlException
    • buildDeleteString

      private String buildDeleteString() throws SqlException
      Throws:
      SqlException
    • getTableName

      private String getTableName() throws SqlException
      Throws:
      SqlException
    • getServerCursorName

      private String getServerCursorName() throws SqlException
      Throws:
      SqlException
    • getPreparedStatementForInsert

      private void getPreparedStatementForInsert() throws SqlException
      Throws:
      SqlException
    • getPreparedStatementForUpdate

      private void getPreparedStatementForUpdate() throws SqlException
      Throws:
      SqlException
    • getPreparedStatementForDelete

      private void getPreparedStatementForDelete() throws SqlException
      Throws:
      SqlException
    • resetUpdatedColumnsForInsert

      private final void resetUpdatedColumnsForInsert()
    • resetUpdatedColumns

      private final void resetUpdatedColumns()
    • getRowUncast

      private final long getRowUncast()
    • checkGetterPreconditions

      private final void checkGetterPreconditions(int column, String operation) throws SqlException
      Throws:
      SqlException
    • checkUpdatePreconditions

      private final void checkUpdatePreconditions(int column, String operation) throws SqlException
      Throws:
      SqlException
    • checkForValidColumnIndex

      private void checkForValidColumnIndex(int column) throws SqlException
      Throws:
      SqlException
    • checkForClosedResultSet

      protected final void checkForClosedResultSet(String operation) throws SqlException
      Throws:
      SqlException
    • checkForUpdatableResultSet

      private final void checkForUpdatableResultSet(String operation) throws SqlException
      Throws:
      SqlException
    • checkForValidCursorPosition

      private final void checkForValidCursorPosition() throws SqlException
      Throws:
      SqlException
    • checkPositionedOnPlainRow

      private final void checkPositionedOnPlainRow() throws SqlException
      Throws:
      SqlException
    • checkThatResultSetTypeIsScrollable

      private final void checkThatResultSetTypeIsScrollable() throws SqlException
      Throws:
      SqlException
    • checkThatResultSetIsNotDynamic

      private final void checkThatResultSetIsNotDynamic() throws SqlException
      Throws:
      SqlException
    • resultSetContainsNoRows

      private boolean resultSetContainsNoRows() throws SqlException
      Throws:
      SqlException
    • rowIsInCurrentRowset

      private boolean rowIsInCurrentRowset(long rowNumber, int orientation) throws SqlException
      Throws:
      SqlException
    • rowIsInCurrentRowset

      private boolean rowIsInCurrentRowset(long rowNumber)
    • markPositionedUpdateDeletePreparedStatementsClosed

      private void markPositionedUpdateDeletePreparedStatementsClosed()
    • updateColumnInfoFromCache

      private void updateColumnInfoFromCache()
    • checkAndThrowReceivedQueryTerminatingException

      protected final void checkAndThrowReceivedQueryTerminatingException() throws SqlException
      Throws:
      SqlException
    • parseScrollableRowset

      void parseScrollableRowset() throws SqlException
      Throws:
      SqlException
    • getRSReturnability

      public byte getRSReturnability()
    • setRSReturnability

      public void setRSReturnability(byte rsReturnability)
    • getRowCount

      protected void getRowCount() throws SqlException
      Throws:
      SqlException
    • flowGetRowset

      private void flowGetRowset(int orientation, long rowNumber) throws SqlException
      Throws:
      SqlException
    • getNextRowset

      private boolean getNextRowset() throws SqlException
      Throws:
      SqlException
    • adjustNextRowset

      private void adjustNextRowset()
    • getPreviousRowset

      private boolean getPreviousRowset() throws SqlException
      Throws:
      SqlException
    • adjustPreviousRowset

      private void adjustPreviousRowset(int orientation, long rowNumber, boolean isAfterLastRow)
    • getAbsoluteRowset

      private boolean getAbsoluteRowset(long row) throws SqlException
      Throws:
      SqlException
    • adjustAbsoluteRowset

      private void adjustAbsoluteRowset(long rowNumber)
    • getRelativeRowset

      private boolean getRelativeRowset(long rows) throws SqlException
      Throws:
      SqlException
    • adjustRelativeRowset

      private void adjustRelativeRowset(long rowNumber)
    • getFirstRowset

      private boolean getFirstRowset() throws SqlException
      Throws:
      SqlException
    • adjustFirstRowset

      private void adjustFirstRowset()
    • getLastRowset

      private boolean getLastRowset(long row) throws SqlException
      Throws:
      SqlException
    • adjustLastRowset

      private void adjustLastRowset(long row)
    • getRefreshRowset

      private boolean getRefreshRowset() throws SqlException
      Throws:
      SqlException
    • adjustRefreshRowset

      private void adjustRefreshRowset()
    • setAbsolutePositionBasedOnAllRowsReceived

      private void setAbsolutePositionBasedOnAllRowsReceived()
    • writeFetch_

      public abstract void writeFetch_(Section section) throws SqlException
      Throws:
      SqlException
    • readFetch_

      public abstract void readFetch_() throws SqlException
      Throws:
      SqlException
    • writeScrollableFetch_

      public abstract void writeScrollableFetch_(Section section, int fetchSize, int orientation, long rowToFetch, boolean resetQueryBlocks) throws SqlException
      Throws:
      SqlException
    • readScrollableFetch_

      public abstract void readScrollableFetch_() throws SqlException
      Throws:
      SqlException
    • writePositioningFetch_

      public abstract void writePositioningFetch_(Section section, int orientation, long rowToFetch) throws SqlException
      Throws:
      SqlException
    • readPositioningFetch_

      public abstract void readPositioningFetch_() throws SqlException
      Throws:
      SqlException
    • writeCursorClose_

      public abstract void writeCursorClose_(Section section) throws SqlException
      Throws:
      SqlException
    • readCursorClose_

      public abstract void readCursorClose_() throws SqlException
      Throws:
      SqlException
    • parseRowset_

      protected abstract void parseRowset_() throws SqlException
      Throws:
      SqlException
    • setFetchSize_

      public abstract void setFetchSize_(int rows)
    • preClose_

      protected abstract void preClose_() throws SqlException
      Method that is invoked by closeX() before the result set is actually being closed. Subclasses may override this method if work needs to be done before closing.
      Throws:
      SqlException
    • getConnectionCallbackInterface

      public ConnectionCallbackInterface getConnectionCallbackInterface()
      Specified by:
      getConnectionCallbackInterface in interface ResultSetCallbackInterface
    • getStatementCallbackInterface

      public StatementCallbackInterface getStatementCallbackInterface()
      Specified by:
      getStatementCallbackInterface in interface ResultSetCallbackInterface
    • expandRowsetSqlca

      public void expandRowsetSqlca()
    • checkRowsetSqlca

      private final int checkRowsetSqlca() throws SqlException
      Throws:
      SqlException
    • checkRowsetSqlca

      private final int checkRowsetSqlca(int row) throws SqlException
      Throws:
      SqlException
    • resetRowsetFlags

      private void resetRowsetFlags()
    • resetRowsetSqlca

      private void resetRowsetSqlca()
    • createCloseFilterInputStream

      private CloseFilterInputStream createCloseFilterInputStream(InputStream is) throws SqlException
      Throws:
      SqlException
    • closeOpenStreams

      private void closeOpenStreams() throws SqlException
      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

      private void useStreamOrLOB(int columnIndex) throws SqlException
      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 accessed
      SqlException
    • checkLOBMultiCall

      private void checkLOBMultiCall(int columnIndex) throws SqlException
      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

      private SQLException jdbc3MethodNotSupported()
    • getHoldability

      public final int getHoldability() throws SQLException
      Retrieves the holdability for this ResultSet object.
      Specified by:
      getHoldability in interface ResultSet
      Returns:
      either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
      Throws:
      SQLException - if a database error occurs
    • isClosed

      public final boolean isClosed() throws SQLException
      Checks whether this ResultSet object has been closed, either automatically or because close() has been called.
      Specified by:
      isClosed in interface ResultSet
      Returns:
      true if the ResultSet is closed, false otherwise
      Throws:
      SQLException - if a database error occurs
    • updateAsciiStream

      public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException
      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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateAsciiStream in interface ResultSet
      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 is CONCUR_READ_ONLY or this method is called on a closed result set
    • updateAsciiStream

      public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException
      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 interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      length - the length of the stream
      Throws:
      SQLException - if a database-access error occurs
    • updateBinaryStream

      public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException
      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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateBinaryStream in interface ResultSet
      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 is CONCUR_READ_ONLY or this method is called on a closed result set
    • updateBinaryStream

      public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException
      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 interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      length - the length of the stream
      Throws:
      SQLException - if a database-access error occurs
    • updateBlob

      public void updateBlob(int columnIndex, InputStream x) throws SQLException
      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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateBlob in interface ResultSet
      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 is CONCUR_READ_ONLY or this method is called on a closed result set
    • updateCharacterStream

      public void updateCharacterStream(int columnIndex, Reader reader) throws SQLException
      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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateCharacterStream in interface ResultSet
      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 is CONCUR_READ_ONLY or this method is called on a closed result set
    • updateCharacterStream

      public void updateCharacterStream(int columnIndex, Reader x, 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 interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      length - the length of the stream
      Throws:
      SQLException - if a database-access error occurs
    • updateClob

      public void updateClob(int columnIndex, Reader reader) throws SQLException
      Updates the designated column using the given Reader 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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateClob in interface ResultSet
      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 is CONCUR_READ_ONLY or this method is called on a closed result set
    • updateAsciiStream

      public void updateAsciiStream(String columnName, InputStream x) throws SQLException
      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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateAsciiStream in interface ResultSet
      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 column
      x - the new column value
      Throws:
      SQLException - if the columnLabel is not valid; if a database access error occurs; the result set concurrency is CONCUR_READ_ONLY or this method is called on a closed result set
    • updateAsciiStream

      public void updateAsciiStream(String columnName, InputStream x, long length) throws SQLException
      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 interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      length - of the stream
      Throws:
      SQLException - if a database-access error occurs
    • updateBinaryStream

      public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException
      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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateBinaryStream in interface ResultSet
      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 column
      x - the new column value
      Throws:
      SQLException - if the columnLabel is not valid; if a database access error occurs; the result set concurrency is CONCUR_READ_ONLY or this method is called on a closed result set
    • updateBinaryStream

      public void updateBinaryStream(String columnName, InputStream x, long length) throws SQLException
      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 interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      length - of the stream
      Throws:
      SQLException - if a database-access error occurs
    • updateBlob

      public void updateBlob(String columnLabel, InputStream x) throws SQLException
      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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateBlob in interface ResultSet
      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 column
      x - the new column value
      Throws:
      SQLException - if the columnLabel is not valid; if a database access error occurs; the result set concurrency is CONCUR_READ_ONLY or this method is called on a closed result set
    • updateCharacterStream

      public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException
      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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateCharacterStream in interface ResultSet
      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 column
      reader - the new column value
      Throws:
      SQLException - if the columnLabel is not valid; if a database access error occurs; the result set concurrency is CONCUR_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 interface ResultSet
      Parameters:
      columnName - the name of the column
      reader - the new column value
      length - length of the stream
      Throws:
      SQLException - if a database-access error occurs
    • updateClob

      public void updateClob(String columnLabel, Reader reader) throws SQLException
      Updates the designated column using the given Reader 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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateClob in interface ResultSet
      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 column
      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 is CONCUR_READ_ONLY or this method is called on a closed result set
    • updateClob

      public void updateClob(int columnIndex, Reader x, long length) throws SQLException
      Updates the designated column using the given Reader object, which is the given number of characters long. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.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 or insertRow methods are called to update the database.

      Specified by:
      updateClob in interface ResultSet
      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 is CONCUR_READ_ONLY or this method is called on a closed result set
      SQLFeatureNotSupportedException - if the JDBC driver does not support this method
    • updateClob

      public void updateClob(String columnName, Reader x, long length) throws SQLException
      Updates the designated column using the given Reader object, which is the given number of characters long. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.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 or insertRow methods are called to update the database.

      Specified by:
      updateClob in interface ResultSet
      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 column
      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 columnLabel is not valid; if a database access error occurs; the result set concurrency is CONCUR_READ_ONLY or this method is called on a closed result set
      SQLFeatureNotSupportedException - if the JDBC driver does not support this method
    • updateClob

      public void updateClob(int columnIndex, Clob x) throws SQLException
      Updates the designated column with a java.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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateClob in interface ResultSet
      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 column
      x - the new column value
      Throws:
      SQLException - if the columnLabel is not valid; if a database access error occurs; the result set concurrency is CONCUR_READ_ONLY or this method is called on a closed result set
    • updateClob

      public void updateClob(String columnLabel, Clob x) throws SQLException
      Updates the designated column with a java.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 the updateRow or insertRow methods are called to update the database.
      Specified by:
      updateClob in interface ResultSet
      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 column
      x - the new column value
      Throws:
      SQLException - if the columnLabel is not valid; if a database access error occurs; the result set concurrency is CONCUR_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

      public Reader getNCharacterStream(int columnIndex) throws SQLException
      Specified by:
      getNCharacterStream in interface ResultSet
      Throws:
      SQLException
    • getNCharacterStream

      public Reader getNCharacterStream(String columnName) throws SQLException
      Specified by:
      getNCharacterStream in interface ResultSet
      Throws:
      SQLException
    • getNString

      public String getNString(int columnIndex) throws SQLException
      Specified by:
      getNString in interface ResultSet
      Throws:
      SQLException
    • getNString

      public String getNString(String columnName) throws SQLException
      Specified by:
      getNString in interface ResultSet
      Throws:
      SQLException
    • getRowId

      public RowId getRowId(int columnIndex) throws SQLException
      Specified by:
      getRowId in interface ResultSet
      Throws:
      SQLException
    • getRowId

      public RowId getRowId(String columnName) throws SQLException
      Specified by:
      getRowId in interface ResultSet
      Throws:
      SQLException
    • updateRowId

      public void updateRowId(int columnIndex, RowId x) throws SQLException
      Specified by:
      updateRowId in interface ResultSet
      Throws:
      SQLException
    • updateRowId

      public void updateRowId(String columnName, RowId x) throws SQLException
      Specified by:
      updateRowId in interface ResultSet
      Throws:
      SQLException
    • updateNString

      public void updateNString(int columnIndex, String nString) throws SQLException
      Specified by:
      updateNString in interface ResultSet
      Throws:
      SQLException
    • updateNString

      public void updateNString(String columnName, String nString) throws SQLException
      Specified by:
      updateNString in interface ResultSet
      Throws:
      SQLException
    • updateNCharacterStream

      public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException
      Specified by:
      updateNCharacterStream in interface ResultSet
      Throws:
      SQLException
    • updateNCharacterStream

      public void updateNCharacterStream(String columnName, Reader x, long length) throws SQLException
      Specified by:
      updateNCharacterStream in interface ResultSet
      Throws:
      SQLException
    • updateNClob

      public void updateNClob(int columnIndex, NClob nClob) throws SQLException
      Specified by:
      updateNClob in interface ResultSet
      Throws:
      SQLException
    • updateNClob

      public void updateNClob(String columnName, NClob nClob) throws SQLException
      Specified by:
      updateNClob in interface ResultSet
      Throws:
      SQLException
    • getNClob

      public NClob getNClob(int i) throws SQLException
      Specified by:
      getNClob in interface ResultSet
      Throws:
      SQLException
    • getNClob

      public NClob getNClob(String colName) throws SQLException
      Specified by:
      getNClob in interface ResultSet
      Throws:
      SQLException
    • getSQLXML

      public SQLXML getSQLXML(int columnIndex) throws SQLException
      Specified by:
      getSQLXML in interface ResultSet
      Throws:
      SQLException
    • getSQLXML

      public SQLXML getSQLXML(String colName) throws SQLException
      Specified by:
      getSQLXML in interface ResultSet
      Throws:
      SQLException
    • updateSQLXML

      public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException
      Specified by:
      updateSQLXML in interface ResultSet
      Throws:
      SQLException
    • updateSQLXML

      public void updateSQLXML(String columnName, SQLXML xmlObject) throws SQLException
      Specified by:
      updateSQLXML in interface ResultSet
      Throws:
      SQLException
    • isWrapperFor

      public boolean isWrapperFor(Class<?> interfaces) throws SQLException
      Returns false unless interfaces is implemented
      Specified by:
      isWrapperFor in interface Wrapper
      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

      public <T> T unwrap(Class<T> interfaces) throws SQLException
      Returns this if this class implements the interface
      Specified by:
      unwrap in interface Wrapper
      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

      public void updateNClob(int columnIndex, Reader x, long length) throws SQLException
      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 interface ResultSet
      Parameters:
      columnIndex - - the first column is 1, the second is 2
      x - - the new column value
      Throws:
      SQLException - Feature not implemented for now.
    • updateNClob

      public void updateNClob(String columnName, InputStream x, long length) throws SQLException
      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 column
      x - - the new column value
      Throws:
      SQLException - Feature not implemented for now.
    • updateNClob

      public void updateNClob(String columnName, Reader x, long length) throws SQLException
      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 interface ResultSet
      Parameters:
      columnName - - the name of the Clob column
      x - - the new column value
      Throws:
      SQLException - Feature not implemented for now.
    • getObject

      public <T> T getObject(int columnIndex, Class<T> type) throws SQLException
      Retrieve the column as an object of the desired type.
      Specified by:
      getObject in interface ResultSet
      Throws:
      SQLException
    • mismatchException

      private SQLException mismatchException(String targetTypeName, int columnIndex) throws SQLException
      Throws:
      SQLException
    • getObject

      public <T> T getObject(String columnName, Class<T> type) throws SQLException
      Specified by:
      getObject in interface ResultSet
      Throws:
      SQLException