Methods Summary |
---|
public void | addBatch(java.lang.String sql)
checkState();
try
{
s.addBatch(sql);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public void | cancel()
checkState();
try
{
s.cancel();
}
catch (Throwable t)
{
throw checkException(t);
}
|
protected void | checkConfiguredQueryTimeout()
lc.checkConfiguredQueryTimeout(this);
|
protected java.sql.SQLException | checkException(java.lang.Throwable t)
throw lc.checkException(t);
|
void | checkState()
synchronized (lock)
{
if (closed)
throw new SQLException("The statement is closed.");
}
|
protected void | checkTransaction()
checkState();
lc.checkTransaction();
|
public void | clearBatch()
checkState();
try
{
s.clearBatch();
}
catch (Throwable t)
{
throw checkException(t);
}
|
public void | clearWarnings()
checkState();
try
{
s.clearWarnings();
}
catch (Throwable t)
{
throw checkException(t);
}
|
public void | close()
synchronized (lock)
{
if (closed)
return;
closed = true;
}
lc.unregisterStatement(this);
internalClose();
|
protected void | closeResultSets()
if (lc.getTrackStatements() == BaseWrapperManagedConnectionFactory.TRACK_STATEMENTS_FALSE_INT)
return;
synchronized (this)
{
if (resultSets == null)
return;
for (Iterator i = resultSets.entrySet().iterator(); i.hasNext();)
{
Map.Entry entry = (Map.Entry) i.next();
WrappedResultSet resultSet = (WrappedResultSet) entry.getKey();
if (lc.getTrackStatements() == BaseWrapperManagedConnectionFactory.TRACK_STATEMENTS_TRUE_INT)
{
Throwable stackTrace = (Throwable) entry.getValue();
lc.getLogger().warn("Closing a result set you left open! Please close it yourself.", stackTrace);
}
try
{
resultSet.internalClose();
}
catch (Throwable t)
{
lc.getLogger().warn("Error closing a result set you left open! Please close it yourself.", t);
}
}
resultSets.clear();
}
|
public boolean | execute(java.lang.String sql)
checkTransaction();
try
{
checkConfiguredQueryTimeout();
return s.execute(sql);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public boolean | execute(java.lang.String sql, int autoGeneratedKeys)
checkTransaction();
try
{
checkConfiguredQueryTimeout();
return s.execute(sql, autoGeneratedKeys);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public boolean | execute(java.lang.String sql, int[] columnIndexes)
checkTransaction();
try
{
checkConfiguredQueryTimeout();
return s.execute(sql, columnIndexes);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public boolean | execute(java.lang.String sql, java.lang.String[] columnNames)
checkTransaction();
try
{
checkConfiguredQueryTimeout();
return s.execute(sql, columnNames);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public int[] | executeBatch()
checkState();
try
{
checkConfiguredQueryTimeout();
return s.executeBatch();
}
catch (Throwable t)
{
throw checkException(t);
}
|
public java.sql.ResultSet | executeQuery(java.lang.String sql)
checkTransaction();
try
{
checkConfiguredQueryTimeout();
ResultSet result = s.executeQuery(sql);
return registerResultSet(result);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public int | executeUpdate(java.lang.String sql)
checkTransaction();
try
{
checkConfiguredQueryTimeout();
return s.executeUpdate(sql);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public int | executeUpdate(java.lang.String sql, int autoGeneratedKeys)
checkTransaction();
try
{
checkConfiguredQueryTimeout();
return s.executeUpdate(sql, autoGeneratedKeys);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public int | executeUpdate(java.lang.String sql, int[] columnIndexes)
checkTransaction();
try
{
checkConfiguredQueryTimeout();
return s.executeUpdate(sql, columnIndexes);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public int | executeUpdate(java.lang.String sql, java.lang.String[] columnNames)
checkTransaction();
try
{
checkConfiguredQueryTimeout();
return s.executeUpdate(sql, columnNames);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public java.sql.Connection | getConnection()
return lc;
|
public int | getFetchDirection()
checkState();
try
{
return s.getFetchDirection();
}
catch (Throwable t)
{
throw checkException(t);
}
|
public int | getFetchSize()
checkState();
try
{
return s.getFetchSize();
}
catch (Throwable t)
{
throw checkException(t);
}
|
public java.sql.ResultSet | getGeneratedKeys()
checkState();
try
{
ResultSet resultSet = s.getGeneratedKeys();
return registerResultSet(resultSet);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public int | getMaxFieldSize()
checkState();
try
{
return s.getMaxFieldSize();
}
catch (Throwable t)
{
throw checkException(t);
}
|
public int | getMaxRows()
checkState();
try
{
return s.getMaxRows();
}
catch (Throwable t)
{
throw checkException(t);
}
|
public boolean | getMoreResults()
checkState();
try
{
return s.getMoreResults();
}
catch (Throwable t)
{
throw checkException(t);
}
|
public boolean | getMoreResults(int current)
checkState();
try
{
return s.getMoreResults(current);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public int | getQueryTimeout()
checkState();
try
{
return s.getQueryTimeout();
}
catch (Throwable t)
{
throw checkException(t);
}
|
public java.sql.ResultSet | getResultSet()
checkState();
try
{
ResultSet result = s.getResultSet();
if (result == null)
return null;
else
return registerResultSet(result);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public int | getResultSetConcurrency()
checkState();
try
{
return s.getResultSetConcurrency();
}
catch (Throwable t)
{
throw checkException(t);
}
|
public int | getResultSetHoldability()
checkState();
try
{
return s.getResultSetHoldability();
}
catch (Throwable t)
{
throw checkException(t);
}
|
public int | getResultSetType()
checkState();
try
{
return s.getResultSetType();
}
catch (Throwable t)
{
throw checkException(t);
}
|
public java.sql.Statement | getUnderlyingStatement()
checkState();
return s;
|
public int | getUpdateCount()
checkState();
try
{
return s.getUpdateCount();
}
catch (Throwable t)
{
throw checkException(t);
}
|
public java.sql.SQLWarning | getWarnings()
checkState();
try
{
return s.getWarnings();
}
catch (Throwable t)
{
throw checkException(t);
}
|
protected void | internalClose()
synchronized (lock)
{
closed = true;
}
try
{
closeResultSets();
}
finally
{
s.close();
}
|
protected java.sql.ResultSet | registerResultSet(java.sql.ResultSet resultSet)
if (resultSet != null)
resultSet = new WrappedResultSet(this, resultSet);
if (lc.getTrackStatements() == BaseWrapperManagedConnectionFactory.TRACK_STATEMENTS_FALSE_INT)
return resultSet;
synchronized (this)
{
if (resultSets == null)
resultSets = new HashMap();
if (lc.getTrackStatements() == BaseWrapperManagedConnectionFactory.TRACK_STATEMENTS_TRUE_INT)
resultSets.put(resultSet, new Throwable("STACKTRACE"));
else
resultSets.put(resultSet, null);
}
return resultSet;
|
public void | setCursorName(java.lang.String name)
checkState();
try
{
s.setCursorName(name);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public void | setEscapeProcessing(boolean enable)
checkState();
try
{
s.setEscapeProcessing(enable);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public void | setFetchDirection(int direction)
checkState();
try
{
s.setFetchDirection(direction);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public void | setFetchSize(int rows)
checkState();
try
{
s.setFetchSize(rows);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public void | setMaxFieldSize(int max)
checkState();
try
{
s.setMaxFieldSize(max);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public void | setMaxRows(int max)
checkState();
try
{
s.setMaxRows(max);
}
catch (Throwable t)
{
throw checkException(t);
}
|
public void | setQueryTimeout(int timeout)
checkState();
try
{
s.setQueryTimeout(timeout);
}
catch (Throwable t)
{
throw checkException(t);
}
|
protected void | unregisterResultSet(WrappedResultSet resultSet)
if (lc.getTrackStatements() == BaseWrapperManagedConnectionFactory.TRACK_STATEMENTS_FALSE_INT)
return;
synchronized (this)
{
if (resultSets != null)
resultSets.remove(resultSet);
}
|