com.mockrunner.jdbc.StatementResultSetHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockrunner-jdk1.3-j2ee1.3 Show documentation
Show all versions of mockrunner-jdk1.3-j2ee1.3 Show documentation
Mockrunner is a lightweight framework for unit testing applications
in the J2EE environment. It supports servlets, filters, tag classes
and Struts actions. It includes a JDBC a JMS and a JCA test
framework and can be used to test EJB based applications.
The newest version!
package com.mockrunner.jdbc;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import com.mockrunner.mock.jdbc.MockStatement;
/**
* Concrete handler for {@link AbstractResultSetHandler}.
*/
public class StatementResultSetHandler extends AbstractResultSetHandler
{
private List statements;
public StatementResultSetHandler()
{
statements = new ArrayList();
}
/**
* The Connection
adds new statements with
* this method.
* @param statement the {@link MockStatement}
*/
public void addStatement(MockStatement statement)
{
statement.setResultSetHandler(this);
statements.add(statement);
}
/**
* Returns a List
of all statements.
* @return the List
of {@link MockStatement} objects
*/
public List getStatements()
{
return Collections.unmodifiableList(statements);
}
/**
* Clears the List
of statements.
*/
public void clearStatements()
{
statements.clear();
}
}