vortex.sql
Class vortexStatement

java.lang.Object
  extended by vortex.sql.vortexStatement
All Implemented Interfaces:
java.sql.Statement
Direct Known Subclasses:
vortexPreparedStatement

public class vortexStatement
extends java.lang.Object
implements java.sql.Statement

A Statement object is used for executing a static SQL statement and obtaining the results produced by it.

Only one ResultSet per Statement can be open at any point in time. Therefore, if the reading of one ResultSet is interleaved with the reading of another, each must have been generated by different Statements.

See Also:
Connection.createStatement(), ResultSet

Field Summary
protected  java.lang.String cName
          Cursor' name
protected  java.sql.Connection conn
          Connection object
protected  dbCursor lcur
          dbCursor object
protected  dbChannel ldb
          DBChannel object
protected  vortexRecord record
          Record object
protected  java.sql.ResultSet result
          ResultSet object
 
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
vortexStatement()
           
vortexStatement(java.sql.Connection con, dbChannel db, int type, int concurrency)
           
 
Method Summary
 void addBatch(java.lang.String sql)
          Not supported by VORTEXjdbc.
 void cancel()
          Cancel can be used by one thread to cancel a statement that is being executed by another thread.
 void clearBatch()
          Not supported by VORTEXjdbc.
 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.
 boolean execute(java.lang.String sql)
          Execute a SQL statement that may return multiple results.
 boolean execute(java.lang.String sql, int auto)
          Execute a SQL statement that may return multiple results and signal the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
 boolean execute(java.lang.String sql, int[] indexes)
          Execute a SQL statement that may return multiple results and signal 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[] names)
          Execute a SQL statement that may return multiple results and signal the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
 int[] executeBatch()
          Not supported by VORTEXjdbc.
 java.sql.ResultSet executeQuery(java.lang.String sql)
          Execute a SQL statement that returns a single ResultSet.
 int executeUpdate(java.lang.String sql)
          Execute a SQL INSERT, UPDATE or DELETE statement.
 int executeUpdate(java.lang.String sql, int auto)
          Execute a SQL INSERT, UPDATE or DELETE statement and signal 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[] indexes)
          Execute a SQL INSERT, UPDATE or DELETE statement and signal 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[] names)
          Execute a SQL INSERT, UPDATE or DELETE statement and signal the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
 void finalize()
           
 java.sql.Connection getConnection()
          Returns the Connection object that produced this Statement object.
 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 result sets generated from this Statement object.
 java.sql.ResultSet getGeneratedKeys()
          getGenerateKeys returns any auto-generated keys created as a result of executing this Statement.
 int getMaxFieldSize()
          This does not apply to VORTEXjdbc
 int getMaxRows()
          This does not apply to VORTEXjdbc
 boolean getMoreResults()
          getMoreResults moves to a Statement's next result.
 boolean getMoreResults(int current)
          getMoreResults moves to this Statements next result, deals with any current ResultSet objects according to the instructions specified by the given flag, and returns true is the next result is a ResultSet object.
 int getQueryTimeout()
          The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute.
 java.sql.ResultSet getResultSet()
          getResultSet returns the current result as a ResultSet.
 int getResultSetConcurrency()
          Retrieves the result set concurrency.
 int getResultSetHoldability()
          getResultSetHoldability returns the result set holdability.
 int getResultSetType()
          Determine the result set type.
 int getUpdateCount()
          getUpdateCount returns the current result, which should be an integer value.
 java.sql.SQLWarning getWarnings()
          The first warning reported by calls on this Statement is returned.
 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)
          This does not apply to VORTEXjdbc
 void setFetchDirection(int direction)
          Gives the driver a hint as to the direction in which the rows in a result set will be processed.
 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)
          This does not apply to VORTEXjdbc
 void setMaxRows(int max)
          This does not apply to VORTEXjdbc
 void setQueryTimeout(int seconds)
          The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cName

protected java.lang.String cName
Cursor' name


conn

protected java.sql.Connection conn
Connection object


ldb

protected dbChannel ldb
DBChannel object


lcur

protected dbCursor lcur
dbCursor object


result

protected java.sql.ResultSet result
ResultSet object


record

protected vortexRecord record
Record object

Constructor Detail

vortexStatement

public vortexStatement(java.sql.Connection con,
                       dbChannel db,
                       int type,
                       int concurrency)
                throws java.sql.SQLException
