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
ConstructorsConstructorDescriptionConnectionWrapperImpl(DriverWrapper driverWrapper, Connection wrapped) ConnectionWrapperImpl(Connection wrapped) -
Method Summary
Modifier and TypeMethodDescriptionvoidPerforms any clean-up, then callsgetWrapped().abort(executor).voidclose()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 ArrayWrapperImplnewArrayWrapper(StatementWrapperImpl stmtWrapper, Array array) Creates a newArrayWrapperImpl.protected BlobWrapperImplnewBlobWrapper(Blob blob) Creates a newBlobWrapperImpl.protected CallableStatementWrapperImplCreates a newCallableStatementWrapperImpl.protected ClobWrapperImplnewClobWrapper(Clob clob) Creates a newClobWrapperImpl.protected DatabaseMetaDataWrapperImplnewDatabaseMetaDataWrapper(DatabaseMetaData metaData) Creates a newDatabaseMetaDataWrapperImpl.protected InputStreamWrapperCreates a newInputStreamWrapper.protected NClobWrapperImplnewNClobWrapper(NClob nclob) Creates a newNClobWrapperImpl.protected OutputStreamWrapperCreates a newOutputStreamWrapper.protected ParameterMetaDataWrapperImplnewParameterMetaDataWrapper(ParameterMetaData metaData) Creates a newParameterMetaDataWrapperImpl.protected PreparedStatementWrapperImplCreates a newPreparedStatementWrapperImpl.protected ReaderWrapperCreates a newReaderWrapper.protected RefWrapperImplnewRefWrapper(Ref ref) Creates a newRefWrapperImpl.protected ResultSetMetaDataWrapperImplnewResultSetMetaDataWrapper(ResultSetMetaData metaData) Creates a newResultSetMetaDataWrapperImpl.protected ResultSetWrapperImplnewResultSetWrapper(StatementWrapperImpl stmtWrapper, ResultSet results) Creates a newResultSetWrapperImpl.protected RowIdWrapperImplnewRowIdWrapper(RowId rowId) Creates a newRowIdWrapperImpl.protected SavepointWrapperImplnewSavepointWrapper(Savepoint savepoint) Creates a newSavepointWrapperImpl.protected SQLDataWrapperImplnewSQLDataWrapper(SQLData sqlData) Creates a newSQLDataWrapperImpl.protected SQLInputWrapperImplnewSQLInputWrapper(SQLInput sqlInput) Creates a newSQLInputWrapperImpl.protected SQLOutputWrapperImplnewSQLOutputWrapper(SQLOutput sqlOutput) Creates a newSQLOutputWrapperImpl.protected SQLXMLWrapperImplnewSQLXMLWrapper(SQLXML sqlXml) Creates a newSQLXMLWrapperImpl.protected StatementWrapperImplnewStatementWrapper(Statement stmt) Creates a newStatementWrapperImpl.protected StructWrapperImplnewStructWrapper(Struct struct) Creates a newStructWrapperImpl.protected WriterWrappernewWriterWrapper(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) voidreleaseSavepoint(Savepoint savepoint) voidsetSavepoint(String name) toString()protected ArrayunwrapArray(Array array) Unwraps anArray, if wrapped by this wrapper.protected BlobunwrapBlob(Blob blob) Unwraps aBlob, if wrapped by this wrapper.protected ClobunwrapClob(Clob clob) Unwraps aClob, if wrapped by this wrapper.protected InputStreamUnwraps anInputStream, if wrapped by this wrapper.protected NClobunwrapNClob(NClob nclob) Unwraps aNClob, if wrapped by this wrapper.protected ReaderunwrapReader(Reader in) Unwraps aReader, if wrapped by this wrapper.protected RefUnwraps aRef, if wrapped by this wrapper.protected RowIdunwrapRowId(RowId rowId) Unwraps aRowId, if wrapped by this wrapper.protected SavepointunwrapSavepoint(Savepoint savepoint) Unwraps aSavepoint, if wrapped by this wrapper.protected SQLXMLunwrapSQLXML(SQLXML sqlXml) Unwraps aSQLXML, if wrapped by this wrapper.protected StructunwrapStruct(Struct struct) Unwraps aStruct, if wrapped by this wrapper.protected ArrayWrapperImplwrapArray(StatementWrapperImpl stmtWrapper, Array array) Wraps anArray, if not already wrapped by this wrapper.protected BlobWrapperImplWraps aBlob, if not already wrapped by this wrapper.protected CallableStatementWrapperImplWraps aCallableStatement, if not already wrapped by this wrapper.protected ClobWrapperImplWraps aClob, if not already wrapped by this wrapper.protected DatabaseMetaDataWrapperImplwrapDatabaseMetaData(DatabaseMetaData metaData) Wraps aDatabaseMetaData, if not already wrapped by this wrapper.protected InputStreamWrapperWraps anInputStream, if not already wrapped by this wrapper.protected NClobWrapperImplWraps aNClob, if not already wrapped by this wrapper.protected OutputStreamWrapperWraps anOutputStream, if not already wrapped by this wrapper.protected ParameterMetaDataWrapperImplwrapParameterMetaData(ParameterMetaData metaData) Wraps aParameterMetaData, if not already wrapped by this wrapper.protected PreparedStatementWrapperImplWraps aPreparedStatement, if not already wrapped by this wrapper.protected ReaderWrapperwrapReader(Reader in) Wraps aReader, if not already wrapped by this wrapper.protected RefWrapperImplWraps aRef, if not already wrapped by this wrapper.protected ResultSetWrapperImplwrapResultSet(StatementWrapperImpl stmtWrapper, ResultSet results) Wraps aResultSet, if not already wrapped by this wrapper.protected ResultSetMetaDataWrapperImplwrapResultSetMetaData(ResultSetMetaData metaData) Wraps aResultSetMetaData, if not already wrapped by this wrapper.protected RowIdWrapperImplWraps aRowId, if not already wrapped by this wrapper.protected SavepointWrapperImplwrapSavepoint(Savepoint savepoint) Wraps aSavepoint, if not already wrapped by this wrapper.protected SQLDataWrapperImplwrapSQLData(SQLData sqlData) Wraps aSQLData, if not already wrapped by this wrapper.protected SQLInputWrapperImplwrapSQLInput(SQLInput sqlInput) Wraps aSQLInput, if not already wrapped by this wrapper.protected SQLOutputWrapperImplwrapSQLOutput(SQLOutput sqlOutput) Wraps aSQLOutput, if not already wrapped by this wrapper.protected SQLXMLWrapperImplwrapSQLXML(SQLXML sqlXml) Wraps aSQLXML, if not already wrapped by this wrapper.protected StatementWrapperImplwrapStatement(Statement stmt) Wraps aStatement, if not already wrapped by this wrapper.protected StructWrapperImplwrapStruct(Struct struct) Wraps aStruct, if not already wrapped by this wrapper.protected WriterWrapperwrapWriter(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, waitMethods inherited from interface java.sql.Connection
beginRequest, endRequest, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValidMethods 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, setTypeMapMethods inherited from interface com.aoapps.sql.wrapper.Wrapper
isWrapperFor, unwrap
-
Constructor Details
-
ConnectionWrapperImpl
-
ConnectionWrapperImpl
-
-
Method Details
-
getDriver
-
getWrapped
Description copied from interface:ConnectionWrapperGets the connection that is wrapped.- Specified by:
getWrappedin interfaceConnectionWrapper- Specified by:
getWrappedin 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:
createStatementin interfaceConnection- Specified by:
createStatementin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
prepareStatement
- Specified by:
prepareStatementin interfaceConnection- Specified by:
prepareStatementin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
prepareCall
- Specified by:
prepareCallin interfaceConnection- Specified by:
prepareCallin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
close
Performs any clean-up, then callsgetWrapped().close().This default implementation calls
getWrapped().close().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceConnection- Specified by:
closein interfaceConnectionWrapper- Throws:
SQLException
-
getMetaData
- Specified by:
getMetaDatain interfaceConnection- Specified by:
getMetaDatain interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
createStatement
public StatementWrapperImpl createStatement(int resultSetType, int resultSetConcurrency) throws SQLException - Specified by:
createStatementin interfaceConnection- Specified by:
createStatementin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
prepareStatement
public PreparedStatementWrapperImpl prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException - Specified by:
prepareStatementin interfaceConnection- Specified by:
prepareStatementin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
prepareCall
public CallableStatementWrapperImpl prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException - Specified by:
prepareCallin interfaceConnection- Specified by:
prepareCallin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
setSavepoint
- Specified by:
setSavepointin interfaceConnection- Specified by:
setSavepointin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
setSavepoint
- Specified by:
setSavepointin interfaceConnection- Specified by:
setSavepointin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
rollback
- Specified by:
rollbackin interfaceConnection- Specified by:
rollbackin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
releaseSavepoint
- Specified by:
releaseSavepointin interfaceConnection- Specified by:
releaseSavepointin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
createStatement
public StatementWrapperImpl createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - Specified by:
createStatementin interfaceConnection- Specified by:
createStatementin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
prepareStatement
public PreparedStatementWrapperImpl prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - Specified by:
prepareStatementin interfaceConnection- Specified by:
prepareStatementin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
prepareCall
public CallableStatementWrapperImpl prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - Specified by:
prepareCallin interfaceConnection- Specified by:
prepareCallin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
prepareStatement
public PreparedStatementWrapperImpl prepareStatement(String sql, int autoGeneratedKeys) throws SQLException - Specified by:
prepareStatementin interfaceConnection- Specified by:
prepareStatementin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
prepareStatement
public PreparedStatementWrapperImpl prepareStatement(String sql, int[] columnIndexes) throws SQLException - Specified by:
prepareStatementin interfaceConnection- Specified by:
prepareStatementin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
prepareStatement
public PreparedStatementWrapperImpl prepareStatement(String sql, String[] columnNames) throws SQLException - Specified by:
prepareStatementin interfaceConnection- Specified by:
prepareStatementin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
createClob
- Specified by:
createClobin interfaceConnection- Specified by:
createClobin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
createBlob
- Specified by:
createBlobin interfaceConnection- Specified by:
createBlobin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
createNClob
- Specified by:
createNClobin interfaceConnection- Specified by:
createNClobin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
createSQLXML
- Specified by:
createSQLXMLin interfaceConnection- Specified by:
createSQLXMLin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
createArrayOf
- Specified by:
createArrayOfin interfaceConnection- Specified by:
createArrayOfin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
createStruct
- Specified by:
createStructin interfaceConnection- Specified by:
createStructin interfaceConnectionWrapper- Throws:
SQLException- See Also:
-
abort
Performs any clean-up, then callsgetWrapped().abort(executor).This default implementation calls
getWrapped().abort(executor).- Specified by:
abortin interfaceConnection- Specified by:
abortin interfaceConnectionWrapper- Throws:
SQLException
-
