Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.client.am
Class ResultSet  view ResultSet download ResultSet.java

java.lang.Object
  extended byorg.apache.derby.client.am.ResultSet
All Implemented Interfaces:
java.sql.ResultSet, ResultSetCallbackInterface, UnitOfWorkListener

public abstract class ResultSet
extends java.lang.Object
implements java.sql.ResultSet, ResultSetCallbackInterface, UnitOfWorkListener


Field Summary
static int ABSOLUTE_ROWSET
           
protected  long absolutePosition_
           
protected  long absoluteRowNumberForTheIntendedRow_
           
protected  Agent agent_
           
(package private)  boolean autoCommitted_
           
private  boolean[] columnUpdated_
           
 Connection connection_
           
protected  long currentRowInRowset_
           
 Cursor cursor_
           
 boolean cursorHold_
           
 boolean cursorUnpositionedOnServer_
           
static byte DDM_RETURN_CALLER
           
static byte DDM_RETURN_CLIENT
           
 int fetchDirection_
           
 int fetchSize_
           
static int FIRST_ROWSET
           
protected  long firstRowInRowset_
           
 Section generatedSection_
           
 boolean isAfterLast_
           
 boolean isBeforeFirst_
           
 boolean isFirst_
           
 boolean isLast_
           
protected  boolean isOnCurrentRow_
           
private  boolean isOnInsertRow_
           
 boolean isRowsetCursor_
           
 boolean isValidCursorPosition_
           
static int LAST_ROWSET
           
protected  long lastRowInRowset_
           
(package private)  boolean listenToUnitOfWork_
           
 int nestingLevel_
           
static int NEXT_ROWSET
           
(package private)  boolean openOnClient_
           
 boolean openOnServer_
           
 PreparedStatement preparedStatementForDelete_
           
 PreparedStatement preparedStatementForUpdate_
           
static int PREVIOUS_ROWSET
           
 long queryInstanceIdentifier_
           
 Sqlca queryTerminatingSqlca_
           
static int REFRESH_ROWSET
           
static int RELATIVE_ROWSET
           
 int resultSetConcurrency_
           
 int resultSetHoldability_
           
 ColumnMetaData resultSetMetaData_
           
 int resultSetType_
           
 long rowCount_
           
 boolean rowsetContainsLastRow_
           
 Sqlca[] rowsetSqlca_
           
 int rowsReceivedInCurrentRowset_
           
 int rowsYetToBeReceivedForRowset_
           
protected  byte rsReturnability_
           
 boolean scrollable_
           
static int scrollOrientation_absolute__
           
static int scrollOrientation_after__
           
static int scrollOrientation_before__
           
static int scrollOrientation_current__
           
static int scrollOrientation_first__
           
static int scrollOrientation_last__
           
static int scrollOrientation_next__
           
static int scrollOrientation_prior__
           
static int scrollOrientation_relative__
           
 int sensitivity_
           
static int sensitivity_insensitive__
           
static int sensitivity_sensitive_dynamic__
           
static int sensitivity_sensitive_static__
           
static int sensitivity_unknown__
           
 Statement statement_
           
static int updatability_delete__
           
static int updatability_readOnly__
           
static int updatability_unknown__
           
static int updatability_update__
           
private  java.lang.Object[] updatedColumns_
           
protected  boolean updateRowCalled_
           
private  SqlWarning warnings_
           
private static int WAS_NOT_NULL
           
private static int WAS_NULL
           
private static int WAS_NULL_UNSET
           