Throws:
java.sql.SQLException

vortexStatement

public vortexStatement()
                throws java.sql.SQLException
Throws:
java.sql.SQLException
Method Detail

executeQuery

public java.sql.ResultSet executeQuery(java.lang.String sql)
                                throws java.sql.SQLException
Execute a SQL statement that returns a single ResultSet.

Specified by:
executeQuery in interface java.sql.Statement
Parameters:
sql - typically this is a static SQL SELECT statement
Returns:
the table of data produced by the SQL statement
Throws:
java.sql.SQLException - thrown in the event the dbFetch fails

executeUpdate

public int executeUpdate(java.lang.String sql)
                  throws java.sql.SQLException
Execute a SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing such as SQL DDL statements can be executed.

Specified by:
executeUpdate in interface java.sql.Statement
Parameters:
sql - a SQL INSERT, UPDATE or DELETE statement or a SQL statement that returns nothing
Returns:
either the row count for INSERT, UPDATE or DELETE; or 0 for SQL statements that return nothing
Throws:
java.sql.SQLException - thrown in the event the DB action fails

executeUpdate

public int executeUpdate(java.lang.String sql,
                         java.lang.String[] names)
                  throws java.sql.SQLException
Execute a SQL INSERT, UPDATE or DELETE statement and signal the driver that the auto-generated keys indicated in the given array should be made available for retrieval. The driver will ignore the array if the SQL statement is not an INSERT. In addition, SQL statements that return nothing such as SQL DDL statements can be executed.

Specified by:
executeUpdate in interface java.sql.Statement
Parameters:
sql - a SQL INSERT, UPDATE or DELETE statement or a SQL statement that returns nothing
names - an array of the names of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys.
Returns:
either the row count for INSERT, UPDATE or DELETE; or 0 for SQL statements that return nothing
Throws:
java.sql.SQLException - thrown in the event the DB action fails

executeUpdate

public int executeUpdate(java.lang.String sql,
                         int[] indexes)
                  throws java.sql.SQLException
Execute a SQL INSERT, UPDATE or DELETE statement and signal the driver that the auto-generated keys indicated in the given array should be made available for retrieval. The driver will ignore the array if the SQL statement is not an INSERT. In addition, SQL statements that return nothing such as SQL DDL statements can be executed.

Specified by:
executeUpdate in interface java.sql.Statement
Parameters:
sql - a SQL INSERT, UPDATE or DELETE statement or a SQL statement that returns nothing
indexes - an array of the indexes of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys.
Returns:
either the row count for INSERT, UPDATE or DELETE; or 0 for SQL statements that return nothing
Throws:
java.sql.SQLException - thrown in the event the DB action fails

executeUpdate

public int executeUpdate(java.lang.String sql,
                         int auto)
                  throws java.sql.SQLException
Execute a SQL INSERT, UPDATE or DELETE statement and signal the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval. In addition, SQL statements that return nothing such as SQL DDL statements can be executed.

Specified by:
executeUpdate in interface java.sql.Statement
Parameters:
sql - a SQL INSERT, UPDATE or DELETE statement or a SQL statement that returns nothing
auto - a flag indicating whether auto-generated keys should be made available for retrieval. One of Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS.
Returns:
either the row count for INSERT, UPDATE or DELETE; or 0 for SQL statements that return nothing
Throws:
java.sql.SQLException - thrown in the event the DB action fails

close

public void close()
           throws java.sql.SQLException
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.

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.

Specified by:
close in interface java.sql.Statement
Throws:
java.sql.SQLException - Not apply

getMaxFieldSize

public int getMaxFieldSize()
                    throws java.sql.SQLException
This does not apply to VORTEXjdbc

The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded.

Specified by:
getMaxFieldSize in interface java.sql.Statement
Returns:
the current max column size limit; zero means unlimited
Throws:
java.sql.SQLException - Not apply

setMaxFieldSize

public void setMaxFieldSize(int max)
                     throws java.sql.SQLException
This does not apply to VORTEXjdbc

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. If the limit is exceeded, the excess data is silently discarded.

Specified by:
setMaxFieldSize in interface java.sql.Statement
Parameters:
max - the new max column size limit; zero means unlimited
Throws:
java.sql.SQLException - Not apply

getMaxRows

