Class Logged
java.lang.Object
com.github.fabriciofx.cactoos.jdbc.connection.ConnectionEnvelope
com.github.fabriciofx.cactoos.jdbc.connection.Logged
- All Implemented Interfaces:
AutoCloseable
,Connection
,Wrapper
Logged Connection.
- Since:
- 0.1
-
Field Summary
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
-
Constructor Summary
ConstructorDescriptionLogged
(Connection connection, String src, Logger lggr, Level lvl, int num, AtomicInteger stmtsId) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
close()
void
commit()
createStatement
(int resultSetType, int resultSetConcurrency) int
boolean
prepareCall
(String sql) prepareCall
(String sql, int resultSetType, int resultSetConcurrency) prepareStatement
(String sql) prepareStatement
(String sql, int autoGeneratedKeys) prepareStatement
(String sql, int resultSetType, int resultSetConcurrency) prepareStatement
(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) void
rollback()
void
setAutoCommit
(boolean autoCommit) void
setCatalog
(String catalog) void
setReadOnly
(boolean readOnly) void
setTransactionIsolation
(int lvl) Methods inherited from class com.github.fabriciofx.cactoos.jdbc.connection.ConnectionEnvelope
abort, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTypeMap, isClosed, isValid, isWrapperFor, prepareCall, prepareStatement, prepareStatement, releaseSavepoint, rollback, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setSavepoint, setSavepoint, setSchema, setTypeMap, unwrap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.sql.Connection
beginRequest, endRequest, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid
-
Constructor Details
-
Logged
public Logged(Connection connection, String src, Logger lggr, Level lvl, int num, AtomicInteger stmtsId) Ctor.- Parameters:
connection
- Decorated connectionsrc
- The name of source datalggr
- The loggerlvl
- The connection levelnum
- The connection idstmtsId
- The statement id
-
-
Method Details
-
createStatement
- Specified by:
createStatement
in interfaceConnection
- Overrides:
createStatement
in classConnectionEnvelope
- Throws:
SQLException
-
prepareStatement
- Specified by:
prepareStatement
in interfaceConnection
- Overrides:
prepareStatement
in classConnectionEnvelope
- Throws:
SQLException
-
prepareCall
- Specified by:
prepareCall
in interfaceConnection
- Overrides:
prepareCall
in classConnectionEnvelope
- Throws:
SQLException
-
nativeSQL
- Specified by:
nativeSQL
in interfaceConnection
- Overrides:
nativeSQL
in classConnectionEnvelope
- Throws:
SQLException
-
setAutoCommit
- Specified by:
setAutoCommit
in interfaceConnection
- Overrides:
setAutoCommit
in classConnectionEnvelope
- Throws:
SQLException
-
commit
- Specified by:
commit
in interfaceConnection
- Overrides:
commit
in classConnectionEnvelope
- Throws:
SQLException
-
rollback
- Specified by:
rollback
in interfaceConnection
- Overrides:
rollback
in classConnectionEnvelope
- Throws:
SQLException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceConnection
- Overrides:
close
in classConnectionEnvelope
- Throws:
SQLException
-
setReadOnly
- Specified by:
setReadOnly
in interfaceConnection
- Overrides:
setReadOnly
in classConnectionEnvelope
- Throws:
SQLException
-
isReadOnly
- Specified by:
isReadOnly
in interfaceConnection
- Overrides:
isReadOnly
in classConnectionEnvelope
- Throws:
SQLException
-
setCatalog
- Specified by:
setCatalog
in interfaceConnection
- Overrides:
setCatalog
in classConnectionEnvelope
- Throws:
SQLException
-
setTransactionIsolation
- Specified by:
setTransactionIsolation
in interfaceConnection
- Overrides:
setTransactionIsolation
in classConnectionEnvelope
- Throws:
SQLException
-
getTransactionIsolation
- Specified by:
getTransactionIsolation
in interfaceConnection
- Overrides:
getTransactionIsolation
in classConnectionEnvelope
- Throws:
SQLException
-
getWarnings
- Specified by:
getWarnings
in interfaceConnection
- Overrides:
getWarnings
in classConnectionEnvelope
- Throws:
SQLException
-
clearWarnings
- Specified by:
clearWarnings
in interfaceConnection
- Overrides:
clearWarnings
in classConnectionEnvelope
- Throws:
SQLException
-
createStatement
- Specified by:
createStatement
in interfaceConnection
- Overrides:
createStatement
in classConnectionEnvelope
- Throws:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException - Specified by:
prepareStatement
in interfaceConnection
- Overrides:
prepareStatement
in classConnectionEnvelope
- Throws:
SQLException
-
prepareCall
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException - Specified by:
prepareCall
in interfaceConnection
- Overrides:
prepareCall
in classConnectionEnvelope
- Throws:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - Specified by:
prepareStatement
in interfaceConnection
- Overrides:
prepareStatement
in classConnectionEnvelope
- Throws:
SQLException
-
prepareStatement
- Specified by:
prepareStatement
in interfaceConnection
- Overrides:
prepareStatement
in classConnectionEnvelope
- Throws:
SQLException
-