net.sourceforge.sqlunit.test.mock
Class AbstractMockDatabase

java.lang.Object
  extended by net.sourceforge.sqlunit.test.mock.AbstractMockDatabase
All Implemented Interfaces:
IMockDatabase
Direct Known Subclasses:
SQLUnitMockDatabase

public abstract class AbstractMockDatabase
extends java.lang.Object
implements IMockDatabase

Abstract base class from which all IMockDatabase objects must extend.

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

Constructor Summary
AbstractMockDatabase()
           
 
Method Summary
protected  com.mockrunner.mock.jdbc.MockResultSet getResultSet(java.lang.String methodName)
          Returns the default (1st) resultset from the list of resultsets.
 com.mockrunner.mock.jdbc.MockResultSet getResultSet(java.lang.String methodName, int resultSetId)
          Delegates to the named queryMethodName and returns the MockResultSet object generated from it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMockDatabase

public AbstractMockDatabase()
Method Detail

getResultSet

public final com.mockrunner.mock.jdbc.MockResultSet getResultSet(java.lang.String methodName,
                                                                 int resultSetId)
                                                          throws java.lang.Exception
Delegates to the named queryMethodName and returns the MockResultSet object generated from it.

Specified by:
getResultSet in interface IMockDatabase
Parameters:
methodName - the name of the method to invoke.
resultSetId - the id of a single resultset in case of multiple.
Returns:
a MockResultSet object.
Throws:
java.lang.Exception - if one is thrown.

getResultSet

protected com.mockrunner.mock.jdbc.MockResultSet getResultSet(java.lang.String methodName)
                                                       throws java.lang.Exception
Returns the default (1st) resultset from the list of resultsets.

Parameters:
methodName - the name of the method to invoke.
Returns:
the first (or only) MockResultSet object.
Throws:
java.lang.Exception - if one is thrown.