public class MultiStatement extends Object implements Statement
| Modifier and Type | Field and Description |
|---|---|
(package private) MultiConnection |
parent
The connection that created this statement.
|
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO| Constructor and Description |
|---|
MultiStatement(MultiConnection parent,
Statement s) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBatch(String sql) |
void |
cancel() |
protected Statement |
checkAfterException()
Tries to fix the parent connection, if it proves to be broken.
|
void |
clearBatch() |
void |
clearWarnings() |
void |
close() |
void |
closeOnCompletion() |
boolean |
execute(String sql) |
boolean |
execute(String sql,
int autoGeneratedKeys)
Executes the given SQL statement, which may return multiple results, and signals the driver that
any auto-generated keys should be made available for retrieval.
|
boolean |
execute(String sql,
int[] columnIndexes)
Executes the given SQL statement, which may return multiple results, and signals the driver that
the auto-generated keys indicated in the given array should be made available for retrieval.
|
boolean |
execute(String sql,
String[] columnNames)
Executes the given SQL statement, which may return multiple results, and signals the driver that
the auto-generated keys indicated in the given array should be made available for retrieval.
|
int[] |
executeBatch() |
ResultSet |
executeQuery(String sql) |
int |
executeUpdate(String sql) |
int |
executeUpdate(String sql,
int autoGeneratedKeys)
Executes the given SQL statement and signals the driver with the given flag about whether the
auto-generated keys produced by this Statement object should be made available for retrieval.
|
int |
executeUpdate(String sql,
int[] columnIndexes)
Executes the given SQL statement and signals the driver that the auto-generated keys indicated in
the given array should be made available for retrieval.
|
int |
executeUpdate(String sql,
String[] columnNames)
Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array
should be made available for retrieval.
|
Connection |
getConnection() |
int |
getFetchDirection() |
int |
getFetchSize() |
ResultSet |
getGeneratedKeys()
Retrieves any auto-generated keys created as a result of executing this Statement object.
|
int |
getMaxFieldSize() |
int |
getMaxRows() |
boolean |
getMoreResults() |
boolean |
getMoreResults(int current)
Moves to this Statement object'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() |
ResultSet |
getResultSet() |
int |
getResultSetConcurrency() |
int |
getResultSetHoldability()
Retrieves the result set holdability for ResultSet objects generated by this Statement object.
|
int |
getResultSetType() |
int |
getUpdateCount() |
SQLWarning |
getWarnings() |
boolean |
isClosed() |
boolean |
isCloseOnCompletion() |
boolean |
isPoolable() |
boolean |
isWrapperFor(Class<?> iface) |
void |
setCursorName(String name) |
void |
setEscapeProcessing(boolean enable) |
void |
setFetchDirection(int dir) |
void |
setFetchSize(int i) |
void |
setMaxFieldSize(int max) |
void |
setMaxRows(int max) |
void |
setPoolable(boolean p) |
void |
setQueryTimeout(int seconds) |
<T> T |
unwrap(Class<T> iface) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, setLargeMaxRowsMultiConnection parent
MultiStatement(MultiConnection parent, Statement s)
public int executeUpdate(String sql) throws SQLException
executeUpdate in interface StatementSQLExceptionpublic void close()
throws SQLException
close in interface AutoCloseableclose in interface StatementSQLExceptionpublic int getMaxFieldSize()
throws SQLException
getMaxFieldSize in interface StatementSQLExceptionpublic void setMaxFieldSize(int max)
throws SQLException
setMaxFieldSize in interface StatementSQLExceptionpublic int getMaxRows()
throws SQLException
getMaxRows in interface StatementSQLExceptionpublic void setMaxRows(int max)
throws SQLException
setMaxRows in interface StatementSQLExceptionpublic void setEscapeProcessing(boolean enable)
throws SQLException
setEscapeProcessing in interface StatementSQLExceptionpublic int getQueryTimeout()
throws SQLException
getQueryTimeout in interface StatementSQLExceptionpublic void setQueryTimeout(int seconds)
throws SQLException
setQueryTimeout in interface StatementSQLExceptionpublic void cancel()
throws SQLException
cancel in interface StatementSQLExceptionpublic SQLWarning getWarnings() throws SQLException
getWarnings in interface StatementSQLExceptionpublic void clearWarnings()
throws SQLException
clearWarnings in interface StatementSQLExceptionpublic boolean execute(String sql) throws SQLException
execute in interface StatementSQLExceptionpublic ResultSet getResultSet() throws SQLException
getResultSet in interface StatementSQLExceptionpublic int getUpdateCount()
throws SQLException
getUpdateCount in interface StatementSQLExceptionpublic boolean getMoreResults()
throws SQLException
getMoreResults in interface StatementSQLExceptionpublic void setCursorName(String name) throws SQLException
setCursorName in interface StatementSQLExceptionprotected Statement checkAfterException() throws SQLException
SQLException - if SELECT 1 did fail an no new Connection could be obtained.public ResultSet executeQuery(String sql) throws SQLException
executeQuery in interface StatementSQLExceptionpublic int[] executeBatch()
throws SQLException
executeBatch in interface StatementSQLExceptionpublic void setFetchDirection(int dir)
throws SQLException
setFetchDirection in interface StatementSQLExceptionpublic int getFetchDirection()
throws SQLException
getFetchDirection in interface StatementSQLExceptionpublic int getResultSetConcurrency()
throws SQLException
getResultSetConcurrency in interface StatementSQLExceptionpublic int getResultSetType()
throws SQLException
getResultSetType in interface StatementSQLExceptionpublic void addBatch(String sql) throws SQLException
addBatch in interface StatementSQLExceptionpublic void clearBatch()
throws SQLException
clearBatch in interface StatementSQLExceptionpublic Connection getConnection() throws SQLException
getConnection in interface StatementSQLExceptionpublic int getFetchSize()
throws SQLException
getFetchSize in interface StatementSQLExceptionpublic void setFetchSize(int i)
throws SQLException
setFetchSize in interface StatementSQLExceptionpublic boolean getMoreResults(int current)
throws SQLException
getMoreResults in interface Statementcurrent - one of CLOSE_CURRENT_RESULT, KEEP_CURRENT_RESULT, or CLOSE_ALL_RESULTSSQLExceptionpublic ResultSet getGeneratedKeys() throws SQLException
getGeneratedKeys in interface StatementSQLExceptionpublic int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
executeUpdate in interface Statementsql - must be an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothingautoGeneratedKeys - a flag indicating whether auto-generated keys should be made available for retrievalSQLExceptionpublic int executeUpdate(String sql, int[] columnIndexes) throws SQLException
executeUpdate in interface Statementsql - must be an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothingcolumnIndexes - an array of column indexes indicating the columns that should be returned from the inserted rowSQLExceptionpublic int executeUpdate(String sql, String[] columnNames) throws SQLException
executeUpdate in interface Statementsql - must be an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothingcolumnNames - - an array of the names of the columns that should be returned from the inserted rowSQLExceptionpublic boolean execute(String sql, int autoGeneratedKeys) throws SQLException
execute in interface Statementsql - any SQL statementautoGeneratedKeys - a flag indicating whether auto-generated keys should be made available for retrievalSQLExceptionpublic boolean execute(String sql, int[] columnIndexes) throws SQLException
execute in interface Statementsql - any SQL statementcolumnIndexes - an array of column indexes indicating the columns that should be returned from the inserted rowSQLExceptionpublic boolean execute(String sql, String[] columnNames) throws SQLException
execute in interface Statementsql - any SQL statementcolumnNames - - an array of the names of the columns that should be returned from the inserted rowSQLExceptionpublic int getResultSetHoldability()
throws SQLException
getResultSetHoldability in interface StatementSQLExceptionpublic boolean isClosed()
throws SQLException
isClosed in interface StatementSQLExceptionpublic void setPoolable(boolean p)
throws SQLException
setPoolable in interface StatementSQLExceptionpublic boolean isPoolable()
throws SQLException
isPoolable in interface StatementSQLExceptionpublic void closeOnCompletion()
throws SQLException
closeOnCompletion in interface StatementSQLExceptionpublic boolean isCloseOnCompletion()
throws SQLException
isCloseOnCompletion in interface StatementSQLExceptionpublic boolean isWrapperFor(Class<?> iface)
isWrapperFor in interface WrapperMMBase 1.9-SNAPSHOT - ${javadoctimestamp}