|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.sqlunit.test.mock.IntrospectingResultSetFactory
public class IntrospectingResultSetFactory
Introspects a given IMockDataStore object and invokes the named method to return ResultSet objects.
Constructor Summary | |
---|---|
IntrospectingResultSetFactory(java.lang.String mockDbClassName)
Instantiate a Introspecting Result Set Factory using the classname of the IMockDataStore object. |
Method Summary | |
---|---|
com.mockrunner.mock.jdbc.MockResultSet |
create(java.lang.String sql)
Build a mockresultset object using the method id. |
com.mockrunner.mock.jdbc.MockResultSet |
create(java.lang.String sql,
int rsIndex)
Returns the resultset for the sql at the specified index. |
int |
getNumberOfResultSets(java.lang.String sql)
Convenience method to return the number of result sets for a particular SQL query. |
java.lang.Object |
getOutParamValueAt(java.lang.String sql,
int pIndex,
int sqlType)
Returns the outparam value at the specified position and converts to an object of the specified type. |
int |
getUpdateCount(java.lang.String sql)
Convenience method to return the update count for an SQL which updates the database, such as INSERT, UPDATE or DELETE. |
int |
incrementIndex()
Moves the resultset index up by 1. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntrospectingResultSetFactory(java.lang.String mockDbClassName)
mockDbClassName
- the name of a class implementing the
IMockDatabase interface and representing a particular database.Method Detail |
---|
public final com.mockrunner.mock.jdbc.MockResultSet create(java.lang.String sql)
create
in interface com.mockrunner.jdbc.ResultSetFactory
sql
- a string containing the sql to execute.
public final com.mockrunner.mock.jdbc.MockResultSet create(java.lang.String sql, int rsIndex)
sql
- a string containing the sql to execute.rsIndex
- the index of the resultset to return.
public final int incrementIndex()
public final int getNumberOfResultSets(java.lang.String sql) throws java.sql.SQLException
sql
- the string containing the SQL to execute.
java.sql.SQLException
- if an error occurs.public final int getUpdateCount(java.lang.String sql)
sql
- the string containing the SQL to execute.
public final java.lang.Object getOutParamValueAt(java.lang.String sql, int pIndex, int sqlType) throws java.sql.SQLException
sql
- the SQL string to look up.pIndex
- the parameter index (1-based).sqlType
- the SQL Type to use for conversion.
java.sql.SQLException
- if an error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |