Class Logged
java.lang.Object
com.github.fabriciofx.cactoos.jdbc.prepared.PreparedStatementEnvelope
com.github.fabriciofx.cactoos.jdbc.prepared.Logged
- All Implemented Interfaces:
AutoCloseable
,PreparedStatement
,Statement
,Wrapper
Logged PreparedStatement.
- Since:
- 0.1
-
Field Summary
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
-
Constructor Summary
ConstructorDescriptionLogged
(PreparedStatement stmt, String src, Logger lggr, Level lvl, int id) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBatch()
void
void
cancel()
void
void
close()
void
boolean
execute()
boolean
int[]
executeQuery
(String sql) int
int
executeUpdate
(String sql) void
setAsciiStream
(int index, InputStream stream, int length) void
setBigDecimal
(int index, BigDecimal value) void
setBinaryStream
(int index, InputStream stream, int length) void
setBoolean
(int index, boolean value) void
setByte
(int index, byte value) void
setBytes
(int index, byte[] values) void
void
setDouble
(int index, double value) void
setFloat
(int index, float value) void
setInt
(int index, int value) void
setLong
(int index, long value) void
setMaxFieldSize
(int max) void
setMaxRows
(int max) void
setNull
(int index, int type) void
void
void
setPoolable
(boolean poolable) void
setQueryTimeout
(int seconds) void
setShort
(int index, short value) void
void
void
setTimestamp
(int index, Timestamp value) void
setUnicodeStream
(int index, InputStream stream, int length) Deprecated.It not should be usedMethods inherited from class com.github.fabriciofx.cactoos.jdbc.prepared.PreparedStatementEnvelope
clearBatch, clearWarnings, execute, execute, execute, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getMetaData, getMoreResults, getMoreResults, getParameterMetaData, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, setArray, setAsciiStream, setAsciiStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setCursorName, setDate, setEscapeProcessing, setFetchDirection, setFetchSize, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setObject, setRef, setRowId, setSQLXML, setTime, setTimestamp, setURL, 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.PreparedStatement
executeLargeUpdate, setObject, setObject
Methods inherited from interface java.sql.Statement
enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isSimpleIdentifier, setLargeMaxRows
-
Constructor Details
-
Logged
Ctor.- Parameters:
stmt
- Decorated PreparedStatementsrc
- The name of source datalggr
- The loggerlvl
- The connection levelid
- The PreparedStatement id
-
-
Method Details
-
executeQuery
- Specified by:
executeQuery
in interfacePreparedStatement
- Overrides:
executeQuery
in classPreparedStatementEnvelope
- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdate
in interfacePreparedStatement
- Overrides:
executeUpdate
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setNull
- Specified by:
setNull
in interfacePreparedStatement
- Overrides:
setNull
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setBoolean
- Specified by:
setBoolean
in interfacePreparedStatement
- Overrides:
setBoolean
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setByte
- Specified by:
setByte
in interfacePreparedStatement
- Overrides:
setByte
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setShort
- Specified by:
setShort
in interfacePreparedStatement
- Overrides:
setShort
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setInt
- Specified by:
setInt
in interfacePreparedStatement
- Overrides:
setInt
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setLong
- Specified by:
setLong
in interfacePreparedStatement
- Overrides:
setLong
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setFloat
- Specified by:
setFloat
in interfacePreparedStatement
- Overrides:
setFloat
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setDouble
- Specified by:
setDouble
in interfacePreparedStatement
- Overrides:
setDouble
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setBigDecimal
- Specified by:
setBigDecimal
in interfacePreparedStatement
- Overrides:
setBigDecimal
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setString
- Specified by:
setString
in interfacePreparedStatement
- Overrides:
setString
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setBytes
- Specified by:
setBytes
in interfacePreparedStatement
- Overrides:
setBytes
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setDate
- Specified by:
setDate
in interfacePreparedStatement
- Overrides:
setDate
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setTime
- Specified by:
setTime
in interfacePreparedStatement
- Overrides:
setTime
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setTimestamp
- Specified by:
setTimestamp
in interfacePreparedStatement
- Overrides:
setTimestamp
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setAsciiStream
- Specified by:
setAsciiStream
in interfacePreparedStatement
- Overrides:
setAsciiStream
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setUnicodeStream
@Deprecated public void setUnicodeStream(int index, InputStream stream, int length) throws SQLException Deprecated.It not should be usedSet a stream to Unicode.- Specified by:
setUnicodeStream
in interfacePreparedStatement
- Overrides:
setUnicodeStream
in classPreparedStatementEnvelope
- Parameters:
index
- Parameter indexstream
- InputStreamlength
- Data length- Throws:
SQLException
- If fails
-
setBinaryStream
- Specified by:
setBinaryStream
in interfacePreparedStatement
- Overrides:
setBinaryStream
in classPreparedStatementEnvelope
- Throws:
SQLException
-
clearParameters
- Specified by:
clearParameters
in interfacePreparedStatement
- Overrides:
clearParameters
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setObject
- Specified by:
setObject
in interfacePreparedStatement
- Overrides:
setObject
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setObject
- Specified by:
setObject
in interfacePreparedStatement
- Overrides:
setObject
in classPreparedStatementEnvelope
- Throws:
SQLException
-
execute
- Specified by:
execute
in interfacePreparedStatement
- Overrides:
execute
in classPreparedStatementEnvelope
- Throws:
SQLException
-
addBatch
- Specified by:
addBatch
in interfacePreparedStatement
- Overrides:
addBatch
in classPreparedStatementEnvelope
- Throws:
SQLException
-
executeQuery
- Specified by:
executeQuery
in interfaceStatement
- Overrides:
executeQuery
in classPreparedStatementEnvelope
- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdate
in interfaceStatement
- Overrides:
executeUpdate
in classPreparedStatementEnvelope
- Throws:
SQLException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceStatement
- Overrides:
close
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setMaxFieldSize
- Specified by:
setMaxFieldSize
in interfaceStatement
- Overrides:
setMaxFieldSize
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setMaxRows
- Specified by:
setMaxRows
in interfaceStatement
- Overrides:
setMaxRows
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setQueryTimeout
- Specified by:
setQueryTimeout
in interfaceStatement
- Overrides:
setQueryTimeout
in classPreparedStatementEnvelope
- Throws:
SQLException
-
cancel
- Specified by:
cancel
in interfaceStatement
- Overrides:
cancel
in classPreparedStatementEnvelope
- Throws:
SQLException
-
execute
- Specified by:
execute
in interfaceStatement
- Overrides:
execute
in classPreparedStatementEnvelope
- Throws:
SQLException
-
getResultSet
- Specified by:
getResultSet
in interfaceStatement
- Overrides:
getResultSet
in classPreparedStatementEnvelope
- Throws:
SQLException
-
addBatch
- Specified by:
addBatch
in interfaceStatement
- Overrides:
addBatch
in classPreparedStatementEnvelope
- Throws:
SQLException
-
executeBatch
- Specified by:
executeBatch
in interfaceStatement
- Overrides:
executeBatch
in classPreparedStatementEnvelope
- Throws:
SQLException
-
getGeneratedKeys
- Specified by:
getGeneratedKeys
in interfaceStatement
- Overrides:
getGeneratedKeys
in classPreparedStatementEnvelope
- Throws:
SQLException
-
setPoolable
- Specified by:
setPoolable
in interfaceStatement
- Overrides:
setPoolable
in classPreparedStatementEnvelope
- Throws:
SQLException
-
closeOnCompletion
- Specified by:
closeOnCompletion
in interfaceStatement
- Overrides:
closeOnCompletion
in classPreparedStatementEnvelope
- Throws:
SQLException
-