public int getMaxRows()
               throws java.sql.SQLException
This does not apply to VORTEXjdbc

The maxRows limit is the maximum number of rows that a ResultSet can contain. If the limit is exceeded, the excess rows are silently dropped.

Specified by:
getMaxRows in interface java.sql.Statement
Returns:
the current max row limit; zero means unlimited
Throws:
java.sql.SQLException - Not apply

setMaxRows

public void setMaxRows(int max)
                throws java.sql.SQLException
This does not apply to VORTEXjdbc

The maxRows limit is set to limit the number of rows that any ResultSet can contain. If the limit is exceeded, the excess rows are silently dropped.

Specified by:
setMaxRows in interface java.sql.Statement
Parameters:
max - the new max rows limit; zero means unlimited
Throws:
java.sql.SQLException - Not apply

setEscapeProcessing

public void setEscapeProcessing(boolean enable)
                         throws java.sql.SQLException
This does not apply to VORTEXjdbc

If escape scanning is on (the default) the driver will do escape substitution before sending the SQL to the database.

Specified by:
setEscapeProcessing in interface java.sql.Statement
Parameters:
enable - true to enable; false to disable
Throws:
java.sql.SQLException - Not apply

getQueryTimeout

public int getQueryTimeout()
                    throws java.sql.SQLException

The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded a SQLException is thrown.

Specified by:
getQueryTimeout in interface java.sql.Statement
Returns:
the current query timeout limit in seconds; zero means unlimited
Throws:
java.sql.SQLException - Not apply

setQueryTimeout

public void setQueryTimeout(int seconds)
                     throws java.sql.SQLException

The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded a SQLException is thrown.

Specified by:
setQueryTimeout in interface java.sql.Statement
Parameters:
seconds - the new query timeout limit in seconds; zero means unlimited
Throws:
java.sql.SQLException - Not apply

cancel

public void cancel()
            throws java.sql.SQLException
Cancel can be used by one thread to cancel a statement that is being executed by another thread.

Specified by:
cancel in interface java.sql.Statement
Throws:
java.sql.SQLException - Not apply

getWarnings

public java.sql.SQLWarning getWarnings()
                                throws java.sql.SQLException
The first warning reported by calls on this Statement is returned. A Statment's execute methods clear its SQLWarning chain. Subsequent Statement warnings will be chained to this SQLWarning.

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.

Specified by:
getWarnings in interface java.sql.Statement
Returns:
the first SQLWarning or null
Throws:
java.sql.SQLException - Not apply

clearWarnings

public void clearWarnings()
                   throws java.sql.SQLException
After this call getWarnings returns null until a new warning is reported for this Statement.

Specified by:
clearWarnings in interface java.sql.Statement
Throws:
java.sql.SQLException - Not apply

setCursorName

public void setCursorName(java.lang.String name)
                   throws java.sql.SQLException
setCursorname defines the SQL cursor name that will be used by subsequent Statement execute methods. This name can then be used in SQL positioned update/delete statements to identify the current row in the ResultSet generated by this statement. If the database doesn't support positioned update/delete, this method is a noop.

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.

Specified by:
setCursorName in interface java.sql.Statement
Parameters:
name - the new cursor name.
Throws:
java.sql.SQLException - Not apply

execute

public boolean execute(java.lang.String sql)
                throws java.sql.SQLException
Execute a SQL statement that may return multiple results. Under some (uncommon) situations a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this, unless you're executing a stored procedure that you know may return multiple results, or unless you're dynamically executing an unknown SQL string. The "execute", "getMoreResults", "getResultSet" and "getUpdateCount" methods let you navigate through multiple results. The "execute" method executes a SQL statement and indicates the form of the first result. You can then use getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

Specified by:
execute in interface java.sql.Statement
Parameters:
sql - any SQL statement
Returns:
true if the first result is a ResultSet; false if it is an integer
Throws:
java.sql.SQLException - threw exceptions on all DB actions
See Also:
getResultSet(), getUpdateCount(), getMoreResults(int)

execute

public boolean execute(java.lang.String sql,
                       int auto)
                throws java.sql.SQLException
Execute a SQL statement that may return multiple results and signal the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the names of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the given SQL statement is not an INSERT statement. Under some (uncommon) situations a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this, unless you're executing a stored procedure that you know may return multiple results, or unless you're dynamically executing an unknown SQL string. The "execute", "getMoreResults", "getResultSet" and "getUpdateCount" methods let you navigate through multiple results. The "execute" method executes a SQL statement and indicates the form of the first result. You can then use getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

