public boolean execute() throws SQLException { beforeExecuteStatement(this); try { return super.execute(); } finally { afterExecuteStatement(this); } }
public int[] executeBatch() throws SQLException { beforeExecuteStatement(this); try { return super.executeBatch(); } finally { afterExecuteStatement(this); } }
/** * 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(rs, wrap); }
public String toString() { StringBuffer buf = new StringBuffer("prepstmnt ").append(hashCode()); appendInfo(buf); return buf.toString(); }
public int executeUpdate(String s, String[] sa) throws SQLException { beforeExecuteStatement(this); try { return super.executeUpdate(s, sa); } finally { afterExecuteStatement(this); } }
/** * Return the base underlying data store statement. */ public PreparedStatement getInnermostDelegate() { return (_del == null) ? _stmnt : _del.getInnermostDelegate(); }
protected ResultSet executeQuery(boolean wrap) throws SQLException { beforeExecuteStatement(this); try { return super.executeQuery(wrap); } finally { afterExecuteStatement(this); } }
protected PreparedStatement prepareStatement(String sql, int[] columnIndexes, boolean wrap) throws SQLException { PreparedStatement stmnt; if (_del != null) stmnt = _del.prepareStatement(sql, columnIndexes, wrap); else { stmnt = _conn.prepareStatement(sql, columnIndexes); } if (wrap) stmnt = new DelegatingPreparedStatement(stmnt, this); return stmnt; }
protected void appendInfo(StringBuffer buf) { if (_del != null) _del.appendInfo(buf); }
public void setFetchSize(int i) throws SQLException { // some postgres drivers do not support the setFetchSize method try { if (_dict.supportsSetFetchSize) super.setFetchSize(i); } catch (SQLException e) { _dict.supportsSetFetchSize = false; if (_dict.log.isWarnEnabled()) _dict.log.warn(_loc.get("psql-no-set-fetch-size"), e); } } }
public void cancel() throws SQLException { if (_logs.isJDBCEnabled()) _logs.logJDBC("cancel " + this + ": " + _sql, LoggingConnection.this); super.cancel(); }
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(); // copy parameters since they will be re-used if (_params != null) _paramBatch.add(new ArrayList(_params)); else _paramBatch.add(null); } } finally { logTime(start); } }
public int executeUpdate() throws SQLException { beforeExecuteStatement(this); try { return super.executeUpdate(); } finally { afterExecuteStatement(this); } }
/** * Return the base underlying data store statement. */ public PreparedStatement getInnermostDelegate() { return (_del == null) ? _stmnt : _del.getInnermostDelegate(); }
protected ResultSet executeQuery(boolean wrap) throws SQLException { beforeExecuteStatement(this); try { return super.executeQuery(wrap); } finally { afterExecuteStatement(this); } }
public String toString() { StringBuffer buf = new StringBuffer("prepstmnt ").append(hashCode()); appendInfo(buf); return buf.toString(); }
protected PreparedStatement prepareStatement(String sql, String[] columnNames, boolean wrap) throws SQLException { PreparedStatement stmnt; if (_del != null) stmnt = _del.prepareStatement(sql, columnNames, wrap); else { stmnt = _conn.prepareStatement(sql, columnNames); } if (wrap) stmnt = new DelegatingPreparedStatement(stmnt, this); return stmnt; }
protected void appendInfo(StringBuffer buf) { if (_del != null) _del.appendInfo(buf); }
public void setFetchSize(int i) throws SQLException { // some postgres drivers do not support the setFetchSize method try { if (_dict.supportsSetFetchSize) super.setFetchSize(i); } catch (SQLException e) { _dict.supportsSetFetchSize = false; if (_dict.log.isWarnEnabled()) _dict.log.warn(_loc.get("psql-no-set-fetch-size"), e); } } }
public void cancel() throws SQLException { if (_logs.isJDBCEnabled()) _logs.logJDBC("cancel " + this + ": " + _sql, LoggingConnection.this); super.cancel(); }