package edu.hawaii.ics.yucheng; import java.sql.SQLException; import java.sql.Statement; /** * The interface to an object that runs SQL statements. * * @author Cheng Jade * @assignment ICS 421 Project * @date Feb 29, 2010 * @bugs None */ public interface StatementRunner { /** * Runs a statement that has already been initialized but not yet executed. * This method does not close the statement (or the connection that * implemented it). This method does not swallow exceptions. * * @param statement * A statement that has already been initialized but not yet * executed. * * @throws ProgramException * Thrown if there is an error executing the statement. * * @thrown SQLException Thrown if there is an error executing the statement. */ void run(Statement statement) throws ProgramException, SQLException; }