|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.spy.SpyObject
net.spy.db.GenericResultSetStub
This object contains all the common stuff required to stub a ResultSet implementation.
| Constructor Summary | |
protected |
GenericResultSetStub()
Get an instance of a GenericResultSetStub with no initialization. |
|
GenericResultSetStub(ResultSet rs)
Magically transform the passed in ResultSet to a GenericResultSetStub |
| Method Summary | |
void |
clearWarnings()
|
void |
close()
Close the ResultSet. |
int |
findColumn(String columnName)
|
BigDecimal |
getBigDecimal(int index)
|
BigDecimal |
getBigDecimal(String name)
|
boolean |
getBoolean(int index)
Get the given value as a boolean. |
boolean |
getBoolean(String name)
|
Date |
getDate(int index)
|
Date |
getDate(String name)
|
double |
getDouble(int index)
|
double |
getDouble(String name)
|
float |
getFloat(int index)
|
float |
getFloat(String name)
|
int |
getInt(int index)
|
int |
getInt(String name)
|
long |
getLong(int index)
|
long |
getLong(String name)
|
ResultSetMetaData |
getMetaData()
|
Object |
getObject(int index)
|
Object |
getObject(String name)
|
protected Object |
getResultColumn(int index)
Get the Object at the given result column for the current result row. |
short |
getShort(int index)
|
short |
getShort(String name)
|
String |
getString(int index)
Get the given column as a string. |
String |
getString(String name)
|
Time |
getTime(int index)
|
Time |
getTime(String name)
|
Timestamp |
getTimestamp(int index)
|
Timestamp |
getTimestamp(String name)
|
SQLWarning |
getWarnings()
|
boolean |
next()
Seek to the next row in this ResultSet. |
protected void |
resetResults()
Reset the results to the beginning. |
protected void |
setMetaData(ResultSetMetaData rsmd)
Set the ResultSetMetaData used for this ResultSet. |
protected void |
setResults(List to)
Set the results for this ResultSet to use. |
String |
toString()
Debug routine for displaying the current row of the ResultSet. |
boolean |
wasNull()
Check to see if the last column fetched was null. |
| Methods inherited from class net.spy.SpyObject |
getLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public GenericResultSetStub(ResultSet rs)
throws SQLException
rs - the ResultSet we want to magically transform
SQLException - if the ResultSet somehow fails us.
protected GenericResultSetStub()
throws SQLException
SQLException - (never)| Method Detail |
protected void resetResults()
protected void setResults(List to)
protected void setMetaData(ResultSetMetaData rsmd)
throws SQLException
rsmd - the ResultSetMetaData
SQLException - if there's a problem examining the signature
protected Object getResultColumn(int index)
throws SQLException
index - the numeric index of the column
SQLException - if there is not a current ResultSet row, or the
index is out of boundspublic String toString()
public boolean next()
throws SQLException
SQLException - if there's a problem seeking...or something
public void close()
throws SQLException
SQLException - (never)
public boolean wasNull()
throws SQLException
SQLException - (never)
public String getString(int index)
throws SQLException
index - the index of the column
SQLException - if misused
public boolean getBoolean(int index)
throws SQLException
index - the index of the column
SQLException - if there's a problem getting the value
public short getShort(int index)
throws SQLException
SQLExceptionResultSet
public int getInt(int index)
throws SQLException
SQLExceptionResultSet
public long getLong(int index)
throws SQLException
SQLExceptionResultSet
public float getFloat(int index)
throws SQLException
SQLExceptionResultSet
public double getDouble(int index)
throws SQLException
SQLExceptionResultSet
public BigDecimal getBigDecimal(int index)
throws SQLException
SQLExceptionResultSet
public Date getDate(int index)
throws SQLException
SQLExceptionResultSet
public Time getTime(int index)
throws SQLException
SQLExceptionResultSet
public Timestamp getTimestamp(int index)
throws SQLException
SQLExceptionResultSet
public Object getObject(int index)
throws SQLException
SQLExceptionResultSet
public int findColumn(String columnName)
throws SQLException
SQLExceptionResultSet
public String getString(String name)
throws SQLException
SQLExceptionResultSet
public boolean getBoolean(String name)
throws SQLException
SQLExceptionResultSet
public short getShort(String name)
throws SQLException
SQLExceptionResultSet
public int getInt(String name)
throws SQLException
SQLExceptionResultSet
public long getLong(String name)
throws SQLException
SQLExceptionResultSet
public float getFloat(String name)
throws SQLException
SQLExceptionResultSet
public double getDouble(String name)
throws SQLException
SQLExceptionResultSet
public Date getDate(String name)
throws SQLException
SQLExceptionResultSet
public Time getTime(String name)
throws SQLException
SQLExceptionResultSet
public Timestamp getTimestamp(String name)
throws SQLException
SQLExceptionResultSet
public BigDecimal getBigDecimal(String name)
throws SQLException
SQLExceptionResultSet
public Object getObject(String name)
throws SQLException
SQLExceptionResultSet
public SQLWarning getWarnings()
throws SQLException
SQLExceptionResultSet
public void clearWarnings()
throws SQLException
SQLExceptionResultSet
public ResultSetMetaData getMetaData()
throws SQLException
SQLExceptionResultSet
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||