public abstract class SqlExecuter<R>
extends java.lang.Object
| 修飾子とタイプ | フィールドと説明 |
|---|---|
(package private) java.sql.Connection |
con |
(package private) java.lang.String |
connectionFactoryName |
(package private) java.util.List<java.sql.PreparedStatement> |
pstmt |
(package private) RdbAdapter |
rdb |
(package private) java.sql.Statement |
stmt |
| コンストラクタと説明 |
|---|
SqlExecuter() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
close() |
R |
execute(RdbAdapter rdb,
boolean withResourceClose) |
static <R> R |
execute(RdbAdapter rdb,
SqlExecuter<R> exec) |
R |
execute(java.lang.String connectionFactoryName,
RdbAdapter rdb,
boolean withResourceClose) |
java.sql.Connection |
getConnection() |
java.sql.PreparedStatement |
getPreparedStatement(java.lang.String sql) |
java.sql.PreparedStatement |
getPreparedStatement(java.lang.String sql,
java.lang.String[] columnNames) |
java.sql.Statement |
getStatement() |
abstract R |
logic() |
void |
statementClose() |
RdbAdapter rdb
java.sql.Connection con
java.sql.Statement stmt
java.util.List<java.sql.PreparedStatement> pstmt
java.lang.String connectionFactoryName
public java.sql.Connection getConnection()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.PreparedStatement getPreparedStatement(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.PreparedStatement getPreparedStatement(java.lang.String sql)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Statement getStatement()
throws java.sql.SQLException
java.sql.SQLExceptionpublic R execute(RdbAdapter rdb, boolean withResourceClose)
public R execute(java.lang.String connectionFactoryName, RdbAdapter rdb, boolean withResourceClose)
public void statementClose()
public void close()
public abstract R logic() throws java.sql.SQLException
java.sql.SQLExceptionpublic static <R> R execute(RdbAdapter rdb, SqlExecuter<R> exec)