private  int wasNull_
           
 
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
protected ResultSet(Agent agent, Statement statement, Cursor cursor, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
           
 
Method Summary
 boolean absolute(int row)
          This method positions the result set to the specified absolute row.
 boolean absoluteX(int row)
           
 void accumulateWarning(SqlWarning e)
           
private  void adjustAbsoluteRowset(long rowNumber)
           
private  void adjustFirstRowset()
           
private  void adjustLastRowset(long row)
           
private  void adjustNextRowset()
           
private  void adjustPreviousRowset(int orientation, long rowNumber, boolean isAfterLastRow)
           
private  void adjustRefreshRowset()
           
private  void adjustRelativeRowset(long rowNumber)
           
 void afterLast()
          This method repositions the cursor to after the last row in the result set.
private  void afterLastX()
           
 void beforeFirst()
          This method repositions the cursor to before the first row in the result set.
private  void beforeFirstX()
           
private  java.lang.String buildDeleteString()
           
private  java.lang.String buildUpdateString()
           
 void cancelRowUpdates()
          This method cancels any changes that have been made to a row.
protected  void checkAndThrowReceivedQueryTerminatingException()
           
protected  void checkForClosedResultSet()
           
(package private)  void checkForValidColumnIndex(int column)
           
private  void checkForValidCursorPosition()
           
private  void checkGetterPreconditions(int column)
           
private  int checkRowsetSqlca()
           
private  int checkRowsetSqlca(int row)
           
private  void checkThatResultSetIsNotDynamic()
           
private  void checkThatResultSetTypeIsScrollable()
           
private  void checkUpdatePreconditions(int column)
           
 void clearWarnings()
          This method clears all warnings associated with this result set.
 void clearWarningsX()
           
 void close()
          This method closes the result set and frees any associated resources.
 void closeX()
           
 void completeLocalCommit(java.util.Iterator listenerIterator)
           
 void completeLocalRollback(java.util.Iterator listenerIterator)
           
 int completeSqlca(Sqlca sqlca)
           
protected  void delete()
           
 void deleteRow()
          This method deletes the current row in the database.
private  void deleteRowX()
           
 void earlyCloseComplete(Sqlca sqlca)
           
 void expandRowsetSqlca()
           
 int findColumn(java.lang.String columnName)
          This method returns the column index of the specified named column.
private  int findColumnX(java.lang.String columnName)
           
 boolean first()
          This method repositions the cursor on the first row in the result set.
private  boolean firstX()
           
private  void flowAutoCommitIfLastOpenMultipleResultSetWasJustClosed()
           
(package private)  void flowAutoCommitIfNotAutoCommitted()
           
(package private)  void flowCloseAndAutoCommitIfNotAutoCommitted()
           
 void flowFetch()
           
private  void flowGetRowset(int orientation, long rowNumber)
           
 void flowPositioningFetch(int scrollOrientation, int rowToFetch)
           
private  boolean getAbsoluteRowset(long row)
           
 java.sql.Array getArray(int column)
          This method returns the specified column value as an Array.
 java.sql.Array getArray(java.lang.String columnName)
          This method returns the specified column value as an Array.
 java.io.InputStream getAsciiStream(int column)
          This method returns the value of the specified column as an ASCII stream.
 java.io.InputStream getAsciiStream(java.lang.String columnName)
          This method returns the value of the specified column as an ASCII stream.
 java.math.BigDecimal getBigDecimal(int column)
          This method returns the value of the specified column as a Java BigDecimal.
 java.math.BigDecimal getBigDecimal(int column, int scale)
          This method returns the value of the specified column as a Java BigDecimal.
 java.math.BigDecimal getBigDecimal(java.lang.String columnName)
          This method returns the value of the specified column as a Java BigDecimal.
 java.math.BigDecimal getBigDecimal(java.lang.String columnName, int scale)
          This method returns the value of the specified column as a Java BigDecimal.
 java.io.InputStream getBinaryStream(int column)
          This method returns the value of the specified column as a raw byte stream.
 java.io.InputStream getBinaryStream(java.lang.String columnName)
          This method returns the value of the specified column as a raw byte stream.
 java.sql.Blob getBlob(int column)
          This method returns the specified column value as a BLOB.
 java.sql.Blob getBlob(java.lang.String columnName)
          This method returns the specified column value as a BLOB.
 boolean getBoolean(int column)
          This method returns the value of the specified column as a Java boolean.
 boolean getBoolean(java.lang.String columnName)
          This method returns the value of the specified column as a Java boolean.
 byte getByte(int column)
          This method returns the value of the specified column as a Java byte.
 byte getByte(java.lang.String columnName)
          This method returns the value of the specified column as a Java byte.
 byte[] getBytes(int column)
          This method returns the value of the specified column as a Java byte array.
 byte[] getBytes(java.lang.String columnName)
          This method returns the value of the specified column as a Java byte array.
 java.io.Reader getCharacterStream(int column)
          This method returns the value of the specified column as a character stream.
 java.io.Reader getCharacterStream(java.lang.String columnName)
          This method returns the value of the specified column as a character stream.
 java.sql.Clob getClob(int column)
          This method returns the specified column value as a CLOB.
 java.sql.Clob getClob(java.lang.String columnName)
          This method returns the specified column value as a CLOB.
 int getConcurrency()
          This method returns the concurrency type of this result set.
 ConnectionCallbackInterface getConnectionCallbackInterface()
           
 java.lang.String getCursorName()
          This method returns the name of the database cursor used by this result set.
 java.sql.Date getDate(int column)
          This method returns the value of the specified column as a Java java.sql.Date.
 java.sql.Date getDate(int column, java.util.Calendar calendar)
          This method returns the specified column value as a java.sql.Date.
 java.sql.Date getDate(java.lang.String columnName)
          This method returns the value of the specified column as a Java java.sql.Date.
 java.sql.Date getDate(java.lang.String columnName, java.util.Calendar cal)
          This method returns the specified column value as a java.sql.Date.
 double getDouble(int column)
          This method returns the value of the specified column as a Java double.
 double getDouble(java.lang.String columnName)
          This method returns the value of the specified column as a Java double.
 int getFetchDirection()
          This method returns the current fetch direction for this result set.
 int getFetchSize()
          This method returns the current number of rows that will be fetched from the database at a time.
private  boolean getFirstRowset()
           
 float getFloat(int column)
          This method returns the value of the specified column as a Java float.
 float getFloat(java.lang.String columnName)
          This method returns the value of the specified column as a Java float.
 int getInt(int column)
          This method returns the value of the specified column as a Java int.
 int getInt(java.lang.String columnName)
          This method returns the value of the specified column as a Java int.
private  boolean getLastRowset(long row)
           
 long getLong(int column)
          This method returns the value of the specified column as a Java long.
 long getLong(java.lang.String columnName)
          This method returns the value of the specified column as a Java long.
 java.sql.ResultSetMetaData getMetaData()
          This method returns data about the columns returned as part of the result set as a ResultSetMetaData instance.
(package private)  ColumnMetaData getMetaDataX()
           
private  boolean getNextRowset()
           
 java.lang.Object getObject(int column)
          This method returns the value of the specified column as a Java Object.
 java.lang.Object getObject(int column, java.util.Map map)
          This method returns the value of the specified column as a Java Object using the specified SQL type to Java type map.
 java.lang.Object getObject(java.lang.String columnName)
          This method returns the value of the specified column as a Java Object.
 java.lang.Object getObject(java.lang.String columnName, java.util.Map map)
          This method returns the value of the specified column as a Java Object using the specified SQL type to Java type map.
(package private)  java.lang.Object getObjectX(int column)
           
private  void getPreparedStatementForDelete()
           
private  void getPreparedStatementForUpdate()
           
private  boolean getPreviousRowset()
           
 java.sql.Ref getRef(int column)
          This method returns a Ref for the specified column which represents the structured type for the column.
 java.sql.Ref getRef(java.lang.String columnName)
          This method returns a Ref for the specified column which represents the structured type for the column.
private  boolean getRefreshRowset()
           
private  boolean getRelativeRowset(long rows)
           
 int getRow()
          This method returns the current row number in the cursor.
protected  void getRowCount()
           
private  long getRowUncast()
           
private  int getRowX()
           
 byte getRSReturnability()
           
private  java.lang.String getServerCursorName()
           
 short getShort(int column)
          This method returns the value of the specified column as a Java short.
 short getShort(java.lang.String columnName)
          This method returns the value of the specified column as a Java short.
 java.sql.Statement getStatement()
          This method returns a the Statement that was used to produce this result set.
 StatementCallbackInterface getStatementCallbackInterface()
           
 java.lang.String getString(int column)
          This method returns the value of the specified column as a Java String.
 java.lang.String getString(java.lang.String columnName)
          This method returns the value of the specified column as a Java String.
private  java.lang.String getTableName()
           
 java.sql.Time getTime(int column)
          This method returns the value of the specified column as a Java java.sql.Time.
 java.sql.Time getTime(int column, java.util.Calendar calendar)
          This method returns the specified column value as a java.sql.Time.
 java.sql.Time getTime(java.lang.String columnName)
          This method returns the value of the specified column as a Java java.sql.Time.
 java.sql.Time getTime(java.lang.String columnName, java.util.Calendar cal)
          This method returns the specified column value as a java.sql.Time.
 java.sql.Timestamp getTimestamp(int column)
          This method returns the value of the specified column as a Java java.sql.Timestamp.
 java.sql.Timestamp getTimestamp(int column, java.util.Calendar calendar)
          This method returns the specified column value as a java.sql.Timestamp.
 java.sql.Timestamp getTimestamp(java.lang.String columnName)
          This method returns the value of the specified column as a Java java.sql.Timestamp.
 java.sql.Timestamp getTimestamp(java.lang.String columnName, java.util.Calendar cal)
          This method returns the specified column value as a java.sql.Timestamp.
 int getType()
          This method returns the result set type of this result set.
 java.io.InputStream getUnicodeStream(int column)
          This method returns the value of the specified column as a Unicode UTF-8 stream.
 java.io.InputStream getUnicodeStream(java.lang.String columnName)
          This method returns the value of the specified column as a Unicode UTF-8 stream.
 java.net.URL getURL(int columnIndex)
          This method returns the specified column value as a java.net.URL.
 java.net.URL getURL(java.lang.String columnName)
          This method returns the specified column value as a java.net.URL.
 java.sql.SQLWarning getWarnings()
          This method returns the first SQL warning associated with this result set.
 void insertRow()
          This method inserts the current row into the database.
 boolean isAfterLast()
          This method tests whether or not the cursor is after the last row in the result set.
private  boolean isAfterLastX()
           
 boolean isBeforeFirst()
          This method tests whether or not the cursor is before the first row in the result set.
private  boolean isBeforeFirstX()
           
 boolean isFirst()
          This method tests whether or not the cursor is positioned on the first row in the result set.
private  boolean isFirstX()
           
 boolean isLast()
          This method tests whether or not the cursor is on the last row in the result set.
private  boolean isLastX()
           
private  boolean isNull(int column)
           
private  boolean isServerCursorPositionAfterLast()
           
private  boolean isServersCursorPositionBeforeFirst()
           
 boolean last()
          This method repositions the cursor on the last row in the result set.
private  boolean lastX()
           
 void listenToUnitOfWork()
           
(package private)  void markAutoCommitted()
           
(package private)  void markClosed()
           
(package private)  void markClosedOnServer()
           
private  void markPositionedUpdateDeletePreparedStatementsClosed()
           
protected  void moveToAfterLast()
           
protected  void moveToBeforeFirst()
           
 void moveToCurrentRow()
          This method moves the result set position from the insert row back to the current row that was selected prior to moving to the insert row.
 void moveToInsertRow()
          This method positions the result set to the "insert row", which allows a new row to be inserted into the database from the result set.
 boolean next()
          This method advances to the next row in the result set.
(package private)  boolean nextX()
           
 void nullDataForGC()
           
private  void nullOutReferenceInStatement()
           
protected abstract  void parseRowset_()
           
 void parseScrollableRowset()
           
protected  void positionToCurrentRowAndDelete()
           
protected  void positionToCurrentRowAndUpdate()
           
 boolean previous()
          This method moves the current position to the previous row in the result set.
private  boolean previousX()
           
private  void readAutoCommitIfNotAutoCommitted()
           
(package private)  void readClose()
           
private  void readCloseAndAutoCommitIfNotAutoCommitted()
           
abstract  void readCursorClose_()
           
 void readDeleteRow()
           
abstract  void readFetch_()
           
abstract  void readPositioningFetch_()
           
abstract  void readScrollableFetch_()
           
 void readUpdateRow()
           
 void refreshRow()
          This method refreshes the contents of the current row from the database.
private  void refreshRowX()
           
 boolean relative(int rows)
          This method moves the result set position relative to the current row.
private  boolean relativeX(int rows)
           
 boolean repositionScrollableResultSetBeforeJDBC1PositionedUpdateDelete()
           
private  void resetRowsetFlags()
           
private  void resetRowsetSqlca()
           
private  void resetUpdatedColumns()
           
private  boolean resultSetContainsNoRows()
           
protected  boolean rowCountIsKnown()
           
protected  boolean rowCountIsUnknown()
           
 boolean rowDeleted()
          This method tests whether or not the current row in the result set has been deleted.
 boolean rowInserted()
          This method tests whether or not the current row in the result set has been inserted.
private  boolean rowIsInCurrentRowset(long rowNumber)
           
private  boolean rowIsInCurrentRowset(long rowNumber, int orientation)
           
 boolean rowUpdated()
          This method tests whether or not the current row in the result set has been updated.
private  void setAbsolutePositionBasedOnAllRowsReceived()
           
 void setAutoCommitStateForSingletonCursors()
           
 void setCloseOnlyStateForSingletonCursors()
           
 void setFetchDirection(int direction)
          This method provides a hint to the driver about which direction the result set will be processed in.
abstract  void setFetchSize_(int rows)
           
 void setFetchSize(int rows)
          This method provides a hint to the driver about how many rows at a time it should fetch from the database.
 void setRowCountEvent(long rowCount)
           
 void setRowsetAfterLastEvent()
           
 void setRowsetBeforeFirstEvent()
           
 void setRowsetNoRowsEvent()
           
 void setRSReturnability(byte rsReturnability)
           
 void setValidCursorPosition(boolean isValidCursorPosition)
           
private  void setWasNull(int column)
           
protected  void update()
           
 void updateArray(int columnIndex, java.sql.Array x)
          This method updates the specified column to have a java.sqlArray value.
 void updateArray(java.lang.String columnName, java.sql.Array x)
          This method updates the specified column to have a java.sqlArray value.
 void updateAsciiStream(int column, java.io.InputStream x, int length)
          This method updates the specified column from an ASCII text stream.
 void updateAsciiStream(java.lang.String columnName, java.io.InputStream x, int length)
          This method updates the specified column from an ASCII text stream.
 void updateBigDecimal(int column, java.math.BigDecimal x)
          This method updates the specified column to have a BigDecimal value.
 void updateBigDecimal(java.lang.String columnName, java.math.BigDecimal x)
          This method updates the specified column to have a BigDecimal value.
 void updateBinaryStream(int column, java.io.InputStream x, int length)
          This method updates the specified column from a binary stream.
 void updateBinaryStream(java.lang.String columnName, java.io.InputStream x, int length)
          This method updates the specified column from a binary stream.
 void updateBlob(int columnIndex,