org.apache.tapestry.contrib.jdbc
Class SimpleStatement

java.lang.Object
  |
  +--org.apache.tapestry.contrib.jdbc.SimpleStatement
All Implemented Interfaces:
IStatement

public class SimpleStatement
extends Object
implements IStatement

A wrapper around Statement.

Version:
$Id: SimpleStatement.java,v 1.1 2003/03/05 23:03:17 hlship Exp $
Author:
Howard Lewis Ship

Constructor Summary
SimpleStatement(String SQL, Connection connection)
           
SimpleStatement(String SQL, Connection connection, int resultSetType, int resultSetConcurrency)
           
 
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.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleStatement

public SimpleStatement(String SQL,
                       Connection connection)
                throws SQLException

SimpleStatement

public SimpleStatement(String SQL,
                       Connection connection,
                       int resultSetType,
                       int resultSetConcurrency)
                throws SQLException
Method Detail

getSQL

public String getSQL()
Returns the SQL associated with this statement.
Specified by:
getSQL in interface IStatement

getStatement

public Statement getStatement()
Returns the underlying Statement.
Specified by:
getStatement in interface IStatement

close

public void close()
           throws SQLException
Closes the underlying statement, and nulls the reference to it.
Specified by:
close in interface IStatement

executeQuery

public ResultSet executeQuery()
                       throws SQLException
Executes the statement as a query, returning a ResultSet.
Specified by:
executeQuery in interface IStatement

executeUpdate

public int executeUpdate()
                  throws SQLException
Executes the statement as an update, returning the number of rows affected.
Specified by:
executeUpdate in interface IStatement

toString

public String toString()
Overrides:
toString in class Object