public class StatementAdaptor
extends java.lang.Object
implements java.sql.Statement
| Constructor and Description |
|---|
StatementAdaptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBatch(java.lang.String sql)
Adds the given SQL command to the current list of commmands for this Statement object.
|
void |
cancel()
Cancels this Statement object if both the DBMS and driver support aborting an SQL statement.
|
void |
clearBatch()
Empties this Statement object's current list of SQL commands.
|
void |
clearWarnings()
Clears all the warnings reported on this Statement object.
|
void |
close()
Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
|
void |
closeOnCompletion() |
boolean |
execute(java.lang.String sql)
Executes the given SQL statement, which may return multiple results.
|
boolean |
execute(java.lang.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(java.lang.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(java.lang.String sql,
java.lang.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()
Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
|
java.sql.ResultSet |
executeQuery(java.lang.String sql)
Executes the given SQL statement, which returns a single ResultSet object.
|
int |
executeUpdate(java.lang.String sql)
Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
|
int |
executeUpdate(java.lang.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(java.lang.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(java.lang.String sql,
java.lang.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.
|
java.sql.Connection |
getConnection() |
int |
getFetchDirection()
Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object.
|
int |
getFetchSize()
Retrieves the number of result set rows that is the default fetch size for ResultSet objects generated from this Statement object.
|
java.sql.ResultSet |
getGeneratedKeys()
Retrieves any auto-generated keys created as a result of executing this Statement object.
|
int |
getMaxFieldSize()
Retrieves the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object.
|
int |
getMaxRows()
Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain.
|
boolean |
getMoreResults()
Moves to this Statement object's next result, returns true if it is a ResultSet object, and implicitly closes any current ResultSet object(s) obtained with the method getResultSet.
|
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()
Retrieves the number of seconds the driver will wait for a Statement object to execute.
|
java.sql.ResultSet |
getResultSet()
Retrieves the current result as a ResultSet object.
|
int |
getResultSetConcurrency()
Retrieves the result set concurrency for ResultSet objects generated by this Statement object.
|
int |
getResultSetHoldability()
Retrieves the result set holdability for ResultSet objects generated by this Statement object.
|
int |
getResultSetType()
Retrieves the result set type for ResultSet objects generated by this Statement object.
|
int |
getUpdateCount()
Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.
|
java.sql.SQLWarning |
getWarnings()
Retrieves the first warning reported by calls on this Statement object.
|
boolean |
isClosed() |
boolean |
isCloseOnCompletion() |
boolean |
isPoolable() |
boolean |
isWrapperFor(java.lang.Class c) |
void |
setCursorName(java.lang.String name)
Sets the SQL cursor name to the given String, which will be used by subsequent Statement object execute methods.
|
void |
setEscapeProcessing(boolean enable)
Sets escape processing on or off.
|
void |
setFetchDirection(int direction)
Gives the driver a hint as to the direction in which rows will be processed in ResultSet objects created using this Statement object.
|
void |
setFetchSize(int rows)
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.
|
void |
setMaxFieldSize(int max)
Sets the limit for the maximum number of bytes in a ResultSet column storing character or binary values to the given number of bytes.
|
void |
setMaxRows(int max)
Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number.
|
void |
setPoolable(boolean b) |
void |
setQueryTimeout(int seconds)
Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.
|
java.lang.Object |
unwrap(java.lang.Class c) |
public void addBatch(java.lang.String sql)
addBatch in interface java.sql.Statementpublic void cancel()
cancel in interface java.sql.Statementpublic void clearBatch()
clearBatch in interface java.sql.Statementpublic void clearWarnings()
clearWarnings in interface java.sql.Statementpublic void close()
close in interface java.lang.AutoCloseableclose in interface java.sql.Statementpublic boolean execute(java.lang.String sql)
execute in interface java.sql.Statementpublic boolean execute(java.lang.String sql,
int autoGeneratedKeys)
execute in interface java.sql.Statementpublic boolean execute(java.lang.String sql,
int[] columnIndexes)
execute in interface java.sql.Statementpublic boolean execute(java.lang.String sql,
java.lang.String[] columnNames)
execute in interface java.sql.Statementpublic int[] executeBatch()
executeBatch in interface java.sql.Statementpublic java.sql.ResultSet executeQuery(java.lang.String sql)
executeQuery in interface java.sql.Statementpublic int executeUpdate(java.lang.String sql)
executeUpdate in interface java.sql.Statementpublic int executeUpdate(java.lang.String sql,
int autoGeneratedKeys)
executeUpdate in interface java.sql.Statementpublic int executeUpdate(java.lang.String sql,
int[] columnIndexes)
executeUpdate in interface java.sql.Statementpublic int executeUpdate(java.lang.String sql,
java.lang.String[] columnNames)
executeUpdate in interface java.sql.Statementpublic int getFetchDirection()
getFetchDirection in interface java.sql.Statementpublic int getFetchSize()
getFetchSize in interface java.sql.Statementpublic java.sql.ResultSet getGeneratedKeys()
getGeneratedKeys in interface java.sql.Statementpublic int getMaxFieldSize()
getMaxFieldSize in interface java.sql.Statementpublic int getMaxRows()
getMaxRows in interface java.sql.Statementpublic boolean getMoreResults()
getMoreResults in interface java.sql.Statementpublic boolean getMoreResults(int current)
getMoreResults in interface java.sql.Statementpublic int getQueryTimeout()
getQueryTimeout in interface java.sql.Statementpublic java.sql.ResultSet getResultSet()
getResultSet in interface java.sql.Statementpublic int getResultSetConcurrency()
getResultSetConcurrency in interface java.sql.Statementpublic int getResultSetHoldability()
getResultSetHoldability in interface java.sql.Statementpublic int getResultSetType()
getResultSetType in interface java.sql.Statementpublic int getUpdateCount()
getUpdateCount in interface java.sql.Statementpublic java.sql.SQLWarning getWarnings()
getWarnings in interface java.sql.Statementpublic void setCursorName(java.lang.String name)
setCursorName in interface java.sql.Statementpublic void setEscapeProcessing(boolean enable)
setEscapeProcessing in interface java.sql.Statementpublic void setFetchDirection(int direction)
setFetchDirection in interface java.sql.Statementpublic void setFetchSize(int rows)
setFetchSize in interface java.sql.Statementpublic void setMaxFieldSize(int max)
setMaxFieldSize in interface java.sql.Statementpublic void setMaxRows(int max)
setMaxRows in interface java.sql.Statementpublic void setQueryTimeout(int seconds)
setQueryTimeout in interface java.sql.Statementpublic java.lang.Object unwrap(java.lang.Class c)
unwrap in interface java.sql.Wrapperpublic boolean isWrapperFor(java.lang.Class c)
isWrapperFor in interface java.sql.Wrapperpublic boolean isClosed()
isClosed in interface java.sql.Statementpublic void setPoolable(boolean b)
setPoolable in interface java.sql.Statementpublic java.sql.Connection getConnection()
getConnection in interface java.sql.Statementpublic boolean isPoolable()
isPoolable in interface java.sql.Statementpublic void closeOnCompletion()
closeOnCompletion in interface java.sql.Statementpublic boolean isCloseOnCompletion()
isCloseOnCompletion in interface java.sql.StatementCopyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.