Specified by:
execute in interface java.sql.Statement
Parameters:
sql - any SQL statement
auto - constant indicating whether auto-generated keys should be made available for retrieval by a call to the method getGeneratedKeys. One of Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS.
Returns:
true if the first result is a ResultSet; false if it is an integer
Throws:
java.sql.SQLException - threw exceptions on all DB actions
See Also:
getResultSet(), getUpdateCount(), getMoreResults(int)

execute

public boolean execute(java.lang.String sql,
                       int[] indexes)
                throws java.sql.SQLException
Execute a SQL statement that may return multiple results and signal the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the names of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the given SQL statement is not an INSERT statement. Under some (uncommon) situations a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this, unless you're executing a stored procedure that you know may return multiple results, or unless you're dynamically executing an unknown SQL string. The "execute", "getMoreResults", "getResultSet" and "getUpdateCount" methods let you navigate through multiple results. The "execute" method executes a SQL statement and indicates the form of the first result. You can then use getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

Specified by:
execute in interface java.sql.Statement
Parameters:
sql - any SQL statement
indexes - an array of the indexes of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys.
Returns:
true if the first result is a ResultSet; false if it is an integer
Throws:
java.sql.SQLException - threw exceptions on all DB actions
See Also:
getResultSet(), getUpdateCount(), getMoreResults(int)

execute

public boolean execute(java.lang.String sql,
                       java.lang.String[] names)
                throws java.sql.SQLException
Execute a SQL statement that may return multiple results and signal the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the names of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the given SQL statement is not an INSERT statement. Under some (uncommon) situations a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this, unless you're executing a stored procedure that you know may return multiple results, or unless you're dynamically executing an unknown SQL string. The "execute", "getMoreResults", "getResultSet" and "getUpdateCount" methods let you navigate through multiple results. The "execute" method executes a SQL statement and indicates the form of the first result. You can then use getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

Specified by:
execute in interface java.sql.Statement
Parameters:
sql - any SQL statement
names - an array of the names of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys.
Returns:
true if the first result is a ResultSet; false if it is an integer
Throws:
java.sql.SQLException - threw exceptions on all DB actions
See Also:
getResultSet(), getUpdateCount(), getMoreResults(int)

getResultSet

public java.sql.ResultSet getResultSet()
                                throws java.sql.SQLException
getResultSet returns the current result as a ResultSet. It should only be called once per result.

Specified by:
getResultSet in interface java.sql.Statement
Returns:
the current result as a ResultSet; null if it is an integer
Throws:
java.sql.SQLException - Not apply
See Also:
execute(java.lang.String)

getMoreResults

public boolean getMoreResults(int current)
                       throws java.sql.SQLException
getMoreResults moves to this Statements next result, deals with any current ResultSet objects according to the instructions specified by the given flag, and returns true is the next result is a ResultSet object. There are no more results when the following is true: ((stmt.getMoreResults() == false) && stmt.getUpdateCount() == (-1))

Specified by:
getMoreResults in interface java.sql.Statement
Parameters:
current - one of the following: Statement.CLOSE_CURRENT_RESULT, Statement.KEEP_CURRENT_RESULT, or Statement.CLOSE_ALL_RESULTS.
Returns:
true if the next result is a ResultSet object, false if it is an update count or there are no more results.
Throws:
java.sql.SQLException - Not apply

getGeneratedKeys

public java.sql.ResultSet getGeneratedKeys()
                                    throws java.sql.SQLException
getGenerateKeys returns any auto-generated keys created as a result of executing this Statement. If this Statement did not generate any keys, an empty ResultSet is returned.

Specified by:
getGeneratedKeys in interface java.sql.Statement
Returns:
a ResultSet containining the auto-generated key(s) generated by the execution of this Statement.
Throws:
java.sql.SQLException - Not apply

getResultSetHoldability

public int getResultSetHoldability()
                            throws java.sql.SQLException
getResultSetHoldability returns the result set holdability.

Specified by:
getResultSetHoldability in interface java.sql.Statement
Returns:
ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT.
Throws:
java.sql.SQLException - Not apply

getUpdateCount

