|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.iapi.jdbc.BrokeredStatement
public class BrokeredStatement
A Statement implementation that forwards all of its requests to an underlying Statement.
| Field Summary | |
|---|---|
(package private) BrokeredStatementControl |
control
My control. |
private java.lang.String |
cursorName
My state |
private java.lang.Boolean |
escapeProcessing
|
(package private) int |
resultSetConcurrency
|
(package private) int |
resultSetHoldability
|
(package private) int |
resultSetType
|
| 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 | |
|---|---|
BrokeredStatement(BrokeredStatementControl control)
|
|
| Method Summary | ||
|---|---|---|
void |
addBatch(java.lang.String sql)
|
|
void |
cancel()
|
|
protected void |
checkIfClosed()
Checks if the statement is closed and throws an exception if it is. |
|
void |
clearBatch()
|
|
void |
clearWarnings()
After this call getWarnings returns null until a new warning is reported for this Statement. |
|
void |
close()
In many cases, it is desirable to immediately release a Statements's database and JDBC resources instead of waiting for this to happen when it is automatically closed; the close method provides this immediate release. |
|
void |
closeOnCompletion()
|
|
(package private) BrokeredStatementControl |
controlCheck()
Get the BrokeredStatementControl in order to perform a check. |
|
java.sql.Statement |
createDuplicateStatement(java.sql.Connection conn,
java.sql.Statement oldStatement)
|
|
boolean |
execute(java.lang.String sql)
|
|
boolean |
execute(java.lang.String sql,
int autoGeneratedKeys)
|
|
boolean |
execute(java.lang.String sql,
int[] columnIndexes)
|
|
boolean |
execute(java.lang.String sql,
java.lang.String[] columnNames)
|
|
int[] |
executeBatch()
|
|
long[] |
executeLargeBatch()
|
|
long |
executeLargeUpdate(java.lang.String sql)
|
|
long |
executeLargeUpdate(java.lang.String sql,
int autoGeneratedKeys)
|
|
long |
executeLargeUpdate(java.lang.String sql,
int[] columnIndexes)
|
|
long |
executeLargeUpdate(java.lang.String sql,
java.lang.String[] columnNames)
|
|
java.sql.ResultSet |
executeQuery(java.lang.String sql)
|
|
int |
executeUpdate(java.lang.String sql)
|
|
int |
executeUpdate(java.lang.String sql,
int autoGeneratedKeys)
|
|
int |
executeUpdate(java.lang.String sql,
int[] columnIndexes)
|
|
int |
executeUpdate(java.lang.String sql,
java.lang.String[] columnNames)
|
|
java.sql.Connection |
getConnection()
|
|
int |
getFetchDirection()
|
|
int |
getFetchSize()
|
|
java.sql.ResultSet |
getGeneratedKeys()
JDBC 3.0 Retrieves any auto-generated keys created as a result of executing this Statement object. |
|
long |
getLargeMaxRows()
|
|
long |
getLargeUpdateCount()
|
|
int |
getMaxFieldSize()
|
|
int |
getMaxRows()
|
|
boolean |
getMoreResults()
getMoreResults moves to a Statement's next result. |
|
boolean |
getMoreResults(int current)
JDBC 3.0 Moves to this Statement obect's next result, deals with any current ResultSet object(s) according to the instructions specified by the given flag, and returns true if the next result is a ResultSet object |
|
int |
getQueryTimeout()
|
|
java.sql.ResultSet |
getResultSet()
getResultSet returns the current result as a ResultSet. |
|
int |
getResultSetConcurrency()
|
|
int |
getResultSetHoldability()
Return the holdability of ResultSets created by this Statement. |
|
int |
getResultSetType()
JDBC 2.0 Determine the result set type. |
|
java.sql.Statement |
getStatement()
|
|
int |
getUpdateCount()
getUpdateCount returns the current result as an update count; if the result is a ResultSet or there are no more results -1 is returned. |
|
java.sql.SQLWarning |
getWarnings()
The first warning reported by calls on this Statement is returned. |
|
boolean |
isClosed()
Checks if the statement is closed. |
|
boolean |
isCloseOnCompletion()
|
|
boolean |
isWrapperFor(java.lang.Class iface)
Returns false unless iface is implemented |
|
void |
setCursorName(java.lang.String name)
setCursorName defines the SQL cursor name that will be used by subsequent Statement execute methods. |
|
void |
setEscapeProcessing(boolean enable)
If escape scanning is on (the default) the driver will do escape substitution before sending the SQL to the database. |
|
void |
setFetchDirection(int direction)
JDBC 2.0 Give a hint as to the direction in which the rows in a result set will be processed. |
|
void |
setFetchSize(int rows)
JDBC 2.0 Give the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. |
|
void |
setLargeMaxRows(long max)
|
|
void |
setMaxFieldSize(int max)
The maxFieldSize limit (in bytes) is set to limit the size of data that can be returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields. |
|
void |
setMaxRows(int max)
The maxRows limit is set to limit the number of rows that any ResultSet can contain. |
|
void |
setQueryTimeout(int seconds)
|
|
(package private) void |
setStatementState(java.sql.Statement oldStatement,
java.sql.Statement newStatement)
|
|
(package private) java.sql.SQLException |
unableToUnwrap(java.lang.Class iface)
Return an exception that reports that an unwrap operation has failed because the object couldn't be cast to the specified interface. |
|
|
unwrap(java.lang.Class<T> iface)
Returns this if this class implements the specified interface. |
|
(package private) java.sql.ResultSet |
wrapResultSet(java.sql.ResultSet rs)
Provide the control access to every ResultSet we return. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.sql.Statement |
|---|
isPoolable, setPoolable |
| Field Detail |
|---|
final BrokeredStatementControl control
final int resultSetType
final int resultSetConcurrency
final int resultSetHoldability
private java.lang.String cursorName
private java.lang.Boolean escapeProcessing
| Constructor Detail |
|---|
BrokeredStatement(BrokeredStatementControl control)
throws java.sql.SQLException
java.sql.SQLException| Method Detail |
|---|
public final void addBatch(java.lang.String sql)
throws java.sql.SQLException
addBatch in interface java.sql.Statementjava.sql.SQLException
public final void clearBatch()
throws java.sql.SQLException
clearBatch in interface java.sql.Statementjava.sql.SQLException
public final int[] executeBatch()
throws java.sql.SQLException
executeBatch in interface java.sql.Statementjava.sql.SQLException
public final void cancel()
throws java.sql.SQLException
cancel in interface java.sql.Statementjava.sql.SQLException
public final boolean execute(java.lang.String sql)
throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLException
public final java.sql.ResultSet executeQuery(java.lang.String sql)
throws java.sql.SQLException
executeQuery in interface java.sql.Statementjava.sql.SQLException
public final int executeUpdate(java.lang.String sql)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLException
public void close()
throws java.sql.SQLException
Note: A Statement is automatically closed when it is garbage collected. When a Statement is closed its current ResultSet, if one exists, is also closed.
close in interface java.sql.Statementjava.sql.SQLException - thrown on failure.
public final java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface java.sql.Statementjava.sql.SQLException
public final int getFetchDirection()
throws java.sql.SQLException
getFetchDirection in interface java.sql.Statementjava.sql.SQLException
public final int getFetchSize()
throws java.sql.SQLException
getFetchSize in interface java.sql.Statementjava.sql.SQLException
public final int getMaxFieldSize()
throws java.sql.SQLException
getMaxFieldSize in interface java.sql.Statementjava.sql.SQLException
public final int getMaxRows()
throws java.sql.SQLException
getMaxRows in interface java.sql.Statementjava.sql.SQLException
public final int getResultSetConcurrency()
throws java.sql.SQLException
getResultSetConcurrency in interface java.sql.Statementjava.sql.SQLException
public final void setMaxFieldSize(int max)
throws java.sql.SQLException
setMaxFieldSize in interface java.sql.Statementmax - the new max column size limit; zero means unlimited
java.sql.SQLException - thrown on failure.
public final void setMaxRows(int max)
throws java.sql.SQLException
setMaxRows in interface java.sql.Statementmax - the new max rows limit; zero means unlimited
java.sql.SQLException - thrown on failure.
public final void setEscapeProcessing(boolean enable)
throws java.sql.SQLException
setEscapeProcessing in interface java.sql.Statementenable - true to enable; false to disable
java.sql.SQLException - thrown on failure.
public final java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
The warning chain is automatically cleared each time a statement is (re)executed.
Note: If you are processing a ResultSet then any warnings associated with ResultSet reads will be chained on the ResultSet object.
getWarnings in interface java.sql.Statementjava.sql.SQLException - thrown on failure.
public final void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface java.sql.Statementjava.sql.SQLException - thrown on failure.
public final void setCursorName(java.lang.String name)
throws java.sql.SQLException
Note: By definition, positioned update/delete execution must be done by a different Statement than the one which generated the ResultSet being used for positioning. Also, cursor names must be unique within a Connection.
setCursorName in interface java.sql.Statementname - the new cursor name.
java.sql.SQLException
public final java.sql.ResultSet getResultSet()
throws java.sql.SQLException
getResultSet in interface java.sql.Statementjava.sql.SQLExceptionexecute(java.lang.String)
public final int getUpdateCount()
throws java.sql.SQLException
The only way to tell for sure that the result is an update count is to first test to see if it is a ResultSet. If it is not a ResultSet it is either an update count or there are no more results.
getUpdateCount in interface java.sql.Statementjava.sql.SQLExceptionexecute(java.lang.String)
public final boolean getMoreResults()
throws java.sql.SQLException
getMoreResults in interface java.sql.Statementjava.sql.SQLException - thrown on failure.execute(java.lang.String)
public final int getResultSetType()
throws java.sql.SQLException
getResultSetType in interface java.sql.Statementjava.sql.SQLException - Feature not implemented for now.
public final void setFetchDirection(int direction)
throws java.sql.SQLException
setFetchDirection in interface java.sql.Statementdirection - the initial direction for processing rows
java.sql.SQLException - if a database-access error occurs or direction
is not one of ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or
ResultSet.FETCH_UNKNOWN
public final void setFetchSize(int rows)
throws java.sql.SQLException
setFetchSize in interface java.sql.Statementrows - the number of rows to fetch
java.sql.SQLException - if a database-access error occurs, or the
condition 0 <= rows <= this.getMaxRows() is not satisfied.
public final int getQueryTimeout()
throws java.sql.SQLException
getQueryTimeout in interface java.sql.Statementjava.sql.SQLException
public final void setQueryTimeout(int seconds)
throws java.sql.SQLException
setQueryTimeout in interface java.sql.Statementjava.sql.SQLException
public final boolean execute(java.lang.String sql,
int autoGeneratedKeys)
throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLException
public final boolean execute(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLException
public final boolean execute(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLException
public final int executeUpdate(java.lang.String sql,
int autoGeneratedKeys)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLException
public final int executeUpdate(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLException
public final int executeUpdate(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLException
public final boolean getMoreResults(int current)
throws java.sql.SQLException
getMoreResults in interface java.sql.StatementgetMoreResults in interface EngineStatementcurrent - - one of the following Statement constants indicating what
should happen to current ResultSet objects obtained using the method
getResultSetCLOSE_CURRENT_RESULT, KEEP_CURRENT_RESULT, or CLOSE_ALL_RESULTS
java.sql.SQLException - thrown on failure.execute(java.lang.String)
public final java.sql.ResultSet getGeneratedKeys()
throws java.sql.SQLException
getGeneratedKeys in interface java.sql.Statementjava.sql.SQLException - if a database access error occurs
public final int getResultSetHoldability()
throws java.sql.SQLException
getResultSetHoldability in interface java.sql.StatementgetResultSetHoldability in interface EngineStatementjava.sql.SQLExceptionStatement.getResultSetHoldability()
public java.sql.Statement createDuplicateStatement(java.sql.Connection conn,
java.sql.Statement oldStatement)
throws java.sql.SQLException
java.sql.SQLException
void setStatementState(java.sql.Statement oldStatement,
java.sql.Statement newStatement)
throws java.sql.SQLException
java.sql.SQLException
public java.sql.Statement getStatement()
throws java.sql.SQLException
java.sql.SQLExceptionfinal java.sql.ResultSet wrapResultSet(java.sql.ResultSet rs)
rs - ResultSet being returned, can be null.
final BrokeredStatementControl controlCheck()
throws java.sql.SQLException
java.sql.SQLException
public boolean isWrapperFor(java.lang.Class iface)
throws java.sql.SQLException
iface is implemented
isWrapperFor in interface java.sql.Wrapperiface - a Class defining an interface.
java.sql.SQLException - if an error occurs while determining
whether this is a wrapper for an object
with the given interface.
public <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
this if this class implements the specified interface.
unwrap in interface java.sql.Wrapperiface - a class defining an interface
java.sql.SQLException - if no object is found that implements the
interface
public final boolean isClosed()
throws java.sql.SQLException
isClosed in interface java.sql.StatementisClosed in interface EngineStatementtrue if the statement is closed,
false otherwise
java.sql.SQLException - if an error occurs
protected final void checkIfClosed()
throws java.sql.SQLException
java.sql.SQLException - if the statement is closedfinal java.sql.SQLException unableToUnwrap(java.lang.Class iface)
iface - the class or interface passed in to the failed unwrap call
public void closeOnCompletion()
throws java.sql.SQLException
closeOnCompletion in interface EngineStatementjava.sql.SQLException
public boolean isCloseOnCompletion()
throws java.sql.SQLException
isCloseOnCompletion in interface EngineStatementjava.sql.SQLException
public long[] executeLargeBatch()
throws java.sql.SQLException
executeLargeBatch in interface EngineStatementjava.sql.SQLException
public long executeLargeUpdate(java.lang.String sql)
throws java.sql.SQLException
executeLargeUpdate in interface EngineStatementjava.sql.SQLException
public long executeLargeUpdate(java.lang.String sql,
int autoGeneratedKeys)
throws java.sql.SQLException
executeLargeUpdate in interface EngineStatementjava.sql.SQLException
public long executeLargeUpdate(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
executeLargeUpdate in interface EngineStatementjava.sql.SQLException
public long executeLargeUpdate(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
executeLargeUpdate in interface EngineStatementjava.sql.SQLException
public long getLargeMaxRows()
throws java.sql.SQLException
getLargeMaxRows in interface EngineStatementjava.sql.SQLException
public long getLargeUpdateCount()
throws java.sql.SQLException
getLargeUpdateCount in interface EngineStatementjava.sql.SQLException
public void setLargeMaxRows(long max)
throws java.sql.SQLException
setLargeMaxRows in interface EngineStatementjava.sql.SQLException
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||