Arch4J dataaccess 1.1

org.arch4j.dataaccess.visitors
Class ResultSetCache

java.lang.Object
  |
  +--sun.jdbc.rowset.BaseRowSet
        |
        +--sun.jdbc.rowset.CachedRowSet
              |
              +--org.arch4j.dataaccess.visitors.ResultSetCache
All Implemented Interfaces:
Cloneable, ResultSet, ResultSetVisitor, javax.sql.RowSet, javax.sql.RowSetInternal, Serializable

public class ResultSetCache
extends sun.jdbc.rowset.CachedRowSet
implements ResultSetVisitor

This visitor will "cache" the values from a result set so that they may be passed around without having to keep a connection open, etc. Download CachedRowSet

Version:
1.1
Author:
James Roome, Allan Wick
See Also:
Serialized Form

Field Summary
 
Fields inherited from class sun.jdbc.rowset.BaseRowSet
ASCII_STREAM_PARAM, asciiStream, BINARY_STREAM_PARAM, binaryStream, charStream, UNICODE_STREAM_PARAM, unicodeStream
 
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
ResultSetCache()
          Constructs a new default CachedRowSet object
 
Method Summary
 int getNumberOfRows()
          Number of rows in the cache.
 int getNumberOfRowsAffected()
          Gets the number of rows affected by the sql.
 boolean processNextRow(ResultSet aResultSet)
          Process the next row of the SQL query.
 void setNumberOfRowsAffected(int aNumberAffected)
          Sets the number of rows affected by the sql.
 
Methods inherited from class sun.jdbc.rowset.CachedRowSet
absolute, acceptChanges, acceptChanges, afterLast, beforeFirst, cancelRowDelete, cancelRowInsert, cancelRowUpdates, clearWarnings, clone, close, columnUpdated, createCopy, createShared, deleteRow, execute, execute, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConnection, getCurrentRow, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getKeyColumns, getLong, getLong, getMetaData, getObject, getObject, getObject, getObject, getOriginal, getOriginalRow, getReader, getRef, getRef, getRow, getShort, getShort, getStatement, getString, getString, getTableName, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getUnicodeStream, getUnicodeStream, getWarnings, getWriter, insertRow, internalFirst, internalLast, internalNext, internalPrevious, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, populate, previous, refreshRow, relative, release, removeCurrentRow, restoreOriginal, rowDeleted, rowInserted, rowUpdated, setCommand, setKeyColumns, setMetaData, setOriginal, setOriginalRow, setReader, setTableName, setWriter, size, toCollection, toCollection, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRow, updateShort, updateShort, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull
 
Methods inherited from class sun.jdbc.rowset.BaseRowSet
addRowSetListener, clearParameters, getCommand, getConcurrency, getDataSourceName, getEscapeProcessing, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getParams, getPassword, getQueryTimeout, getShowDeleted, getTransactionIsolation, getType, getTypeMap, getUrl, getUsername, initParams, isReadOnly, notifyCursorMoved, notifyRowChanged, notifyRowSetChanged, removeRowSetListener, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setConcurrency, setDataSourceName, setDate, setDate, setDouble, setEscapeProcessing, setFetchDirection, setFetchSize, setFloat, setInt, setLong, setMaxFieldSize, setMaxRows, setNull, setNull, setObject, setObject, setObject, setPassword, setQueryTimeout, setReadOnly, setRef, setShort, setShowDeleted, setString, setTime, setTime, setTimestamp, setTimestamp, setTransactionIsolation, setType, setTypeMap, setUnicodeStream, setUrl, setUsername
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sql.RowSet
addRowSetListener, clearParameters, getCommand, getDataSourceName, getEscapeProcessing, getMaxFieldSize, getMaxRows, getPassword, getQueryTimeout, getTransactionIsolation, getTypeMap, getUrl, getUsername, isReadOnly, removeRowSetListener, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setConcurrency, setDataSourceName, setDate, setDate, setDouble, setEscapeProcessing, setFloat, setInt, setLong, setMaxFieldSize, setMaxRows, setNull, setNull, setObject, setObject, setObject, setPassword, setQueryTimeout, setReadOnly, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setTransactionIsolation, setType, setTypeMap, setUrl, setUsername
 
Methods inherited from interface java.sql.ResultSet
getConcurrency, getFetchDirection, getFetchSize, getType, getURL, getURL, setFetchDirection, setFetchSize, updateArray, updateArray, updateBlob, updateBlob, updateClob, updateClob, updateRef, updateRef
 
Methods inherited from interface javax.sql.RowSetInternal
getParams
 

Constructor Detail

ResultSetCache

public ResultSetCache()
               throws SQLException
Constructs a new default CachedRowSet object

Throws:
SQLException - Creation exception
Method Detail

processNextRow

public boolean processNextRow(ResultSet aResultSet)
Process the next row of the SQL query.

Specified by:
processNextRow in interface ResultSetVisitor
Parameters:
aResultSet - The result set to process. The cursor is in the proper position.
Returns:
true if the processor should keep spinning through the result set.

getNumberOfRows

public int getNumberOfRows()
Number of rows in the cache.

Returns:
the number of rows in the cache

setNumberOfRowsAffected

public void setNumberOfRowsAffected(int aNumberAffected)
Sets the number of rows affected by the sql.

Specified by:
setNumberOfRowsAffected in interface ResultSetVisitor
Parameters:
aNumberAffected - The number of rows that have been affected.

getNumberOfRowsAffected

public int getNumberOfRowsAffected()
Gets the number of rows affected by the sql.

Returns:
The number of rows that have been affected by the sql call.

Arch4J dataaccess 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.