|
||||||||||
| 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
public abstract class 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(java.sql.ResultSet rs)
Magically transform the passed in ResultSet to a GenericResultSetStub |
| Method Summary | |
|---|---|
void |
clearWarnings()
|
void |
close()
Close the ResultSet. |
int |
findColumn(java.lang.String columnName)
|
java.math.BigDecimal |
getBigDecimal(int index)
|
java.math.BigDecimal |
getBigDecimal(java.lang.String name)
|
boolean |
getBoolean(int index)
Get the given value as a boolean. |
boolean |
getBoolean(java.lang.String name)
|
java.sql.Date |
getDate(int index)
|
java.sql.Date |
getDate(java.lang.String name)
|
double |
getDouble(int index)
|
double |
getDouble(java.lang.String name)
|
float |
getFloat(int index)
|
float |
getFloat(java.lang.String name)
|
int |
getInt(int index)
|
int |
getInt(java.lang.String name)
|
long |
getLong(int index)
|
long |
getLong(java.lang.String name)
|
java.sql.ResultSetMetaData |
getMetaData()
|
java.lang.Object |
getObject(int index)
|
java.lang.Object |
getObject(java.lang.String name)
|
protected java.lang.Object |
getResultColumn(int index)
Get the Object at the given result column for the current result row. |
short |
getShort(int index)
|
short |
getShort(java.lang.String name)
|
java.lang.String |
getString(int index)
Get the given column as a string. |
java.lang.String |
getString(java.lang.String name)
|
java.sql.Time |
getTime(int index)
|
java.sql.Time |
getTime(java.lang.String name)
|
java.sql.Timestamp |
getTimestamp(int index)
|
java.sql.Timestamp |
getTimestamp(java.lang.String name)
|
java.sql.SQLWarning |
getWarnings()
|
boolean |
next()
Seek to the next row in this ResultSet. |
protected void |
resetResults()
Reset the results to the beginning. |
protected void |
setMetaData(java.sql.ResultSetMetaData rsmd)
Set the ResultSetMetaData used for this ResultSet. |
protected void |
setResults(java.util.List to)
Set the results for this ResultSet to use. |
java.lang.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(java.sql.ResultSet rs)
throws java.sql.SQLException
rs - the ResultSet we want to magically transform
java.sql.SQLException - if the ResultSet somehow fails us.
protected GenericResultSetStub()
throws java.sql.SQLException
java.sql.SQLException - (never)| Method Detail |
|---|
protected void resetResults()
protected void setResults(java.util.List to)
to - results list to use
protected void setMetaData(java.sql.ResultSetMetaData rsmd)
throws java.sql.SQLException
rsmd - the ResultSetMetaData
java.sql.SQLException - if there's a problem examining the signature
protected java.lang.Object getResultColumn(int index)
throws java.sql.SQLException
index - the numeric index of the column
java.sql.SQLException - if there is not a current ResultSet row, or the
index is out of boundspublic java.lang.String toString()
toString in class java.lang.Object
public boolean next()
throws java.sql.SQLException
java.sql.SQLException - if there's a problem seeking...or something
public void close()
throws java.sql.SQLException
java.sql.SQLException - (never)
public boolean wasNull()
throws java.sql.SQLException
java.sql.SQLException - (never)
public java.lang.String getString(int index)
throws java.sql.SQLException
index - the index of the column
java.sql.SQLException - if misused
public boolean getBoolean(int index)
throws java.sql.SQLException
index - the index of the column
java.sql.SQLException - if there's a problem getting the value
public short getShort(int index)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public int getInt(int index)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public long getLong(int index)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public float getFloat(int index)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public double getDouble(int index)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public java.math.BigDecimal getBigDecimal(int index)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public java.sql.Date getDate(int index)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public java.sql.Time getTime(int index)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public java.sql.Timestamp getTimestamp(int index)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public java.lang.Object getObject(int index)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public int findColumn(java.lang.String columnName)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public java.lang.String getString(java.lang.String name)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public boolean getBoolean(java.lang.String name)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public short getShort(java.lang.String name)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public int getInt(java.lang.String name)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public long getLong(java.lang.String name)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public float getFloat(java.lang.String name)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public double getDouble(java.lang.String name)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public java.sql.Date getDate(java.lang.String name)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public java.sql.Time getTime(java.lang.String name)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public java.sql.Timestamp getTimestamp(java.lang.String name)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public java.math.BigDecimal getBigDecimal(java.lang.String name)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public java.lang.Object getObject(java.lang.String name)
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public void clearWarnings()
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
public java.sql.ResultSetMetaData getMetaData()
throws java.sql.SQLException
java.sql.SQLExceptionResultSet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||