java.lang.Object
com.aoapps.sql.wrapper.ConnectionWrapperImpl
- All Implemented Interfaces:
ConnectionWrapper
,Wrapper
,AutoCloseable
,Connection
,Wrapper
Wraps a
Connection
.- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
-
Constructor Summary
ConstructorDescriptionConnectionWrapperImpl
(DriverWrapper driverWrapper, Connection wrapped) ConnectionWrapperImpl
(Connection wrapped) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Performs any clean-up, then callsgetWrapped().abort(executor)
.void
close()
Performs any clean-up, then callsgetWrapped().close()
.createArrayOf
(String typeName, Object[] elements) createStatement
(int resultSetType, int resultSetConcurrency) createStatement
(int resultSetType, int resultSetConcurrency, int resultSetHoldability) createStruct
(String typeName, Object[] attributes) protected Optional
<? extends DriverWrapper> Gets the connection that is wrapped.protected ArrayWrapperImpl
newArrayWrapper
(StatementWrapperImpl stmtWrapper, Array array) Creates a newArrayWrapperImpl
.protected BlobWrapperImpl
newBlobWrapper
(Blob blob) Creates a newBlobWrapperImpl
.protected CallableStatementWrapperImpl
Creates a newCallableStatementWrapperImpl
.protected ClobWrapperImpl
newClobWrapper
(Clob clob) Creates a newClobWrapperImpl
.protected DatabaseMetaDataWrapperImpl
newDatabaseMetaDataWrapper
(DatabaseMetaData metaData) Creates a newDatabaseMetaDataWrapperImpl
.protected InputStreamWrapper
Creates a newInputStreamWrapper
.protected NClobWrapperImpl
newNClobWrapper
(NClob nclob) Creates a newNClobWrapperImpl
.protected OutputStreamWrapper
Creates a newOutputStreamWrapper
.protected ParameterMetaDataWrapperImpl
newParameterMetaDataWrapper
(ParameterMetaData metaData) Creates a newParameterMetaDataWrapperImpl
.protected PreparedStatementWrapperImpl
Creates a newPreparedStatementWrapperImpl
.protected ReaderWrapper
Creates a newReaderWrapper
.protected RefWrapperImpl
newRefWrapper
(Ref ref) Creates a newRefWrapperImpl
.protected ResultSetMetaDataWrapperImpl
newResultSetMetaDataWrapper
(ResultSetMetaData metaData) Creates a newResultSetMetaDataWrapperImpl
.protected ResultSetWrapperImpl
newResultSetWrapper
(StatementWrapperImpl stmtWrapper, ResultSet results) Creates a newResultSetWrapperImpl
.protected RowIdWrapperImpl
newRowIdWrapper
(RowId rowId) Creates a newRowIdWrapperImpl
.protected SavepointWrapperImpl
newSavepointWrapper
(Savepoint savepoint) Creates a newSavepointWrapperImpl
.protected SQLDataWrapperImpl
newSQLDataWrapper
(SQLData sqlData) Creates a newSQLDataWrapperImpl
.protected SQLInputWrapperImpl
newSQLInputWrapper
(SQLInput sqlInput) Creates a newSQLInputWrapperImpl
.protected SQLOutputWrapperImpl
newSQLOutputWrapper
(SQLOutput sqlOutput) Creates a newSQLOutputWrapperImpl
.protected SQLXMLWrapperImpl
newSQLXMLWrapper
(SQLXML sqlXml) Creates a newSQLXMLWrapperImpl
.protected StatementWrapperImpl
newStatementWrapper
(Statement stmt) Creates a newStatementWrapperImpl
.protected StructWrapperImpl
newStructWrapper
(Struct struct) Creates a newStructWrapperImpl
.protected WriterWrapper
newWriterWrapper
(Writer out) Creates a newWriterWrapper
.prepareCall
(String sql) prepareCall
(String sql, int resultSetType, int resultSetConcurrency) prepareCall
(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) prepareStatement
(String sql) prepareStatement
(String sql, int autoGeneratedKeys) prepareStatement
(String sql, int[] columnIndexes) prepareStatement
(String sql, int resultSetType, int resultSetConcurrency) prepareStatement
(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) prepareStatement
(String sql, String[] columnNames) void
releaseSavepoint
(Savepoint savepoint) void
setSavepoint
(String name) toString()
protected Array
unwrapArray
(Array array) Unwraps anArray
, if wrapped by this wrapper.protected Blob
unwrapBlob
(Blob blob) Unwraps aBlob
, if wrapped by this wrapper.protected Clob
unwrapClob
(Clob clob) Unwraps aClob
, if wrapped by this wrapper.protected InputStream
Unwraps anInputStream
, if wrapped by this wrapper.protected NClob
unwrapNClob
(NClob nclob) Unwraps aNClob
, if wrapped by this wrapper.protected Reader
unwrapReader
(Reader in) Unwraps aReader
, if wrapped by this wrapper.protected Ref
Unwraps aRef
, if wrapped by this wrapper.protected RowId
unwrapRowId
(RowId rowId) Unwraps aRowId
, if wrapped by this wrapper.protected Savepoint
unwrapSavepoint
(Savepoint savepoint) Unwraps aSavepoint
, if wrapped by this wrapper.protected SQLXML
unwrapSQLXML
(SQLXML sqlXml) Unwraps aSQLXML
, if wrapped by this wrapper.protected Struct
unwrapStruct
(Struct struct) Unwraps aStruct
, if wrapped by this wrapper.protected ArrayWrapperImpl
wrapArray
(StatementWrapperImpl stmtWrapper, Array array) Wraps anArray
, if not already wrapped by this wrapper.protected BlobWrapperImpl
Wraps aBlob
, if not already wrapped by this wrapper.protected CallableStatementWrapperImpl
Wraps aCallableStatement
, if not already wrapped by this wrapper.protected ClobWrapperImpl
Wraps aClob
, if not already wrapped by this wrapper.protected DatabaseMetaDataWrapperImpl
wrapDatabaseMetaData
(DatabaseMetaData metaData) Wraps aDatabaseMetaData
, if not already wrapped by this wrapper.protected InputStreamWrapper
Wraps anInputStream
, if not already wrapped by this wrapper.protected NClobWrapperImpl
Wraps aNClob
, if not already wrapped by this wrapper.protected OutputStreamWrapper
Wraps anOutputStream
, if not already wrapped by this wrapper.protected ParameterMetaDataWrapperImpl
wrapParameterMetaData
(ParameterMetaData metaData) Wraps aParameterMetaData
, if not already wrapped by this wrapper.protected PreparedStatementWrapperImpl
Wraps aPreparedStatement
, if not already wrapped by this wrapper.protected ReaderWrapper
wrapReader
(Reader in) Wraps aReader
, if not already wrapped by this wrapper.protected RefWrapperImpl
Wraps aRef
, if not already wrapped by this wrapper.protected ResultSetWrapperImpl
wrapResultSet
(StatementWrapperImpl stmtWrapper, ResultSet results) Wraps aResultSet
, if not already wrapped by this wrapper.protected ResultSetMetaDataWrapperImpl
wrapResultSetMetaData
(ResultSetMetaData metaData) Wraps aResultSetMetaData
, if not already wrapped by this wrapper.protected RowIdWrapperImpl
Wraps aRowId
, if not already wrapped by this wrapper.protected SavepointWrapperImpl
wrapSavepoint
(Savepoint savepoint) Wraps aSavepoint
, if not already wrapped by this wrapper.protected SQLDataWrapperImpl
wrapSQLData
(SQLData sqlData) Wraps aSQLData
, if not already wrapped by this wrapper.protected SQLInputWrapperImpl
wrapSQLInput
(SQLInput sqlInput) Wraps aSQLInput
, if not already wrapped by this wrapper.protected SQLOutputWrapperImpl
wrapSQLOutput
(SQLOutput sqlOutput) Wraps aSQLOutput
, if not already wrapped by this wrapper.protected SQLXMLWrapperImpl
wrapSQLXML
(SQLXML sqlXml) Wraps aSQLXML
, if not already wrapped by this wrapper.protected StatementWrapperImpl
wrapStatement
(Statement stmt) Wraps aStatement
, if not already wrapped by this wrapper.protected StructWrapperImpl
wrapStruct
(Struct struct) Wraps aStruct
, if not already wrapped by this wrapper.protected WriterWrapper
wrapWriter
(Writer out) Wraps aWriter
, if not already wrapped by this wrapper.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.sql.Connection
beginRequest, endRequest, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid
Methods inherited from interface com.aoapps.sql.wrapper.ConnectionWrapper
clearWarnings, commit, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, getWrappedConnection, isClosed, isReadOnly, isValid, nativeSQL, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSchema, setTransactionIsolation, setTypeMap
Methods inherited from interface com.aoapps.sql.wrapper.Wrapper
isWrapperFor, unwrap
-
Constructor Details
-
ConnectionWrapperImpl
-
ConnectionWrapperImpl
-
-
Method Details
-
getDriver
-
getWrapped
Description copied from interface:ConnectionWrapper
Gets the connection that is wrapped.- Specified by:
getWrapped
in interfaceConnectionWrapper
- Specified by:
getWrapped
in interfaceWrapper
-
toString
-
newArrayWrapper
Creates a newArrayWrapperImpl
.- See Also:
-
newBlobWrapper
Creates a newBlobWrapperImpl
.- See Also:
-
newCallableStatementWrapper
Creates a newCallableStatementWrapperImpl
.- See Also:
-
newClobWrapper
Creates a newClobWrapperImpl
.- See Also:
-
newDatabaseMetaDataWrapper
Creates a newDatabaseMetaDataWrapperImpl
.- See Also:
-
newInputStreamWrapper
Creates a newInputStreamWrapper
.- See Also:
-
newNClobWrapper
Creates a newNClobWrapperImpl
.- See Also:
-
newOutputStreamWrapper
Creates a newOutputStreamWrapper
.- See Also:
-
newParameterMetaDataWrapper
Creates a newParameterMetaDataWrapperImpl
.- See Also:
-
newPreparedStatementWrapper
Creates a newPreparedStatementWrapperImpl
.- See Also:
-
newReaderWrapper
Creates a newReaderWrapper
.- See Also:
-
newRefWrapper
Creates a newRefWrapperImpl
.- See Also:
-
newResultSetWrapper
protected ResultSetWrapperImpl newResultSetWrapper(StatementWrapperImpl stmtWrapper, ResultSet results) Creates a newResultSetWrapperImpl
.- See Also:
-
newResultSetMetaDataWrapper
Creates a newResultSetMetaDataWrapperImpl
.- See Also:
-
newRowIdWrapper
Creates a newRowIdWrapperImpl
.- See Also:
-
newSQLDataWrapper
Creates a newSQLDataWrapperImpl
.- See Also:
-
newSQLInputWrapper
Creates a newSQLInputWrapperImpl
.- See Also:
-
newSQLOutputWrapper
Creates a newSQLOutputWrapperImpl
.- See Also:
-
newSQLXMLWrapper
Creates a newSQLXMLWrapperImpl
.- See Also:
-
newSavepointWrapper
Creates a newSavepointWrapperImpl
.- See Also:
-
newStatementWrapper
Creates a newStatementWrapperImpl
.- See Also:
-
newStructWrapper
Creates a newStructWrapperImpl
.- See Also:
-
newWriterWrapper
Creates a newWriterWrapper
.- See Also:
-
wrapArray
Wraps anArray
, if not already wrapped by this wrapper.- See Also:
-
unwrapArray
Unwraps anArray
, if wrapped by this wrapper.- See Also:
-
wrapBlob
Wraps aBlob
, if not already wrapped by this wrapper.- See Also:
-
unwrapBlob
Unwraps aBlob
, if wrapped by this wrapper.- See Also:
-
wrapCallableStatement
Wraps aCallableStatement
, if not already wrapped by this wrapper.- See Also:
-
wrapClob
Wraps aClob
, if not already wrapped by this wrapper.- See Also:
-
unwrapClob
Unwraps aClob
, if wrapped by this wrapper.- See Also:
-
wrapDatabaseMetaData
Wraps aDatabaseMetaData
, if not already wrapped by this wrapper.- See Also:
-
wrapInputStream
Wraps anInputStream
, if not already wrapped by this wrapper.- See Also:
-
unwrapInputStream
Unwraps anInputStream
, if wrapped by this wrapper.- See Also:
-
wrapNClob
Wraps aNClob
, if not already wrapped by this wrapper.- See Also:
-
unwrapNClob
Unwraps aNClob
, if wrapped by this wrapper.- See Also:
-
wrapOutputStream
Wraps anOutputStream
, if not already wrapped by this wrapper.- See Also:
-
wrapParameterMetaData
Wraps aParameterMetaData
, if not already wrapped by this wrapper.- See Also:
-
wrapPreparedStatement
Wraps aPreparedStatement
, if not already wrapped by this wrapper.- See Also:
-
wrapReader
Wraps aReader
, if not already wrapped by this wrapper.- See Also:
-
unwrapReader
Unwraps aReader
, if wrapped by this wrapper.- See Also:
-
wrapRef
Wraps aRef
, if not already wrapped by this wrapper.- See Also:
-
unwrapRef
Unwraps aRef
, if wrapped by this wrapper.- See Also:
-
wrapResultSet
protected ResultSetWrapperImpl wrapResultSet(StatementWrapperImpl stmtWrapper, ResultSet results) throws SQLException Wraps aResultSet
, if not already wrapped by this wrapper.- Throws:
SQLException
- See Also:
-
wrapResultSetMetaData
Wraps aResultSetMetaData
, if not already wrapped by this wrapper.- See Also:
-
wrapRowId
Wraps aRowId
, if not already wrapped by this wrapper.- See Also:
-
unwrapRowId
Unwraps aRowId
, if wrapped by this wrapper.- See Also:
-
wrapSavepoint
Wraps aSavepoint
, if not already wrapped by this wrapper.- See Also:
-
unwrapSavepoint
Unwraps aSavepoint
, if wrapped by this wrapper. -
wrapSQLData
Wraps aSQLData
, if not already wrapped by this wrapper.- See Also:
-
wrapSQLInput
Wraps aSQLInput
, if not already wrapped by this wrapper.- See Also:
-
wrapSQLOutput
Wraps aSQLOutput
, if not already wrapped by this wrapper.- See Also:
-
wrapSQLXML
Wraps aSQLXML
, if not already wrapped by this wrapper.- See Also:
-
unwrapSQLXML
Unwraps aSQLXML
, if wrapped by this wrapper.- See Also:
-
wrapStatement
Wraps aStatement
, if not already wrapped by this wrapper.- See Also:
-
wrapStruct
Wraps aStruct
, if not already wrapped by this wrapper.- See Also:
-
unwrapStruct
Unwraps aStruct
, if wrapped by this wrapper.- See Also:
-
wrapWriter
Wraps aWriter
, if not already wrapped by this wrapper.- See Also:
-
createStatement
- Specified by:
createStatement
in interfaceConnection
- Specified by:
createStatement
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
prepareStatement
- Specified by:
prepareStatement
in interfaceConnection
- Specified by:
prepareStatement
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
prepareCall
- Specified by:
prepareCall
in interfaceConnection
- Specified by:
prepareCall
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
close
Performs any clean-up, then callsgetWrapped().close()
.This default implementation calls
getWrapped().close()
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceConnection
- Specified by:
close
in interfaceConnectionWrapper
- Throws:
SQLException
-
getMetaData
- Specified by:
getMetaData
in interfaceConnection
- Specified by:
getMetaData
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
createStatement
public StatementWrapperImpl createStatement(int resultSetType, int resultSetConcurrency) throws SQLException - Specified by:
createStatement
in interfaceConnection
- Specified by:
createStatement
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
prepareStatement
public PreparedStatementWrapperImpl prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException - Specified by:
prepareStatement
in interfaceConnection
- Specified by:
prepareStatement
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
prepareCall
public CallableStatementWrapperImpl prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException - Specified by:
prepareCall
in interfaceConnection
- Specified by:
prepareCall
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
setSavepoint
- Specified by:
setSavepoint
in interfaceConnection
- Specified by:
setSavepoint
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
setSavepoint
- Specified by:
setSavepoint
in interfaceConnection
- Specified by:
setSavepoint
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
rollback
- Specified by:
rollback
in interfaceConnection
- Specified by:
rollback
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
releaseSavepoint
- Specified by:
releaseSavepoint
in interfaceConnection
- Specified by:
releaseSavepoint
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
createStatement
public StatementWrapperImpl createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - Specified by:
createStatement
in interfaceConnection
- Specified by:
createStatement
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
prepareStatement
public PreparedStatementWrapperImpl prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - Specified by:
prepareStatement
in interfaceConnection
- Specified by:
prepareStatement
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
prepareCall
public CallableStatementWrapperImpl prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - Specified by:
prepareCall
in interfaceConnection
- Specified by:
prepareCall
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
prepareStatement
public PreparedStatementWrapperImpl prepareStatement(String sql, int autoGeneratedKeys) throws SQLException - Specified by:
prepareStatement
in interfaceConnection
- Specified by:
prepareStatement
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
prepareStatement
public PreparedStatementWrapperImpl prepareStatement(String sql, int[] columnIndexes) throws SQLException - Specified by:
prepareStatement
in interfaceConnection
- Specified by:
prepareStatement
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
prepareStatement
public PreparedStatementWrapperImpl prepareStatement(String sql, String[] columnNames) throws SQLException - Specified by:
prepareStatement
in interfaceConnection
- Specified by:
prepareStatement
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
createClob
- Specified by:
createClob
in interfaceConnection
- Specified by:
createClob
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
createBlob
- Specified by:
createBlob
in interfaceConnection
- Specified by:
createBlob
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
createNClob
- Specified by:
createNClob
in interfaceConnection
- Specified by:
createNClob
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
createSQLXML
- Specified by:
createSQLXML
in interfaceConnection
- Specified by:
createSQLXML
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
createArrayOf
- Specified by:
createArrayOf
in interfaceConnection
- Specified by:
createArrayOf
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
createStruct
- Specified by:
createStruct
in interfaceConnection
- Specified by:
createStruct
in interfaceConnectionWrapper
- Throws:
SQLException
- See Also:
-
abort
Performs any clean-up, then callsgetWrapped().abort(executor)
.This default implementation calls
getWrapped().abort(executor)
.- Specified by:
abort
in interfaceConnection
- Specified by:
abort
in interfaceConnectionWrapper
- Throws:
SQLException
-