org.apache.tapestry.contrib.jdbc
Interface IStatement

All Known Implementing Classes:
ParameterizedStatement, SimpleStatement

public interface IStatement

A wrapper around Statement or PreparedStatement which hides the differences between the two.

Version:
$Id: IStatement.java,v 1.3 2004/02/19 17:37:58 hlship Exp $
Author:
Howard Lewis Ship
See Also:
StatementAssembly.createStatement(Connection)

Method Summary
 void close()
          Closes the underlying statement, and nulls the reference to it.
 ResultSet executeQuery()
          Executes the statement as a query, returning a ResultSet.
 int executeUpdate()
          Executes the statement as an update, returning the number of rows affected.
 String getSQL()
          Returns the SQL associated with this statement.
 Statement getStatement()
          Returns the underlying Statement (or PreparedStatement).
 

Method Detail

getSQL

public String getSQL()
Returns the SQL associated with this statement.


getStatement

public Statement getStatement()
Returns the underlying Statement (or PreparedStatement).


close

public void close()
           throws SQLException
Closes the underlying statement, and nulls the reference to it.

SQLException

executeQuery

public ResultSet executeQuery()
                       throws SQLException
Executes the statement as a query, returning a ResultSet.

SQLException

executeUpdate

public int executeUpdate()
                  throws SQLException
Executes the statement as an update, returning the number of rows affected.

SQLException