|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mockrunner.mock.jdbc.MockStatement
net.sourceforge.sqlunit.test.mock.SQLUnitMockStatement
public class SQLUnitMockStatement
Overrides certain methods in the MockStatement class for mock testing of SQLUnit.
| Field Summary |
|---|
| Fields inherited from interface java.sql.Statement |
|---|
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO |
| Constructor Summary | |
|---|---|
SQLUnitMockStatement(java.sql.Connection conn)
Instantiates a SQLUnitMockStatement object using a Connection. |
|
| Method Summary | |
|---|---|
boolean |
execute(java.lang.String sql)
Overrides the execute(String) method in MockStatement. |
boolean |
getMoreResults(java.lang.String sql)
Returns true if there are more result sets available for this SQL. |
java.sql.ResultSet |
getResultSet()
Returns the current result set from the SQL statement. |
int |
getUpdateCount()
Returns the update count. |
void |
setResultSetHandler(com.mockrunner.jdbc.AbstractResultSetHandler aHandler)
Sets the IntrospectingStatementResultSetHandler for the MockStatement. |
| Methods inherited from class com.mockrunner.mock.jdbc.MockStatement |
|---|
addBatch, cancel, clearBatch, clearWarnings, cloneResultSet, close, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getCursorName, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getWarnings, isClosed, isQuery, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setNextResultSet, setNextUpdateCount, setQueryTimeout |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SQLUnitMockStatement(java.sql.Connection conn)
conn - a Connection object.| Method Detail |
|---|
public final void setResultSetHandler(com.mockrunner.jdbc.AbstractResultSetHandler aHandler)
setResultSetHandler in class com.mockrunner.mock.jdbc.MockStatementaHandler - an IntrospectingStatementResultSetHandler object.
public final boolean getMoreResults(java.lang.String sql)
throws java.sql.SQLException
sql - the SQL to look up.
java.sql.SQLException - if one is thrown.
public final java.sql.ResultSet getResultSet()
throws java.sql.SQLException
getResultSet in interface java.sql.StatementgetResultSet in class com.mockrunner.mock.jdbc.MockStatementjava.sql.SQLException - if one is thrown.
public final boolean execute(java.lang.String sql)
throws java.sql.SQLException
execute in interface java.sql.Statementexecute in class com.mockrunner.mock.jdbc.MockStatementsql - the SQL string to execute.
java.sql.SQLException - if there was a problem.
public final int getUpdateCount()
throws java.sql.SQLException
getUpdateCount in interface java.sql.StatementgetUpdateCount in class com.mockrunner.mock.jdbc.MockStatementjava.sql.SQLException - if an error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||