パッケージ org.nkjmlab.sorm4j
インタフェース SqlExecutor
-
- 既知のサブインタフェースのリスト:
OrmConnection,OrmTransaction,TypedOrmConnection<T>,TypedOrmTransaction<T>
public interface SqlExecutorA interface for executing SQL with parameters.- 作成者:
- nkjm
-
-
メソッドの概要
すべてのメソッド インスタンス・メソッド abstractメソッド 修飾子とタイプ メソッド 説明 <T> TexecuteQuery(SqlStatement sql, FunctionHandler<ResultSet,T> resultSetHandler)Executes a query and apply the given handler to the returned result set.<T> List<T>executeQuery(SqlStatement sql, RowMapper<T> rowMapper)Executes a query and apply the given mapper to the each row in returned result set.intexecuteUpdate(String sql, Object... parameters)Executes an update and returns the number of rows modified.intexecuteUpdate(SqlStatement sql)ConnectiongetJdbcConnection()GetsConnection.
-
-
-
メソッドの詳細
-
executeQuery
<T> T executeQuery(SqlStatement sql, FunctionHandler<ResultSet,T> resultSetHandler)
Executes a query and apply the given handler to the returned result set.This method wraps
Statement.executeQuery(String)Parameters will be set according with the correspondence defined in
SqlParameterSetter.setParameters(PreparedStatement, Object...)- 型パラメータ:
T-- パラメータ:
sql- SQL code to be executed.resultSetHandler-- 戻り値:
-
executeQuery
<T> List<T> executeQuery(SqlStatement sql, RowMapper<T> rowMapper)
Executes a query and apply the given mapper to the each row in returned result set.- 型パラメータ:
T-- パラメータ:
sql-rowMapper-- 戻り値:
-
executeUpdate
int executeUpdate(String sql, Object... parameters)
Executes an update and returns the number of rows modified.This method wraps
Statement.executeUpdate(String)Parameters will be set according with the correspondence defined in
SqlParameterSetter.setParameters(PreparedStatement, Object...)- パラメータ:
sql- SQL code to be executed.parameters- Parameters to be used in the PreparedStatement.
-
executeUpdate
int executeUpdate(SqlStatement sql)
- パラメータ:
sql-- 戻り値:
-
getJdbcConnection
Connection getJdbcConnection()
GetsConnection.- 戻り値:
-
-