/** * @param sql the SQL * @param statement the delegate statement * @param slowSqlThreshold the time to decide if SQL is deemed as slow * @param sqlLoggingType the type of the sql logging * @since $version * @author hceylan */ public PreparedStatementProxy( String sql, PreparedStatement statement, long slowSqlThreshold, SqlLoggingType sqlLoggingType) { super(); this.sql = sql; this.statement = statement; this.slowSqlThreshold = slowSqlThreshold; switch (sqlLoggingType) { case STDERR: this.sqlStream = System.err; break; case STDOUT: this.sqlStream = System.out; break; default: this.sqlStream = null; } this.debug = PreparedStatementProxy.LOG.isDebugEnabled(); }
/** * Resets the prepared statement and returns itself * * @return self * @since $version * @author hceylan */ public PreparedStatement reset() { this.debug = PreparedStatementProxy.LOG.isDebugEnabled(); return this; }