|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vortex.sql.vortexStatement
public class vortexStatement
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.
Connection.createStatement()
,
ResultSet
Field Summary |
---|
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 |
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)
Not supported by VORTEXjdbc. |
|
boolean |
execute(java.lang.String sql,
int[] indexes)
Not supported by VORTEXjdbc. |
|
boolean |
execute(java.lang.String sql,
java.lang.String[] names)
Not supported by VORTEXjdbc. |
|
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)
Not supported by VORTEXjdbc. |
|
int |
executeUpdate(java.lang.String sql,
int[] indexes)
Not supported by VORTEXjdbc. |
|
int |
executeUpdate(java.lang.String sql,
java.lang.String[] names)
Not supported by VORTEXjdbc. |
|
void |
finalize()
|
|
java.sql.Connection |
getConnection()
Returns the Connection object that produced this Statement object. |
|
java.lang.String |
getCursorName()
|
|
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()
Not supported by VORTEXjdbc. |
|
int |
getMaxFieldSize()
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. |
|
int |
getMaxRows()
The maxRows limit is the maximum number of rows that a ResultSet can contain. |
|
boolean |
getMoreResults()
getMoreResults moves to a Statement's next result. |
|
boolean |
getMoreResults(int current)
Not supported by VORTEXjdbc. |
|
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()
Not supported by VORTEXjdbc. |
|
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. |
|
boolean |
isClosed()
Retrieves whether this Statement object has been closed. |
|
boolean |
isPoolable()
Returns a value indicating whether the Statement is poolable or not. |
|
boolean |
isWrapperFor(java.lang.Class<?> Statement)
|
|
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)
Not supported by VORTEXjdbc. |
|
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)
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 |
setPoolable(boolean poolable)
Not supported by VORTEXjdbc. |
|
void |
setQueryTimeout(int seconds)
The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. |
|
|
unwrap(java.lang.Class<T> Statement)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException
executeQuery
in interface java.sql.Statement
sql
- typically this is a static SQL SELECT statement
java.sql.SQLException
- thrown in the event the dbFetch failspublic int executeUpdate(java.lang.String sql) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
sql
- a SQL INSERT, UPDATE or DELETE statement or a SQL
statement that returns nothing
java.sql.SQLException
- thrown in the event the DB action failspublic int executeUpdate(java.lang.String sql, java.lang.String[] names) throws java.sql.SQLException
Not supported by VORTEXjdbc.
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.
executeUpdate
in interface java.sql.Statement
sql
- a SQL INSERT, UPDATE or DELETE statement or a SQL
statement that returns nothingnames
- 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.
java.sql.SQLException
- thrown in the event the DB action failspublic int executeUpdate(java.lang.String sql, int[] indexes) throws java.sql.SQLException
Not supported by VORTEXjdbc.
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.
executeUpdate
in interface java.sql.Statement
sql
- a SQL INSERT, UPDATE or DELETE statement or a SQL
statement that returns nothingindexes
- 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.
java.sql.SQLException
- thrown in the event the DB action failspublic int executeUpdate(java.lang.String sql, int auto) throws java.sql.SQLException
Not supported by VORTEXjdbc.
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.
executeUpdate
in interface java.sql.Statement
sql
- a SQL INSERT, UPDATE or DELETE statement or a SQL
statement that returns nothingauto
- a flag indicating whether auto-generated keys should be made
available for retrieval. One of Statement.RETURN_GENERATED_KEYS or
Statement.NO_GENERATED_KEYS.
java.sql.SQLException
- thrown in the event the DB action failspublic 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.Statement
java.sql.SQLException
- Not applypublic int getMaxFieldSize() throws java.sql.SQLException
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.
getMaxFieldSize
in interface java.sql.Statement
java.sql.SQLException
- Not applypublic void setMaxFieldSize(int max) throws java.sql.SQLException
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.
setMaxFieldSize
in interface java.sql.Statement
max
- the new max column size limit; zero means unlimited
java.sql.SQLException
- Not applypublic int getMaxRows() throws java.sql.SQLException
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.
getMaxRows
in interface java.sql.Statement
java.sql.SQLException
public void setMaxRows(int max) throws java.sql.SQLException
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.
This does not apply to VORTEXjdbc
setMaxRows
in interface java.sql.Statement
max
- the new max rows limit; zero means unlimited
java.sql.SQLException
- Not applypublic void setEscapeProcessing(boolean enable) throws java.sql.SQLException
If escape scanning is on (the default) the driver will do escape substitution before sending the SQL to the database.
This does not apply to VORTEXjdbc
setEscapeProcessing
in interface java.sql.Statement
enable
- true to enable; false to disable
java.sql.SQLException
- Not applypublic 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.
getQueryTimeout
in interface java.sql.Statement
java.sql.SQLException
- Not applypublic 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.
setQueryTimeout
in interface java.sql.Statement
seconds
- the new query timeout limit in seconds; zero means unlimited
java.sql.SQLException
- Not applypublic void cancel() throws java.sql.SQLException
cancel
in interface java.sql.Statement
java.sql.SQLException
- Not applypublic 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.Statement
java.sql.SQLException
- Not applypublic void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Statement
java.sql.SQLException
- Not applypublic 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.Statement
name
- the new cursor name.
java.sql.SQLException
- Not applypublic java.lang.String getCursorName() throws java.sql.SQLException
java.sql.SQLException
public boolean execute(java.lang.String sql) throws java.sql.SQLException
VORTEXjdbc GENESIS SQL does not support multiple results.
execute
in interface java.sql.Statement
sql
- any SQL statement
java.sql.SQLException
- threw exceptions on all DB actionsgetResultSet()
,
getUpdateCount()
,
getMoreResults(int)
public boolean execute(java.lang.String sql, int auto) throws java.sql.SQLException
Not supported by VORTEXjdbc.
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).
execute
in interface java.sql.Statement
sql
- any SQL statementauto
- 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.
java.sql.SQLException
- threw exceptions on all DB actionsgetResultSet()
,
getUpdateCount()
,
getMoreResults(int)
public boolean execute(java.lang.String sql, int[] indexes) throws java.sql.SQLException
Not supported by VORTEXjdbc.
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).
execute
in interface java.sql.Statement
sql
- any SQL statementindexes
- 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.
java.sql.SQLException
- threw exceptions on all DB actionsgetResultSet()
,
getUpdateCount()
,
getMoreResults(int)
public boolean execute(java.lang.String sql, java.lang.String[] names) throws java.sql.SQLException
Not supported by VORTEXjdbc.
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).
execute
in interface java.sql.Statement
sql
- any SQL statementnames
- 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.
java.sql.SQLException
- threw exceptions on all DB actionsgetResultSet()
,
getUpdateCount()
,
getMoreResults(int)
public java.sql.ResultSet getResultSet() throws java.sql.SQLException
getResultSet
in interface java.sql.Statement
java.sql.SQLException
- Not applyexecute(java.lang.String)
public boolean getMoreResults(int current) throws java.sql.SQLException
Not supported by VORTEXjdbc.
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))
getMoreResults
in interface java.sql.Statement
current
- one of the following: Statement.CLOSE_CURRENT_RESULT,
Statement.KEEP_CURRENT_RESULT, or Statement.CLOSE_ALL_RESULTS.
java.sql.SQLException
- Not applypublic java.sql.ResultSet getGeneratedKeys() throws java.sql.SQLException
Not supported by VORTEXjdbc.
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.
getGeneratedKeys
in interface java.sql.Statement
java.sql.SQLException
- Not applypublic int getResultSetHoldability() throws java.sql.SQLException
Not supported by VORTEXjdbc.
getResultSetHoldability returns the result set holdability.
getResultSetHoldability
in interface java.sql.Statement
java.sql.SQLException
- Not applypublic int getUpdateCount() throws java.sql.SQLException
getUpdateCount
in interface java.sql.Statement
java.sql.SQLException
execute(java.lang.String)
public boolean getMoreResults() throws java.sql.SQLException
getMoreResults
in interface java.sql.Statement
java.sql.SQLException
- throw exception on all DB actionsexecute(java.lang.String)
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.
addBatch
in interface java.sql.Statement
sql
- typically this is a static SQL INSERT or UPDATE statement
java.sql.SQLException
- if the driver does not support batch statementspublic void clearBatch() throws java.sql.SQLException
Not supported by VORTEXjdbc.
Makes the set of commands in the current batch empty. This method is optional.
clearBatch
in interface java.sql.Statement
java.sql.SQLException
- if the driver does not support batch statementspublic int[] executeBatch() throws java.sql.SQLException
Not supported by VORTEXjdbc.
Submits a batch of commands to the database for execution. This method is optional.
executeBatch
in interface java.sql.Statement
java.sql.SQLException
- if the driver does not support batch statementspublic java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface java.sql.Statement
java.sql.SQLException
public int getFetchDirection() throws java.sql.SQLException
getFetchDirection
in interface java.sql.Statement
java.sql.SQLException
public void setFetchSize(int rows) throws java.sql.SQLException
setFetchSize
in interface java.sql.Statement
rows
- the number of rows to fetch
java.sql.SQLException
- if the condition 0 <= rows <= this.getMaxRows()
is not satisfied.public int getFetchSize() throws java.sql.SQLException
getFetchSize
in interface java.sql.Statement
java.sql.SQLException
public int getResultSetConcurrency() throws java.sql.SQLException
getResultSetConcurrency
in interface java.sql.Statement
java.sql.SQLException
public int getResultSetType() throws java.sql.SQLException
getResultSetType
in interface java.sql.Statement
java.sql.SQLException
public void setFetchDirection(int direction) throws java.sql.SQLException
Not supported by VORTEXjdbc.
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.
setFetchDirection
in interface java.sql.Statement
direction
- the initial direction for processing rows
java.sql.SQLException
- if the given direction is not one of
ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or
ResultSet.FETCH_UNKNOWNpublic void finalize()
finalize
in class java.lang.Object
public boolean isWrapperFor(java.lang.Class<?> Statement) throws java.sql.SQLException
isWrapperFor
in interface java.sql.Wrapper
java.sql.SQLException
public <T> T unwrap(java.lang.Class<T> Statement) throws java.sql.SQLException
unwrap
in interface java.sql.Wrapper
java.sql.SQLException
public boolean isClosed() throws java.sql.SQLException
isClosed
in interface java.sql.Statement
java.sql.SQLException
- - if a database access error occurspublic boolean isPoolable() throws java.sql.SQLException
isPoolable
in interface java.sql.Statement
java.sql.SQLException
- - if this method is called on a closed Statementpublic void setPoolable(boolean poolable) throws java.sql.SQLException
Not supported by VORTEXjdbc. Requests that a Statement be pooled or not pooled. The value specified is a hint to the statement pool implementation indicating whether the applicaiton wants the statement to be pooled. It is up to the statement pool manager as to whether the hint is used. The poolable value of a statement is applicable to both internal statement caches implemented by the driver and external statement caches implemented by application servers and other applications. By default, a Statement is not poolable when created, and a PreparedStatement and CallableStatement are poolable when created.
setPoolable
in interface java.sql.Statement
poolable
- requests that the statement be pooled if true and that the statement not be pooled if false
java.sql.SQLException
- - if this method is called on a closed Statement
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |