public String toString() { StringBuffer buf = new StringBuffer("prepstmnt ").append(hashCode()); appendInfo(buf); return buf.toString(); }
/** * Execute the query, with the option of not wrapping it in a * {@link DelegatingResultSet}, which is the default. */ protected ResultSet executeQuery(boolean wrap) throws SQLException { ResultSet rs; if (_del != null) rs = _del.executeQuery(false); else rs = _stmnt.executeQuery(); return wrapResult(wrap, rs); }
/** * Return the base underlying data store statement. */ public CallableStatement getInnermostDelegate() { return (_del == null) ? _stmnt : _del.getInnermostDelegate(); }
/** * Get the last result set, with the option of not wrapping it in a * {@link DelegatingResultSet}, which is the default. */ protected ResultSet getResultSet(boolean wrap) throws SQLException { ResultSet rs; if (_del != null) rs = _del.getResultSet(false); else rs = _stmnt.getResultSet(); return wrapResult(wrap, rs); }
public ResultSet executeQuery() throws SQLException { return executeQuery(true); }
protected CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean wrap) throws SQLException { CallableStatement stmnt; if (_del != null) stmnt = _del.prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability, false); else { stmnt = _conn.prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability); } if (wrap) stmnt = new DelegatingCallableStatement(stmnt, this); return stmnt; }
protected void appendInfo(StringBuffer buf) { if (_del != null) _del.appendInfo(buf); }
public ResultSet getResultSet() throws SQLException { return getResultSet(true); }
protected ResultSet wrapResult(ResultSet rs, boolean wrap) { if (!wrap || rs == null) return super.wrapResult(wrap, rs); return newLoggingResultSet(rs, this); }
public void cancel() throws SQLException { if (_logs.isJDBCEnabled()) _logs.logJDBC("cancel " + this + ": " + _sql, LoggingConnection.this); super.cancel(); }
public void clearParameters() throws SQLException { clearLogParameters(false); super.clearParameters(); }
public void addBatch() throws SQLException { if (_logs.isSQLEnabled()) _logs.logSQL("batching " + this, LoggingConnection.this); long start = System.currentTimeMillis(); try { super.addBatch(); if (shouldTrackParameters()) { // make sure our list is initialized if (_paramBatch == null) _paramBatch = new ArrayList<List<String>>(); // copy parameters since they will be re-used if (_params != null) { List<String> copyParams = new ArrayList<String>(_params); _paramBatch.add(copyParams); } else _paramBatch.add(null); } } finally { logTime(start); } }
/** * Get the last result set, with the option of not wrapping it in a * {@link DelegatingResultSet}, which is the default. */ protected ResultSet getResultSet(boolean wrap) throws SQLException { ResultSet rs; if (_del != null) rs = _del.getResultSet(false); else rs = _stmnt.getResultSet(); return wrapResult(wrap, rs); }
public ResultSet executeQuery(String str) throws SQLException { return executeQuery(true); }
protected CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean wrap) throws SQLException { CallableStatement stmnt; if (_del != null) stmnt = _del.prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability, false); else { stmnt = _conn.prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability); } if (wrap) stmnt = new DelegatingCallableStatement(stmnt, this); return stmnt; }
protected void appendInfo(StringBuffer buf) { if (_del != null) _del.appendInfo(buf); }
public ResultSet getResultSet() throws SQLException { return getResultSet(true); }
protected ResultSet wrapResult(ResultSet rs, boolean wrap) { if (!wrap || rs == null) return super.wrapResult(wrap, rs); return newLoggingResultSet(rs, this); }
public void cancel() throws SQLException { if (_logs.isJDBCEnabled()) _logs.logJDBC("cancel " + this + ": " + _sql, LoggingConnection.this); super.cancel(); }
public void clearParameters() throws SQLException { clearLogParameters(false); super.clearParameters(); }