Package org.cyclos.impl.sql
Class ProfilingStatement
- java.lang.Object
-
- org.cyclos.impl.sql.DelegatingStatement
-
- org.cyclos.impl.sql.ProfilingStatement
-
- All Implemented Interfaces:
AutoCloseable,Statement,Wrapper
- Direct Known Subclasses:
ProfilingPreparedStatement
public class ProfilingStatement extends DelegatingStatement
AStatementwrapper which profiles the queries executed
-
-
Field Summary
Fields Modifier and Type Field Description protected List<ProfilingQueryEvent>batchprotected ProfilingEntryprofilingEntryprotected StartProfilingParamsprofilingParams-
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
Constructors Constructor Description ProfilingStatement(StartProfilingParams profilingParams, ProfilingEntry profilingEntry, Statement delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBatch(String sql)booleanexecute(String sql)booleanexecute(String sql, int autoGeneratedKeys)booleanexecute(String sql, int[] columnIndexes)booleanexecute(String sql, String[] columnNames)int[]executeBatch()long[]executeLargeBatch()longexecuteLargeUpdate(String sql)longexecuteLargeUpdate(String sql, int autoGeneratedKeys)longexecuteLargeUpdate(String sql, int[] columnIndexes)longexecuteLargeUpdate(String sql, String[] columnNames)ResultSetexecuteQuery(String sql)intexecuteUpdate(String sql)intexecuteUpdate(String sql, int autoGeneratedKeys)intexecuteUpdate(String sql, int[] columnIndexes)intexecuteUpdate(String sql, String[] columnNames)-
Methods inherited from class org.cyclos.impl.sql.DelegatingStatement
cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, getConnection, getDelegate, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, isWrapperFor, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrap
-
-
-
-
Field Detail
-
profilingParams
protected final StartProfilingParams profilingParams
-
profilingEntry
protected final ProfilingEntry profilingEntry
-
batch
protected List<ProfilingQueryEvent> batch
-
-
Constructor Detail
-
ProfilingStatement
public ProfilingStatement(StartProfilingParams profilingParams, ProfilingEntry profilingEntry, Statement delegate)
-
-
Method Detail
-
addBatch
public void addBatch(String sql) throws SQLException
- Specified by:
addBatchin interfaceStatement- Overrides:
addBatchin classDelegatingStatement- Throws:
SQLException
-
execute
public boolean execute(String sql) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classDelegatingStatement- Throws:
SQLException
-
execute
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classDelegatingStatement- Throws:
SQLException
-
execute
public boolean execute(String sql, int[] columnIndexes) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classDelegatingStatement- Throws:
SQLException
-
execute
public boolean execute(String sql, String[] columnNames) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classDelegatingStatement- Throws:
SQLException
-
executeBatch
public int[] executeBatch() throws SQLException- Specified by:
executeBatchin interfaceStatement- Overrides:
executeBatchin classDelegatingStatement- Throws:
SQLException
-
executeLargeBatch
public long[] executeLargeBatch() throws SQLException- Specified by:
executeLargeBatchin interfaceStatement- Overrides:
executeLargeBatchin classDelegatingStatement- Throws:
SQLException
-
executeLargeUpdate
public long executeLargeUpdate(String sql) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Overrides:
executeLargeUpdatein classDelegatingStatement- Throws:
SQLException
-
executeLargeUpdate
public long executeLargeUpdate(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Overrides:
executeLargeUpdatein classDelegatingStatement- Throws:
SQLException
-
executeLargeUpdate
public long executeLargeUpdate(String sql, int[] columnIndexes) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Overrides:
executeLargeUpdatein classDelegatingStatement- Throws:
SQLException
-
executeLargeUpdate
public long executeLargeUpdate(String sql, String[] columnNames) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Overrides:
executeLargeUpdatein classDelegatingStatement- Throws:
SQLException
-
executeQuery
public ResultSet executeQuery(String sql) throws SQLException
- Specified by:
executeQueryin interfaceStatement- Overrides:
executeQueryin classDelegatingStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String sql) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDelegatingStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDelegatingStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String sql, int[] columnIndexes) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDelegatingStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String sql, String[] columnNames) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDelegatingStatement- Throws:
SQLException
-
-