public int getUpdateCount()
                   throws java.sql.SQLException
getUpdateCount returns the current result, which should be an integer value. It should only be called once per result.

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 an update count.

Specified by:
getUpdateCount in interface java.sql.Statement
Returns:
the current result as an integer; zero if it is a ResultSet
Throws:
java.sql.SQLException - Not apply
See Also:
execute(java.lang.String)

getMoreResults

public boolean getMoreResults()
                       throws java.sql.SQLException
getMoreResults moves to a Statement's next result. It returns true if this result is a ResultSet. getMoreResults also implicitly closes any current ResultSet obtained with getResultSet.

Specified by:
getMoreResults in interface java.sql.Statement
Returns:
true if the next result is a ResultSet; false if it is an integer
Throws:
java.sql.SQLException - throw exception on all DB actions
See Also:
execute(java.lang.String)

addBatch

public void addBatch(java.lang.String sql)
              throws java.sql.SQLException
Not supported by VORTEXjdbc. Adds a SQL command to the current batch of commmands for the statement. This method is optional.

Specified by:
addBatch in interface java.sql.Statement
Parameters:
sql - typically this is a static SQL INSERT or UPDATE statement
Throws:
java.sql.SQLException - if the driver does not support batch statements

clearBatch

public void clearBatch()
                throws java.sql.SQLException
Not supported by VORTEXjdbc. Makes the set of commands in the current batch empty. This method is optional.

Specified by:
clearBatch in interface java.sql.Statement
Throws:
java.sql.SQLException - if the driver does not support batch statements

executeBatch

public int[] executeBatch()
                   throws java.sql.SQLException
Not supported by VORTEXjdbc. Submits a batch of commands to the database for execution. This method is optional.

Specified by:
executeBatch in interface java.sql.Statement
Returns:
an array of update counts containing one element for each command in the batch. The array is ordered according to the order in which commands were inserted into the batch.
Throws:
java.sql.SQLException - if the driver does not support batch statements

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Returns the Connection object that produced this Statement object.

Specified by:
getConnection in interface java.sql.Statement
Returns:
the connection that produced this statement
Throws:
java.sql.SQLException

getFetchDirection

public int getFetchDirection()
                      throws java.sql.SQLException
Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object. If this Statement object has not set a fetch direction by calling the method setFetchDirection, the return value is implementation-specific.

Specified by:
getFetchDirection in interface java.sql.Statement
Returns:
the default fetch direction for result sets generated from this Statement object
Throws:
java.sql.SQLException

setFetchSize

public void setFetchSize(int rows)
                  throws java.sql.SQLException
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.

Specified by:
setFetchSize in interface java.sql.Statement
Parameters:
rows - the number of rows to fetch
Throws:
java.sql.SQLException - if the condition 0 <= rows <= this.getMaxRows() is not satisfied.

getFetchSize

public int getFetchSize()
                 throws java.sql.SQLException
Retrieves the number of result set rows that is the default fetch size for result sets generated from this Statement object. If this Statement object has not set a fetch size by calling the method setFetchSize, the return value is implementation-specific.

Specified by:
getFetchSize in interface java.sql.Statement
Returns:
the default fetch size for result sets generated from this Statement object
Throws:
java.sql.SQLException

getResultSetConcurrency

public int getResultSetConcurrency()
                            throws java.sql.SQLException
Retrieves the result set concurrency.

Specified by:
getResultSetConcurrency in interface java.sql.Statement
Returns:
the result set concurrency
Throws:
java.sql.SQLException

getResultSetType

public int getResultSetType()
                     throws java.sql.SQLException
Determine the result set type.

Specified by:
getResultSetType in interface java.sql.Statement
Returns:
the result set type
Throws:
java.sql.SQLException

setFetchDirection

public void setFetchDirection(int direction)
                       throws java.sql.SQLException
Gives the driver a hint as to the direction in which the rows in a result set will be processed. The hint applies only to result sets created using this Statement object. The default value is ResultSet.FETCH_FORWARD. Note that this method sets the default fetch direction for result sets generated by this Statement object. Each result set has its own methods for getting and setting its own fetch direction.

Specified by:
setFetchDirection in interface java.sql.Statement
Parameters:
direction - the initial direction for processing rows
Throws:
java.sql.SQLException - if the given direction is not one of ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or ResultSet.FETCH_UNKNOWN

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object