net.sourceforge.sqlunit.test.mock
Class IntrospectingPreparedStatementResultSetHandler

java.lang.Object
  extended by com.mockrunner.jdbc.AbstractResultSetHandler
      extended by com.mockrunner.jdbc.AbstractParameterResultSetHandler
          extended by com.mockrunner.jdbc.PreparedStatementResultSetHandler
              extended by net.sourceforge.sqlunit.test.mock.IntrospectingPreparedStatementResultSetHandler

public class IntrospectingPreparedStatementResultSetHandler
extends com.mockrunner.jdbc.PreparedStatementResultSetHandler

Extends the PreparedStatementResultSetHandler to use introspection.

Version:
$Revision: 1.7 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Constructor Summary
IntrospectingPreparedStatementResultSetHandler(java.lang.String catalog)
          Instantiate a PreparedStatementResultSetHandler that depends on Introspection.
 
Method Summary
 com.mockrunner.mock.jdbc.MockResultSet getResultSet(java.lang.String sqlString)
          Returns a MockResultSet for the specified SQL string.
 java.lang.Integer getUpdateCount(java.lang.String sqlString)
          Returns the update count for the specified SQL string.
 boolean hasMoreResults(java.lang.String sqlString)
          Returns true of there are more result sets available for this SQL call.
 
Methods inherited from class com.mockrunner.jdbc.PreparedStatementResultSetHandler
addPreparedStatement, clearPreparedStatements, getPreparedStatementMap, getPreparedStatements
 
Methods inherited from class com.mockrunner.jdbc.AbstractParameterResultSetHandler
clearResultSets, clearThrowsSQLException, clearUpdateCounts, doParameterMatch, getResultSet, getThrowsSQLException, getUpdateCount, prepareResultSet, prepareResultSet, prepareResultSet, prepareThrowsSQLException, prepareThrowsSQLException, prepareThrowsSQLException, prepareUpdateCount, prepareUpdateCount, prepareUpdateCount, setExactMatchParameter
 
Methods inherited from class com.mockrunner.jdbc.AbstractResultSetHandler
addExecutedStatement, addReturnedResultSet, clearGlobalResultSet, clearReturnsResultSet, createResultSet, createResultSet, createResultSet, createResultSet, getCaseSensitive, getExactMatch, getExecutedStatements, getGlobalResultSet, getGlobalUpdateCount, getResultSetMap, getReturnedResultSets, getReturnsResultSet, getThrowsSQLException, getUpdateCountMap, prepareGlobalResultSet, prepareGlobalUpdateCount, prepareResultSet, prepareReturnsResultSet, prepareThrowsSQLException, prepareUpdateCount, setCaseSensitive, setExactMatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntrospectingPreparedStatementResultSetHandler

public IntrospectingPreparedStatementResultSetHandler(java.lang.String catalog)
Instantiate a PreparedStatementResultSetHandler that depends on Introspection.

Parameters:
catalog - the name of the class to introspect.
Method Detail

getResultSet

public final com.mockrunner.mock.jdbc.MockResultSet getResultSet(java.lang.String sqlString)
Returns a MockResultSet for the specified SQL string.

Overrides:
getResultSet in class com.mockrunner.jdbc.AbstractResultSetHandler
Parameters:
sqlString - the SQL string to invoke.
Returns:
a MockResultSet

hasMoreResults

public final boolean hasMoreResults(java.lang.String sqlString)
                             throws java.sql.SQLException
Returns true of there are more result sets available for this SQL call. Also increments the result set index as a side effect.

Parameters:
sqlString - the SQL to look up.
Returns:
true if there are more resultsets, false if not.
Throws:
java.sql.SQLException - if one is thrown.

getUpdateCount

public final java.lang.Integer getUpdateCount(java.lang.String sqlString)
Returns the update count for the specified SQL string.

Overrides:
getUpdateCount in class com.mockrunner.jdbc.AbstractResultSetHandler
Parameters:
sqlString - the SQL string to look up.
Returns:
an updatecount as an Integer.