|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.jca.adapters.jdbc.JBossWrapper
org.jboss.jca.adapters.jdbc.WrappedStatement
public abstract class WrappedStatement

A wrapper for a statement.
| Field Summary | |
|---|---|
protected static Integer |
defaultFetchSize
Default fetch size |
protected String |
jndiName
The jndi name |
protected boolean |
spy
Spy functionality |
protected static org.jboss.logging.Logger |
spyLogger
The spy logger |
| Fields inherited from interface java.sql.Statement |
|---|
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO |
| Constructor Summary | |
|---|---|
WrappedStatement(WrappedConnection lc,
Statement s,
boolean spy,
String jndiName)
Constructor |
|
| Method Summary | |
|---|---|
void |
addBatch(String sql)
|
void |
cancel()
|
protected void |
checkConfiguredQueryTimeout()
Check configured query timeout |
protected SQLException |
checkException(Throwable t)
Check exception |
protected void |
checkTransaction()
Check transaction |
protected void |
checkTransactionActive()
Check if transaction is active |
void |
clearBatch()
|
void |
clearWarnings()
|
void |
close()
|
protected void |
closeResultSets()
Close result sets |
boolean |
execute(String sql)
|
boolean |
execute(String sql,
int autoGeneratedKeys)
|
boolean |
execute(String sql,
int[] columnIndexes)
|
boolean |
execute(String sql,
String[] columnNames)
|
int[] |
executeBatch()
|
ResultSet |
executeQuery(String sql)
|
int |
executeUpdate(String sql)
|
int |
executeUpdate(String sql,
int autoGeneratedKeys)
|
int |
executeUpdate(String sql,
int[] columnIndexes)
|
int |
executeUpdate(String sql,
String[] columnNames)
|
Connection |
getConnection()
|
int |
getFetchDirection()
|
int |
getFetchSize()
|
ResultSet |
getGeneratedKeys()
|
int |
getMaxFieldSize()
|
int |
getMaxRows()
|
boolean |
getMoreResults()
|
boolean |
getMoreResults(int current)
|
int |
getQueryTimeout()
|
ResultSet |
getResultSet()
|
int |
getResultSetConcurrency()
|
int |
getResultSetHoldability()
|
int |
getResultSetType()
|
Statement |
getUnderlyingStatement()
Get the underlying statement |
int |
getUpdateCount()
|
SQLWarning |
getWarnings()
|
protected Statement |
getWrappedObject()
Get the wrapped statement |
protected void |
internalClose()
Close |
boolean |
isClosed()
|
boolean |
isPoolable()
|
protected void |
lock()
Lock connection |
protected ResultSet |
registerResultSet(ResultSet resultSet)
Register a result set |
void |
setCursorName(String name)
|
void |
setEscapeProcessing(boolean enable)
|
void |
setFetchDirection(int direction)
|
void |
setFetchSize(int rows)
|
void |
setMaxFieldSize(int max)
|
void |
setMaxRows(int max)
|
void |
setPoolable(boolean poolable)
|
void |
setQueryTimeout(int timeout)
|
protected void |
unlock()
Unlock connection |
protected void |
unregisterResultSet(WrappedResultSet resultSet)
Unregister a result set |
protected abstract WrappedResultSet |
wrapResultSet(ResultSet resultSet,
boolean spy,
String jndiName)
Wrap the result set |
| Methods inherited from class org.jboss.jca.adapters.jdbc.JBossWrapper |
|---|
isWrapperFor, unwrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.sql.Wrapper |
|---|
isWrapperFor, unwrap |
| Field Detail |
|---|
protected static org.jboss.logging.Logger spyLogger
protected final boolean spy
protected final String jndiName
protected static Integer defaultFetchSize
| Constructor Detail |
|---|
public WrappedStatement(WrappedConnection lc,
Statement s,
boolean spy,
String jndiName)
lc - The connections - The statementspy - The spy valuejndiName - The jndi name| Method Detail |
|---|
protected void lock()
throws SQLException
SQLException - Thrown if an error occursprotected void unlock()
public void close()
throws SQLException
close in interface StatementSQLException
public boolean execute(String sql)
throws SQLException
execute in interface StatementSQLException
public boolean execute(String sql,
int autoGeneratedKeys)
throws SQLException
execute in interface StatementSQLException
public boolean execute(String sql,
int[] columnIndexes)
throws SQLException
execute in interface StatementSQLException
public boolean execute(String sql,
String[] columnNames)
throws SQLException
execute in interface StatementSQLException
public Connection getConnection()
throws SQLException
getConnection in interface StatementSQLException
public SQLWarning getWarnings()
throws SQLException
getWarnings in interface StatementSQLException
public void clearWarnings()
throws SQLException
clearWarnings in interface StatementSQLException
public ResultSet executeQuery(String sql)
throws SQLException
executeQuery in interface StatementSQLException
public int executeUpdate(String sql)
throws SQLException
executeUpdate in interface StatementSQLException
public int executeUpdate(String sql,
int autoGeneratedKeys)
throws SQLException
executeUpdate in interface StatementSQLException
public int executeUpdate(String sql,
int[] columnIndexes)
throws SQLException
executeUpdate in interface StatementSQLException
public int executeUpdate(String sql,
String[] columnNames)
throws SQLException
executeUpdate in interface StatementSQLException
public int getMaxFieldSize()
throws SQLException
getMaxFieldSize in interface StatementSQLException
public void setMaxFieldSize(int max)
throws SQLException
setMaxFieldSize in interface StatementSQLException
public int getMaxRows()
throws SQLException
getMaxRows in interface StatementSQLException
public void setMaxRows(int max)
throws SQLException
setMaxRows in interface StatementSQLException
public void setEscapeProcessing(boolean enable)
throws SQLException
setEscapeProcessing in interface StatementSQLException
public int getQueryTimeout()
throws SQLException
getQueryTimeout in interface StatementSQLException
public void setQueryTimeout(int timeout)
throws SQLException
setQueryTimeout in interface StatementSQLException
public void cancel()
throws SQLException
cancel in interface StatementSQLException
public void setCursorName(String name)
throws SQLException
setCursorName in interface StatementSQLException
public ResultSet getResultSet()
throws SQLException
getResultSet in interface StatementSQLException
public int getUpdateCount()
throws SQLException
getUpdateCount in interface StatementSQLException
public boolean getMoreResults()
throws SQLException
getMoreResults in interface StatementSQLException
public boolean getMoreResults(int current)
throws SQLException
getMoreResults in interface StatementSQLException
public void setFetchDirection(int direction)
throws SQLException
setFetchDirection in interface StatementSQLException
public int getFetchDirection()
throws SQLException
getFetchDirection in interface StatementSQLException
public void setFetchSize(int rows)
throws SQLException
setFetchSize in interface StatementSQLException
public int getFetchSize()
throws SQLException
getFetchSize in interface StatementSQLException
public int getResultSetConcurrency()
throws SQLException
getResultSetConcurrency in interface StatementSQLException
public int getResultSetType()
throws SQLException
getResultSetType in interface StatementSQLException
public void addBatch(String sql)
throws SQLException
addBatch in interface StatementSQLException
public void clearBatch()
throws SQLException
clearBatch in interface StatementSQLException
public int[] executeBatch()
throws SQLException
executeBatch in interface StatementSQLException
public ResultSet getGeneratedKeys()
throws SQLException
getGeneratedKeys in interface StatementSQLException
public int getResultSetHoldability()
throws SQLException
getResultSetHoldability in interface StatementSQLException
public boolean isClosed()
throws SQLException
isClosed in interface StatementSQLException
public boolean isPoolable()
throws SQLException
isPoolable in interface StatementSQLException
public void setPoolable(boolean poolable)
throws SQLException
setPoolable in interface StatementSQLException
public Statement getUnderlyingStatement()
throws SQLException
getUnderlyingStatement in interface StatementAccessSQLException - when already closed
protected Statement getWrappedObject()
throws SQLException
getWrappedObject in class JBossWrapperSQLException - Thrown if an error occurs
protected SQLException checkException(Throwable t)
throws SQLException
t - The throwable
SQLException - Thrown if an error occurs
protected void checkTransaction()
throws SQLException
SQLException - Thrown if an error occurs
protected void checkConfiguredQueryTimeout()
throws SQLException
SQLException - Thrown if an error occurs
protected void checkTransactionActive()
throws SQLException
SQLException - Thrown if an error occurs
protected void internalClose()
throws SQLException
SQLException - Thrown if an error occurs
protected abstract WrappedResultSet wrapResultSet(ResultSet resultSet,
boolean spy,
String jndiName)
resultSet - The result setspy - The spy valuejndiName - The jndi name
protected ResultSet registerResultSet(ResultSet resultSet)
resultSet - The result set
protected void unregisterResultSet(WrappedResultSet resultSet)
resultSet - The result setprotected void closeResultSets()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||