パッケージ jp.co.sds_corp.util.db
クラス DbConnection
- java.lang.Object
-
- jp.co.sds_corp.util.db.DbConnection
-
- すべての実装されたインタフェース:
AutoCloseable
,Connection
,Wrapper
public class DbConnection extends Object implements Connection
Connectionのラッパクラスです。 SQL実行時に、SQL文をログファイルに出力します。 また、SQL実行時に生成されるStatement,PreparedStatement,CallableStatementを それぞれラップして返します。- 作成者:
- 小見山 聡
-
-
フィールドの概要
-
インタフェースから継承されたフィールド java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
-
-
コンストラクタの概要
コンストラクタ 修飾子 コンストラクタ 説明 protected
DbConnection(Connection con)
-
メソッドの概要
-
クラスから継承されたメソッド java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
インタフェースから継承されたメソッド java.sql.Connection
beginRequest, endRequest, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid
-
-
-
-
コンストラクタの詳細
-
DbConnection
protected DbConnection(Connection con)
-
-
メソッドの詳細
-
setSqlOutput
public void setSqlOutput(boolean var)
SQL文出力フラグを設定します。- パラメータ:
var
- SQL文出力フラグ
-
isSqlOutput
public boolean isSqlOutput()
SQL文出力フラグを取得します。- 戻り値:
- SQL文出力フラグ
-
createStatement
public Statement createStatement() throws SQLException
- 定義:
createStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql) throws SQLException
- 定義:
prepareStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareCall
public CallableStatement prepareCall(String sql) throws SQLException
- 定義:
prepareCall
インタフェース内Connection
- 例外:
SQLException
-
nativeSQL
public String nativeSQL(String sql) throws SQLException
- 定義:
nativeSQL
インタフェース内Connection
- 例外:
SQLException
-
setAutoCommit
public void setAutoCommit(boolean autoCommit) throws SQLException
- 定義:
setAutoCommit
インタフェース内Connection
- 例外:
SQLException
-
getAutoCommit
public boolean getAutoCommit() throws SQLException
- 定義:
getAutoCommit
インタフェース内Connection
- 例外:
SQLException
-
commit
public void commit() throws SQLException
- 定義:
commit
インタフェース内Connection
- 例外:
SQLException
-
rollback
public void rollback() throws SQLException
- 定義:
rollback
インタフェース内Connection
- 例外:
SQLException
-
close
public void close() throws SQLException
- 定義:
close
インタフェース内AutoCloseable
- 定義:
close
インタフェース内Connection
- 例外:
SQLException
-
isClosed
public boolean isClosed() throws SQLException
- 定義:
isClosed
インタフェース内Connection
- 例外:
SQLException
-
getMetaData
public DatabaseMetaData getMetaData() throws SQLException
- 定義:
getMetaData
インタフェース内Connection
- 例外:
SQLException
-
setReadOnly
public void setReadOnly(boolean readOnly) throws SQLException
- 定義:
setReadOnly
インタフェース内Connection
- 例外:
SQLException
-
isReadOnly
public boolean isReadOnly() throws SQLException
- 定義:
isReadOnly
インタフェース内Connection
- 例外:
SQLException
-
setCatalog
public void setCatalog(String catalog) throws SQLException
- 定義:
setCatalog
インタフェース内Connection
- 例外:
SQLException
-
getCatalog
public String getCatalog() throws SQLException
- 定義:
getCatalog
インタフェース内Connection
- 例外:
SQLException
-
setTransactionIsolation
public void setTransactionIsolation(int level) throws SQLException
- 定義:
setTransactionIsolation
インタフェース内Connection
- 例外:
SQLException
-
getTransactionIsolation
public int getTransactionIsolation() throws SQLException
- 定義:
getTransactionIsolation
インタフェース内Connection
- 例外:
SQLException
-
getWarnings
public SQLWarning getWarnings() throws SQLException
- 定義:
getWarnings
インタフェース内Connection
- 例外:
SQLException
-
clearWarnings
public void clearWarnings() throws SQLException
- 定義:
clearWarnings
インタフェース内Connection
- 例外:
SQLException
-
createStatement
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
- 定義:
createStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
- 定義:
prepareStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareCall
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
- 定義:
prepareCall
インタフェース内Connection
- 例外:
SQLException
-
getTypeMap
public Map<String,Class<?>> getTypeMap() throws SQLException
- 定義:
getTypeMap
インタフェース内Connection
- 例外:
SQLException
-
setTypeMap
public void setTypeMap(Map<String,Class<?>> map) throws SQLException
- 定義:
setTypeMap
インタフェース内Connection
- 例外:
SQLException
-
setHoldability
public void setHoldability(int holdability) throws SQLException
- 定義:
setHoldability
インタフェース内Connection
- 例外:
SQLException
-
getHoldability
public int getHoldability() throws SQLException
- 定義:
getHoldability
インタフェース内Connection
- 例外:
SQLException
-
setSavepoint
public Savepoint setSavepoint() throws SQLException
- 定義:
setSavepoint
インタフェース内Connection
- 例外:
SQLException
-
setSavepoint
public Savepoint setSavepoint(String name) throws SQLException
- 定義:
setSavepoint
インタフェース内Connection
- 例外:
SQLException
-
rollback
public void rollback(Savepoint savepoint) throws SQLException
- 定義:
rollback
インタフェース内Connection
- 例外:
SQLException
-
releaseSavepoint
public void releaseSavepoint(Savepoint savepoint) throws SQLException
- 定義:
releaseSavepoint
インタフェース内Connection
- 例外:
SQLException
-
createStatement
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
- 定義:
createStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
- 定義:
prepareStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareCall
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
- 定義:
prepareCall
インタフェース内Connection
- 例外:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
- 定義:
prepareStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
- 定義:
prepareStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
- 定義:
prepareStatement
インタフェース内Connection
- 例外:
SQLException
-
createClob
public Clob createClob() throws SQLException
- 定義:
createClob
インタフェース内Connection
- 例外:
SQLException
-
createBlob
public Blob createBlob() throws SQLException
- 定義:
createBlob
インタフェース内Connection
- 例外:
SQLException
-
createNClob
public NClob createNClob() throws SQLException
- 定義:
createNClob
インタフェース内Connection
- 例外:
SQLException
-
createSQLXML
public SQLXML createSQLXML() throws SQLException
- 定義:
createSQLXML
インタフェース内Connection
- 例外:
SQLException
-
isValid
public boolean isValid(int timeout) throws SQLException
- 定義:
isValid
インタフェース内Connection
- 例外:
SQLException
-
setClientInfo
public void setClientInfo(String name, String value) throws SQLClientInfoException
- 定義:
setClientInfo
インタフェース内Connection
- 例外:
SQLClientInfoException
-
setClientInfo
public void setClientInfo(Properties properties) throws SQLClientInfoException
- 定義:
setClientInfo
インタフェース内Connection
- 例外:
SQLClientInfoException
-
getClientInfo
public String getClientInfo(String name) throws SQLException
- 定義:
getClientInfo
インタフェース内Connection
- 例外:
SQLException
-
getClientInfo
public Properties getClientInfo() throws SQLException
- 定義:
getClientInfo
インタフェース内Connection
- 例外:
SQLException
-
createArrayOf
public Array createArrayOf(String typeName, Object[] elements) throws SQLException
- 定義:
createArrayOf
インタフェース内Connection
- 例外:
SQLException
-
createStruct
public Struct createStruct(String typeName, Object[] attributes) throws SQLException
- 定義:
createStruct
インタフェース内Connection
- 例外:
SQLException
-
getNetworkTimeout
public int getNetworkTimeout() throws SQLException
- 定義:
getNetworkTimeout
インタフェース内Connection
- 例外:
SQLException
-
setNetworkTimeout
public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException
- 定義:
setNetworkTimeout
インタフェース内Connection
- 例外:
SQLException
-
abort
public void abort(Executor executor) throws SQLException
- 定義:
abort
インタフェース内Connection
- 例外:
SQLException
-
getSchema
public String getSchema() throws SQLException
- 定義:
getSchema
インタフェース内Connection
- 例外:
SQLException
-
setSchema
public void setSchema(String schema) throws SQLException
- 定義:
setSchema
インタフェース内Connection
- 例外:
SQLException
-
unwrap
public <T> T unwrap(Class<T> iface) throws SQLException
- 定義:
unwrap
インタフェース内Wrapper
- 例外:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface) throws SQLException
- 定義:
isWrapperFor
インタフェース内Wrapper
- 例外:
SQLException
-
-