| java.lang.Object org.openharmonise.commons.dsi.CachedResultSet
CachedResultSet | public class CachedResultSet implements ResultSet,Cloneable(Code) | | A result set that caches the data retrieved from a SQL query. Unlike the
java.sql.ResultSet the order of data access does not matter
and can be accessed more than once.
Warning: only the most commonly used get methods have been implemented.
author: Michael Bell version: $Revision: 1.2 $ |
Method Summary | |
public boolean | absolute(int arg0) | public void | afterLast() | public void | beforeFirst() | public void | cacheResultSet(ResultSet rs) Caches the given ResultSet . | public void | cacheResultSet(ResultSet rs, int numrows) Cache the specified number of rows from the given ResultSet . | public void | cancelRowUpdates() | public void | clearRow() Clears the current row. | public void | clearRow(String columnToLeave) Clears the current row, except for the specified column. | public void | clearRow(List columnsToLeave) Clears the current row, except for the specified columns. | public void | clearWarnings() | public Object | clone() | public void | close() | public void | deleteRow() | public int | findColumn(String arg0) | public boolean | first() | public Array | getArray(int arg0) | public Array | getArray(String arg0) | public InputStream | getAsciiStream(int arg0) | public InputStream | getAsciiStream(String arg0) | public BigDecimal | getBigDecimal(int arg0, int arg1) | public BigDecimal | getBigDecimal(String arg0, int arg1) | public BigDecimal | getBigDecimal(int arg0) | public BigDecimal | getBigDecimal(String arg0) | public InputStream | getBinaryStream(int arg0) | public InputStream | getBinaryStream(String arg0) | public Blob | getBlob(int arg0) | public Blob | getBlob(String arg0) | public boolean | getBoolean(String sName) | public boolean | getBoolean(int nIndex) | public byte | getByte(int arg0) | public byte | getByte(String arg0) | public byte[] | getBytes(int arg0) | public byte[] | getBytes(String arg0) | public Reader | getCharacterStream(int arg0) | public Reader | getCharacterStream(String arg0) | public Clob | getClob(int arg0) | public Clob | getClob(String arg0) | public int | getConcurrency() | public String | getCursorName() | public java.sql.Date | getDate(String sName) | public java.sql.Date | getDate(int nIndex) | public Date | getDate(int arg0, Calendar arg1) | public Date | getDate(String arg0, Calendar arg1) | public double | getDouble(int arg0) | public double | getDouble(String arg0) | public int | getFetchDirection() | public int | getFetchSize() | public float | getFloat(int arg0) | public float | getFloat(String arg0) | public int | getInt(String sName) | public int | getInt(int nIndex) | public long | getLong(int arg0) | public long | getLong(String arg0) | public ResultSetMetaData | getMetaData() | public Object | getObject(int arg0) | public Object | getObject(String arg0) | public Object | getObject(int arg0, Map arg1) | public Object | getObject(String arg0, Map arg1) | public Ref | getRef(int arg0) | public Ref | getRef(String arg0) | public int | getResultTotal() Returns the number of rows in this result set. | public int | getRow() | public short | getShort(int arg0) | public short | getShort(String arg0) | public Statement | getStatement() | public String | getString(String sName) | public String | getString(int nIndex) | public Time | getTime(int arg0) | public Time | getTime(String arg0) | public Time | getTime(int arg0, Calendar arg1) | public Time | getTime(String arg0, Calendar arg1) | public Timestamp | getTimestamp(int arg0) | public Timestamp | getTimestamp(String arg0) | public Timestamp | getTimestamp(int arg0, Calendar arg1) | public Timestamp | getTimestamp(String arg0, Calendar arg1) | public int | getType() | public URL | getURL(int arg0) | public URL | getURL(String arg0) | public InputStream | getUnicodeStream(int arg0) | public InputStream | getUnicodeStream(String arg0) | public SQLWarning | getWarnings() | public boolean | hasCurrentRowBeenRead() Returns true if the current row has been read. | public void | insertRow() | public boolean | isAfterLast() | public boolean | isBeforeFirst() | public boolean | isFirst() | public boolean | isLast() | public boolean | last() | public void | markCurrentRowAsRead() Marks the current row as read. | public void | moveToCurrentRow() | public void | moveToInsertRow() | public boolean | next() | public boolean | previous() | public void | refreshRow() | public boolean | relative(int arg0) | public void | removeRow(int index) Removes result set row from this result set. | public boolean | rowDeleted() | public boolean | rowInserted() | public boolean | rowUpdated() | public void | setFetchDirection(int arg0) | public void | setFetchSize(int arg0) | public void | setStartRow(int nIndex) Sets the current row. | public String | toString() | public void | updateArray(int arg0, Array arg1) | public void | updateArray(String arg0, Array arg1) | public void | updateAsciiStream(int arg0, InputStream arg1, int arg2) | public void | updateAsciiStream(String arg0, InputStream arg1, int arg2) | public void | updateBigDecimal(int arg0, BigDecimal arg1) | public void | updateBigDecimal(String arg0, BigDecimal arg1) | public void | updateBinaryStream(int arg0, InputStream arg1, int arg2) | public void | updateBinaryStream(String arg0, InputStream arg1, int arg2) | public void | updateBlob(int arg0, Blob arg1) | public void | updateBlob(String arg0, Blob arg1) | public void | updateBoolean(int arg0, boolean arg1) | public void | updateBoolean(String arg0, boolean arg1) | public void | updateByte(int arg0, byte arg1) | public void | updateByte(String arg0, byte arg1) | public void | updateBytes(int arg0, byte[] arg1) | public void | updateBytes(String arg0, byte[] arg1) | public void | updateCharacterStream(int arg0, Reader arg1, int arg2) | public void | updateCharacterStream(String arg0, Reader arg1, int arg2) | public void | updateClob(int arg0, Clob arg1) | public void | updateClob(String arg0, Clob arg1) | public void | updateDate(int arg0, Date arg1) | public void | updateDate(String arg0, Date arg1) | public void | updateDouble(int arg0, double arg1) | public void | updateDouble(String arg0, double arg1) | public void | updateFloat(int arg0, float arg1) | public void | updateFloat(String arg0, float arg1) | public void | updateInt(int arg0, int arg1) | public void | updateInt(String arg0, int arg1) | public void | updateLong(int arg0, long arg1) | public void | updateLong(String arg0, long arg1) | public void | updateNull(int arg0) | public void | updateNull(String arg0) | public void | updateObject(int arg0, Object arg1, int arg2) | public void | updateObject(int arg0, Object arg1) | public void | updateObject(String arg0, Object arg1, int arg2) | public void | updateObject(String arg0, Object arg1) | public void | updateRef(int arg0, Ref arg1) | public void | updateRef(String arg0, Ref arg1) | public void | updateRow() | public void | updateShort(int arg0, short arg1) | public void | updateShort(String arg0, short arg1) | public void | updateString(int arg0, String arg1) | public void | updateString(String arg0, String arg1) | public void | updateTime(int arg0, Time arg1) | public void | updateTime(String arg0, Time arg1) | public void | updateTimestamp(int arg0, Timestamp arg1) | public void | updateTimestamp(String arg0, Timestamp arg1) | public boolean | wasNull() |
m_colNames | protected List m_colNames(Code) | | List of column names
|
m_colTypes | protected List m_colTypes(Code) | | List of column data types
|
m_currentrow | protected List m_currentrow(Code) | | Current row of data
|
m_mark | protected int m_mark(Code) | | Index of current row in list of rows
|
m_readMarks | protected List m_readMarks(Code) | | List of rows read
|
m_resultTotal | protected int m_resultTotal(Code) | | Number of rows
|
m_rows | protected List m_rows(Code) | | List of rows of result set
|
CachedResultSet | public CachedResultSet()(Code) | | Constructs empty result set
|
CachedResultSet | public CachedResultSet(ResultSet rs, int numrows) throws DataStoreException(Code) | | Constructs a cached result set from the given ResultSet ,
caching only the number of rows specified.
Parameters: rs - the result set to cache Parameters: numrows - the number of rows to cache throws: DataStoreException - if an error occurs loading data |
cacheResultSet | public void cacheResultSet(ResultSet rs, int numrows) throws DataStoreException(Code) | | Cache the specified number of rows from the given ResultSet .
Parameters: rs - the result set to cache Parameters: numrows - the number of rows to cache throws: DataStoreException - if an error occurs loading data |
clearRow | public void clearRow()(Code) | | Clears the current row.
|
clearRow | public void clearRow(String columnToLeave)(Code) | | Clears the current row, except for the specified column.
Parameters: columnToLeave - the name of the column to retain |
clearRow | public void clearRow(List columnsToLeave)(Code) | | Clears the current row, except for the specified columns.
Parameters: columnsToLeave - list of names of columns to retain |
getBoolean | public boolean getBoolean(int nIndex)(Code) | | |
getInt | public int getInt(int nIndex)(Code) | | |
getResultTotal | public int getResultTotal()(Code) | | Returns the number of rows in this result set.
the number of rows in this result set |
hasCurrentRowBeenRead | public boolean hasCurrentRowBeenRead()(Code) | | Returns true if the current row has been read.
true if the current row has been read. |
markCurrentRowAsRead | public void markCurrentRowAsRead()(Code) | | Marks the current row as read.
|
next | public boolean next()(Code) | | |
previous | public boolean previous()(Code) | | |
removeRow | public void removeRow(int index)(Code) | | Removes result set row from this result set.
Parameters: index - the index of the row to remove |
setStartRow | public void setStartRow(int nIndex)(Code) | | Sets the current row.
Parameters: nIndex - the index of the current row |
|
|