|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry.contrib.jdbc.ParameterizedStatement
public class ParameterizedStatement
A wrapper around PreparedStatement
.
Constructor Summary | |
---|---|
ParameterizedStatement(String SQL,
Connection connection,
List parameters)
Create a new instance; the parameters list is copied. |
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 or PreparedStatement . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ParameterizedStatement(String SQL, Connection connection, List parameters) throws SQLException
SQL
- the SQL to execute (see Connection.prepareStatement(java.lang.String)
)connection
- the JDBC connection to useparameters
- list of IParameter
SQLException
Method Detail |
---|
public String getSQL()
getSQL
in interface IStatement
public Statement getStatement()
PreparedStatement
.
getStatement
in interface IStatement
public void close() throws SQLException
close
in interface IStatement
SQLException
public ResultSet executeQuery() throws SQLException
ResultSet
.
executeQuery
in interface IStatement
SQLException
public int executeUpdate() throws SQLException
executeUpdate
in interface IStatement
SQLException
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |