| java.lang.Object org.mandarax.jdbc.AbstractStatementImpl
All known Subclasses: org.mandarax.jdbc.server.StatementImpl, org.mandarax.jdbc.client.StatementImpl,
AbstractStatementImpl | abstract public class AbstractStatementImpl implements Statement,LogCategories(Code) | | Abstract superclass for statements and prepared statements.
author: Jens Dietrich version: 3.3.2 <29 December 2004> since: 3.0 |
Method Summary | |
public void | addBatch(String sql) Adds the given SQL command to the current list of commmands for this Statement object. | public void | addBatch() Adds a set of parameters to this PreparedStatement object's batch of commands. | public void | cancel() Cancels this Statement object if both the DBMS and driver support aborting an SQL statement. | public void | clearBatch() Empties this Statement object's current list of SQL commands. | public void | clearWarnings() Clears all the warnings reported on this Statement object. | public void | close() Releases this Statement object's database and JDBC resources immediately instead of
waiting for this to happen when it is automatically closed. | public boolean | execute() Executes the given SQL statement, which may return multiple results. | public boolean | execute(String sql) Executes the given SQL statement, which may return multiple results. | public 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. | public 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. | public 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. | public int[] | executeBatch() Submits a batch of commands to the database for execution and if all commands
execute successfully, returns an array of update counts. | public int | executeUpdate() 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. | public int | executeUpdate(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. | public int | executeUpdate(String sql, int autoGeneratedKeys) 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. | public int | executeUpdate(String sql, int[] columnIndexes) 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. | public int | executeUpdate(String sql, String[] columnNames) 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. | public Connection | getConnection() Get the connection that created this statement. | public int | getFetchDirection() Retrieves the direction for fetching rows from database tables that is the default for
result sets generated from this Statement object. | public int | getFetchSize() Retrieves the number of result set rows that is the default fetch size for ResultSet objects generated
from this Statement object. | public java.sql.ResultSet | getGeneratedKeys() Retrieves any auto-generated keys created as a result of executing this Statement object. | public 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. | public int | getMaxRows() Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain. | public ResultSetMetaData | getMetaData() Retrieves a ResultSetMetaData object that contains information about the
columns of the ResultSet object that will be returned when this PreparedStatement
object is executed. | public 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. | public 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. | public ParameterMetaData | getParameterMetaData() Retrieves the number, types and properties of this PreparedStatement object's parameters. | public int | getQueryTimeout() Retrieves the number of seconds the driver will wait for a Statement object to execute. | public java.sql.ResultSet | getResultSet() Retrieves the current result as a ResultSet object. | public int | getResultSetConcurrency() Retrieves the result set concurrency for ResultSet objects generated by this Statement object. | public int | getResultSetHoldability() Retrieves the result set holdability for ResultSet objects generated by this Statement object. | public int | getResultSetType() Retrieves the result set type for ResultSet objects generated by this Statement object. | public 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. | public SQLWarning | getWarnings() Retrieves the first warning reported by calls on this Statement object. | protected void | notSupported(String methodName) Log a call of an unsupported method. | protected void | notSupportedThrowException(String methodName) Log a call of an unsupported method. | public void | setArray(int i, Array x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setAsciiStream(int parameterIndex, InputStream x, int length) All set methods use setObject(int,Object), primitives are wrapped. | public void | setBigDecimal(int parameterIndex, BigDecimal x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setBinaryStream(int parameterIndex, InputStream x, int length) Generated method stub. | public void | setBlob(int i, Blob x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setBoolean(int parameterIndex, boolean x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setByte(int parameterIndex, byte x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setBytes(int parameterIndex, byte[] x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setCharacterStream(int parameterIndex, Reader reader, int length) All set methods use setObject(int,Object), primitives are wrapped. | public void | setClob(int i, Clob x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setCursorName(String name) | public void | setDate(int parameterIndex, Date x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setDate(int parameterIndex, Date x, Calendar cal) All set methods use setObject(int,Object), primitives are wrapped. | public void | setDouble(int parameterIndex, double x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setEscapeProcessing(boolean enable) Sets escape processing on or off. | public 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. | public 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. | public void | setFloat(int parameterIndex, float x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setInt(int parameterIndex, int x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setLong(int parameterIndex, long x) All set methods use setObject(int,Object), primitives are wrapped. | public 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. | public void | setMaxRows(int max) Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number. | public void | setNull(int parameterIndex, int sqlType) All set methods use setObject(int,Object), primitives are wrapped. | public void | setNull(int paramIndex, int sqlType, String typeName) Generated method stub. | public void | setObject(int parameterIndex, Object x, int targetSqlType, int scale) Set the object on a certain index. | public void | setObject(int parameterIndex, Object x, int targetSqlType) Set the object on a certain index. | abstract public void | setObject(int parameterIndex, Object x) Set the object on a certain index. | public 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. | public void | setRef(int i, Ref x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setShort(int parameterIndex, short x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setString(int parameterIndex, String x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setTime(int parameterIndex, Time x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setTime(int parameterIndex, Time x, Calendar cal) All set methods use setObject(int,Object), primitives are wrapped. | public void | setTimestamp(int parameterIndex, Timestamp x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setTimestamp(int parameterIndex, Timestamp x, Calendar cal) All set methods use setObject(int,Object), primitives are wrapped. | public void | setURL(int parameterIndex, URL x) All set methods use setObject(int,Object), primitives are wrapped. | public void | setUnicodeStream(int parameterIndex, InputStream x, int length) All set methods use setObject(int,Object), primitives are wrapped. |
maxRows | protected int maxRows(Code) | | |
AbstractStatementImpl | public AbstractStatementImpl(Connection connection)(Code) | | Constructor.
Parameters: connection - the connection used |
addBatch | public void addBatch(String sql) throws SQLException(Code) | | Adds the given SQL command to the current list of commmands for this Statement object.
The commands in this list can be executed as a batch by calling the method executeBatch.
|
addBatch | public void addBatch() throws SQLException(Code) | | Adds a set of parameters to this PreparedStatement object's batch of commands.
|
cancel | public void cancel() throws SQLException(Code) | | Cancels this Statement object if both the DBMS and driver support aborting an SQL statement.
|
clearBatch | public void clearBatch() throws SQLException(Code) | | Empties this Statement object's current list of SQL commands.
|
clearWarnings | public void clearWarnings() throws SQLException(Code) | | Clears all the warnings reported on this Statement object.
|
close | public void close() throws SQLException(Code) | | Releases this Statement object's database and JDBC resources immediately instead of
waiting for this to happen when it is automatically closed.
|
execute | public boolean execute() throws SQLException(Code) | | Executes the given SQL statement, which may return multiple results.
|
execute | public boolean execute(String sql) throws SQLException(Code) | | Executes the given SQL statement, which may return multiple results.
|
execute | public boolean execute(String sql, int autoGeneratedKeys) throws SQLException(Code) | | 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.
|
execute | public boolean execute(String sql, int[] columnIndexes) throws SQLException(Code) | | 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.
|
execute | public boolean execute(String sql, String[] columnNames) throws SQLException(Code) | | 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.
|
executeBatch | public int[] executeBatch() throws SQLException(Code) | | Submits a batch of commands to the database for execution and if all commands
execute successfully, returns an array of update counts.
|
executeUpdate | public int executeUpdate() throws SQLException(Code) | | 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.
|
executeUpdate | public int executeUpdate(String sql) throws SQLException(Code) | | 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.
|
executeUpdate | public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException(Code) | | 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.
|
executeUpdate | public int executeUpdate(String sql, int[] columnIndexes) throws SQLException(Code) | | 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.
|
executeUpdate | public int executeUpdate(String sql, String[] columnNames) throws SQLException(Code) | | 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.
|
getConnection | public Connection getConnection()(Code) | | Get the connection that created this statement.
the connection |
getFetchDirection | public int getFetchDirection() throws SQLException(Code) | | Retrieves the direction for fetching rows from database tables that is the default for
result sets generated from this Statement object.
the default fetch direction for result sets generated from this Statement object |
getFetchSize | public int getFetchSize() throws SQLException(Code) | | Retrieves the number of result set rows that is the default fetch size for ResultSet objects generated
from this Statement object.
the default fetch size for result sets generated from this Statement object |
getGeneratedKeys | public java.sql.ResultSet getGeneratedKeys() throws SQLException(Code) | | Retrieves any auto-generated keys created as a result of executing this Statement object.
If this Statement object did not generate any keys, an empty ResultSet object is returned.
Parameters: a - ResultSet object containing the auto-generated key(s) generated by the execution of this Statement object |
getMaxFieldSize | public int getMaxFieldSize() throws SQLException(Code) | | 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. Zero means there is no limit
the max field size |
getMaxRows | public int getMaxRows() throws SQLException(Code) | | Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain.
If this limit is exceeded, the excess rows are silently dropped. Zero means there is no limit.
the current maximum number of rows for a ResultSet object produced by this Statement object |
getMetaData | public ResultSetMetaData getMetaData() throws SQLException(Code) | | Retrieves a ResultSetMetaData object that contains information about the
columns of the ResultSet object that will be returned when this PreparedStatement
object is executed.
the description of a ResultSet object's columns or null if the driver cannot return a ResultSetMetaData object throws: SQLException - See Also: java.sql.PreparedStatement.getMetaData |
getMoreResults | public boolean getMoreResults() throws SQLException(Code) | | 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.
|
getMoreResults | public boolean getMoreResults(int current) throws SQLException(Code) | | 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.
Parameters: current - - 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 |
getQueryTimeout | public int getQueryTimeout() throws SQLException(Code) | | Retrieves the number of seconds the driver will wait for a Statement object to execute.
If the limit is exceeded, a SQLException is thrown.
the current query timeout limit in seconds; zero means there is no limit |
getResultSet | public java.sql.ResultSet getResultSet() throws SQLException(Code) | | Retrieves the current result as a ResultSet object.
This method should be called only once per result.
|
getResultSetConcurrency | public int getResultSetConcurrency() throws SQLException(Code) | | Retrieves the result set concurrency for ResultSet objects generated by this Statement object.
always ResultSet.CONCUR_READ_ONLY |
getResultSetHoldability | public int getResultSetHoldability() throws SQLException(Code) | | Retrieves the result set holdability for ResultSet objects generated by this Statement object.
either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT |
getResultSetType | public int getResultSetType() throws SQLException(Code) | | Retrieves the result set type for ResultSet objects generated by this Statement object.
one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE |
getUpdateCount | public int getUpdateCount() throws SQLException(Code) | | Retrieves the current result as an update count; if the result is a ResultSet
object or there are no more results, -1 is returned.
This method should be called only once per result.
|
getWarnings | public SQLWarning getWarnings() throws SQLException(Code) | | Retrieves the first warning reported by calls on this Statement object.
|
notSupported | protected void notSupported(String methodName)(Code) | | Log a call of an unsupported method.
Parameters: methodName - the name of the method |
notSupportedThrowException | protected void notSupportedThrowException(String methodName) throws SQLException(Code) | | Log a call of an unsupported method.
This call throws an exception.
Parameters: methodName - the name of the method |
setArray | public void setArray(int i, Array x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setAsciiStream | public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setBigDecimal | public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setBlob | public void setBlob(int i, Blob x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setBoolean | public void setBoolean(int parameterIndex, boolean x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setByte | public void setByte(int parameterIndex, byte x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setBytes | public void setBytes(int parameterIndex, byte[] x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setCharacterStream | public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setClob | public void setClob(int i, Clob x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setDate | public void setDate(int parameterIndex, Date x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setDate | public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
TODO check
|
setDouble | public void setDouble(int parameterIndex, double x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setEscapeProcessing | public void setEscapeProcessing(boolean enable) throws SQLException(Code) | | Sets escape processing on or off.
Parameters: enable - true to enable escape processing; false to disable it |
setFetchDirection | public void setFetchDirection(int direction) throws SQLException(Code) | | Gives the driver a hint as to the direction in which rows will be processed in ResultSet
objects created using this Statement object. The default value is ResultSet.FETCH_FORWARD.
Parameters: direction - the initial direction for processing rows |
setFetchSize | public void setFetchSize(int rows) throws SQLException(Code) | | Gives the JDBC driver a hint as to the number of rows that should be fetched from the database
when more rows are needed. The number of rows specified affects only result sets created using
this statement. If the value specified is zero, then the hint is ignored. The default value is zero.
Parameters: rows - the number of rows to fetch |
setFloat | public void setFloat(int parameterIndex, float x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setInt | public void setInt(int parameterIndex, int x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setLong | public void setLong(int parameterIndex, long x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setMaxFieldSize | public void setMaxFieldSize(int max) throws SQLException(Code) | | Sets the limit for the maximum number of bytes in a ResultSet
column storing character or binary values to the given number of bytes.
|
setMaxRows | public void setMaxRows(int max) throws SQLException(Code) | | Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number.
If the limit is exceeded, the excess rows are silently dropped.
Parameters: max - the new max rows limit; zero means there is no limit |
setNull | public void setNull(int parameterIndex, int sqlType) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setNull | public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException(Code) | | Generated method stub. This method is not supported by the mandarax jdbc driver.
|
setObject | public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException(Code) | | Set the object on a certain index.
Parameters: parameterIndex - the index Parameters: x - the object Parameters: targetSqlType - will be ignored! Parameters: scale - will be ignored! |
setObject | public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException(Code) | | Set the object on a certain index.
Parameters: parameterIndex - the index Parameters: x - the object Parameters: targetSqlType - will be ignored! |
setObject | abstract public void setObject(int parameterIndex, Object x) throws SQLException(Code) | | Set the object on a certain index.
Parameters: parameterIndex - the index Parameters: x - the object |
setQueryTimeout | public void setQueryTimeout(int seconds) throws SQLException(Code) | | Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.
If the limit is exceeded, an SQLException is thrown.
Parameters: seconds - the new query timeout limit in seconds; zero means there is no limit |
setRef | public void setRef(int i, Ref x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setShort | public void setShort(int parameterIndex, short x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setString | public void setString(int parameterIndex, String x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setTime | public void setTime(int parameterIndex, Time x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setTime | public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
TODO check
|
setTimestamp | public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setTimestamp | public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped. ]
TODO check
|
setURL | public void setURL(int parameterIndex, URL x) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
setUnicodeStream | public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException(Code) | | All set methods use setObject(int,Object), primitives are wrapped.
|
|
|