@Override public Object getObject(int i, Map<String,Class<?>> map) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); return ((CallableStatement)st).getObject(i, map); }
if (!cacheC) ccs = new CachedCallableStatement(sql, con.prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability)); ccs.setCacheable(false); ccs.setStatementListener(this); ccs.setOpen(); x.setChecking(true); if (x.getResultSetType() == resultSetType && x.getResultSetConcurrency() == resultSetConcurrency && x.getResultSetHoldability() == resultSetHoldability) break; x.setChecking(false); ccs.setOpen(); csHit++; log_debug(pool.getName() + ": CallableStatement cache hit [" + sql + "," + ccs.getParametersString() + "] - " + showHitRate(csHit, csReq, "CS-")); ccs = new CachedCallableStatement(sql, st); ccs.setCacheable(true); ccs.setStatementListener(this); ccs.setOpen(); log_debug(pool.getName() + ": CallableStatement cache miss [" + sql + "," + ccs.getParametersString() + "] - " + showHitRate(csHit, csReq, "CS-"));
String key = ccs.getSQLString(); synchronized(csUsed) if (!cacheC || !ccs.isCacheable()) ccs.release(); else // else try to recycle it. ccs.recycle(); ccs.release();
(csUsed.remove(0)).close();
@Override public String getString(String parameterName) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); return ((CallableStatement)st).getString(parameterName); }
@Override public void registerOutParameter(int parameterIndex, SQLType sqlType, String typeName) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); ((CallableStatement)st).registerOutParameter(parameterIndex, sqlType, typeName); }
@Override public String getString(int parameterIndex) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); return ((CallableStatement)st).getString(parameterIndex); }
@Override public void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); ((CallableStatement)st).registerOutParameter(parameterName, sqlType, typeName); }
@Override public void registerOutParameter(String parameterName, SQLType sqlType) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); ((CallableStatement)st).registerOutParameter(parameterName, sqlType); }
@Override public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); ((CallableStatement)st).registerOutParameter(parameterIndex, sqlType, scale); }
@Override public <T> T getObject(String parameterName, Class<T> type) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); return ((CallableStatement)st).getObject(parameterName, type); } // --- End JDBC 4.1 ---
@Override public void registerOutParameter(String parameterName, SQLType sqlType, String typeName) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); ((CallableStatement)st).registerOutParameter(parameterName, sqlType, typeName); }
@Override public void registerOutParameter(int parameterIndex, SQLType sqlType, int scale) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); ((CallableStatement)st).registerOutParameter(parameterIndex, sqlType, scale); }
@Override public void registerOutParameter(int parameterIndex, SQLType sqlType) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); ((CallableStatement)st).registerOutParameter(parameterIndex, sqlType); }
@Override public Object getObject(int parameterIndex) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); return ((CallableStatement)st).getObject(parameterIndex); }
@Override public <T> T getObject(int parameterIndex, Class<T> type) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); return ((CallableStatement)st).getObject(parameterIndex, type); }
@Override public void registerOutParameter(String parameterName, SQLType sqlType, int scale) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); ((CallableStatement)st).registerOutParameter(parameterName, sqlType, scale); }
@Override public Time getTime(int parameterIndex) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); return ((CallableStatement)st).getTime(parameterIndex); }
@Override public void setByte(String parameterName, byte x) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); ((CallableStatement)st).setByte(parameterName, x); }
@Override public void setShort(String parameterName, short x) throws SQLException { if (isClosed()) throw new SQLException(MSG_STATEMENT_CLOSED); ((CallableStatement)st).setShort(parameterName, x); }