public class JDBCExecutor
extends java.lang.Object
JDBCExecutor has the capability of running SQL statements via
JDBC over a supplied Connection.| Constructor | Description |
|---|---|
JDBCExecutor(java.sql.Connection connection) |
Constructs a
JDBCExecutor that will operate over the given
open Connection to a database. |
| Modifier and Type | Method | Description |
|---|---|---|
java.util.List<ResultSetRow> |
execQuery(java.lang.String sql) |
Executes the given SQL statement using a
Statement to obtain
a List of ResultSetRows. |
java.util.List<ResultSetRow> |
execQuery(java.lang.String sql,
java.lang.Object... bindVariableValues) |
Executes the given SQL statement using a
PreparedStatement
to obtain a List of ResultSetRows. |
public JDBCExecutor(java.sql.Connection connection)
JDBCExecutor that will operate over the given
open Connection to a database.connection - An open Connection.public java.util.List<ResultSetRow> execQuery(java.lang.String sql) throws java.sql.SQLException
Statement to obtain
a List of ResultSetRows. Execution of the
Statement yields a ResultSet, which is
processed to create the ResultSetRows.sql - The SQL statement.List of ResultSetRows.java.sql.SQLException - If there was a problem executing the statement.public java.util.List<ResultSetRow> execQuery(java.lang.String sql, java.lang.Object... bindVariableValues) throws java.sql.SQLException
PreparedStatement
to obtain a List of ResultSetRows. Execution
of the PreparedStatement yields a ResultSet,
which is processed to create the ResultSetRows.sql - The SQL statement.bindVariableValues - Optional bind variable values. There must be
exactly one of these for every ? in the SQL query.List of ResultSetRows.java.sql.SQLException - If there was a problem executing the statement.Copyright © 2012–2018 Jett Team. All rights reserved.