com.primix.tapestry.util.jdbc
Class SimpleStatement
java.lang.Object
|
+--com.primix.tapestry.util.jdbc.SimpleStatement
- All Implemented Interfaces:
- IStatement
- public class SimpleStatement
- extends java.lang.Object
- implements IStatement
A wrapper around Statement
.
- Version:
- $Id: SimpleStatement.java,v 1.4 2001/05/02 14:15:17 hship Exp $
- Author:
- Howard Ship
Constructor Summary |
SimpleStatement(java.lang.String SQL,
java.sql.Connection connection)
|
Method Summary |
void |
close()
Closes the underlying statement, and nulls the reference to it. |
java.sql.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. |
java.lang.String |
getSQL()
Returns the SQL associated with this statement. |
java.sql.Statement |
getStatement()
Returns the underlying Statement . |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SimpleStatement
public SimpleStatement(java.lang.String SQL,
java.sql.Connection connection)
throws java.sql.SQLException
getSQL
public java.lang.String getSQL()
- Returns the SQL associated with this statement.
- Specified by:
getSQL
in interface IStatement
getStatement
public java.sql.Statement getStatement()
- Returns the underlying
Statement
.
- Specified by:
getStatement
in interface IStatement
close
public void close()
throws java.sql.SQLException
- Closes the underlying statement, and nulls the reference to it.
- Specified by:
close
in interface IStatement
executeQuery
public java.sql.ResultSet executeQuery()
throws java.sql.SQLException
- Executes the statement as a query, returning a
ResultSet
.
- Specified by:
executeQuery
in interface IStatement
executeUpdate
public int executeUpdate()
throws java.sql.SQLException
- Executes the statement as an update, returning the number of rows
affected.
- Specified by:
executeUpdate
in interface IStatement
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object