|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.net.sharenet.ShareNetStatement
public class ShareNetStatement
ShareNetStatement implements java.sql.Statement
Field Summary | |
---|---|
protected ShareNetConnection |
connection
|
protected boolean |
describe
|
protected int |
fetchSize
|
protected int |
maxFieldSize
|
protected static java.lang.String[] |
months
|
protected com.sas.net.sharenet.Tcpmsg |
msg
|
protected ShareNetResultSet |
snresultset
|
Method Summary | |
---|---|
void |
addBatch(java.lang.String sql)
JDBC 2.0 Adds a SQL command to the current batch of commmands for the statement. |
void |
addWarning(java.sql.SQLWarning warning)
Adds a warning to this Statement. |
void |
cancel()
Cancels a query or execute statement. |
void |
clearBatch()
JDBC 2.0 Clears the set of commands in the current batch. |
void |
clearWarnings()
Clears the warnings for this Statement. |
void |
close()
Closes the ShareNetStatement object. |
protected void |
describe()
Open up a new query (select statement). |
protected void |
destroy()
Destroy a query object. |
boolean |
execute(java.lang.String sql)
Executes an SQL statement and indicates the form of the first result. |
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()
JDBC 2.0 Submits a batch of commands to the database for execution. |
java.sql.ResultSet |
executeQuery(java.lang.String query)
Executes an SQL statement that returns a single ResultSet. |
int |
executeUpdate(java.lang.String sql)
Executes an SQL INSERT, UPDATE or DELETE 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.lang.String |
fieldFormat(int i)
Find the type of all the fields in the query. |
java.lang.String[] |
fieldNames()
Find the names of all the fields in the query. |
int |
fieldType(int i)
Find the type of all the fields in the query. |
protected void |
finalize()
Protected method which cleans up state associated with this object. |
protected int |
findFirstString(java.lang.String stmt,
java.lang.String token,
int offset)
|
protected com.sas.net.sharenet.Xhrspa3 |
getAns()
Gets the state of the query. |
java.sql.Connection |
getConnection()
JDBC 2.0 Gets the Connection that produced this Statement. |
int |
getFetchDirection()
JDBC 2.0 Gets the fetch direction for the result set created by this statement. |
int |
getFetchSize()
JDBC 2.0 Gets the number of rows to be fetched. |
java.sql.ResultSet |
getGeneratedKeys()
Retrieves any auto-generated keys created as a result of executing this Statement
object. |
int |
getMaxFieldSize()
Indicates the maximum number of bytes that can be returned for a column. |
int |
getMaxRows()
Indicates the maximum number of rows that can be returned in a ResultSet. |
boolean |
getMoreResults()
Moves to a Statement's next result. |
boolean |
getMoreResults(int current)
The method is not implemented at this time. |
int |
getQueryTimeout()
Indicates the number of seconds the query waits before it times out. |
java.sql.ResultSet |
getResultSet()
Gets the current ResultSet. |
int |
getResultSetConcurrency()
JDBC 2.0 Gets the result set concurrency type CONCUR_READ_ONLY as the resultset is a READ ONLY resultset. |
int |
getResultSetHoldability()
Retrieves the result set holdability for ResultSet objects generated by this
Statement object. |
int |
getResultSetType()
JDBC 2.0 Gets the result set type TYPE_FORWARD_ONLY as scrolling is not supported. |
int |
getUpdateCount()
Returns the current result, which should be an integer value. |
protected com.sas.net.sharenet.SqlFieldArray |
getVars()
Gets the state of the query. |
java.sql.SQLWarning |
getWarnings()
Gets the warnings for this statement. |
protected boolean |
isDescribe()
|
int |
numFields()
Return the number of fields in the query. |
protected void |
prepare(java.lang.String statement)
Open up a new query (select statement). |
protected void |
prepareDescribe(java.lang.String statement)
Open up a new query (select statement). |
void |
setCursorName(java.lang.String name)
Sets the cursor name. |
protected void |
setDescribe(boolean describe)
|
void |
setEscapeProcessing(boolean enable)
Sets escape processing. |
void |
setFetchDirection(int direction)
JDBC 2.0 Gives a hint as to the direction in which the rows in the result set created by this statement will be processed. |
void |
setFetchSize(int rows)
JDBC 2.0 Sets the number of rows to be fetched. |
void |
setMaxFieldSize(int max)
Sets the limit for the number of bytes that can be returned for a column. |
void |
setMaxRows(int max)
Sets the limit for the maximum number of rows that any ResultSet can contain to the given number. |
void |
setQueryTimeout(int seconds)
Sets the query timeout limit. |
protected void |
setVars(com.sas.net.sharenet.SqlFieldArray vars)
Gets the state of the query. |
Field Detail |
---|
protected static java.lang.String[] months
protected int fetchSize
protected com.sas.net.sharenet.Tcpmsg msg
protected int maxFieldSize
protected ShareNetResultSet snresultset
protected ShareNetConnection connection
protected boolean describe
Method Detail |
---|
public java.sql.ResultSet executeQuery(java.lang.String query) throws java.sql.SQLException
executeQuery
in interface java.sql.Statement
query
- Typically this is a static SQL SELECT statement.
java.sql.SQLException
- This exception is thrown if any ShareNetExceptions are detected.public int executeUpdate(java.lang.String sql) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
sql
- An SQL INSERT, UPDATE or DELETE statement.
java.sql.SQLException
- This exception is thrown if any ShareNetExceptions are detected.public void close()
close
in interface java.sql.Statement
public int getMaxFieldSize() throws java.sql.SQLException
getMaxFieldSize
in interface java.sql.Statement
java.sql.SQLException
- This exception is required by the interface, but it is never thrown.public void setMaxFieldSize(int max) throws java.sql.SQLException
setMaxFieldSize
in interface java.sql.Statement
max
- The limit on the number of bytes that can be returned for a column.
java.sql.SQLException
- This exception is thrown if the value of max is less than 0.public int getMaxRows() throws java.sql.SQLException
getMaxRows
in interface java.sql.Statement
java.sql.SQLException
- This exception is required by the interface, but it is never thrown.public void setMaxRows(int max) throws java.sql.SQLException
setMaxRows
in interface java.sql.Statement
max
- The limit on the number rows that can be returned in a ResultSet. zero means unlimited.
java.sql.SQLException
- This exception is thrown if the value of max is less than 0.public void setEscapeProcessing(boolean enable) throws java.sql.SQLException
setEscapeProcessing
in interface java.sql.Statement
enable
- The value for this parameter must be False.
java.sql.SQLException
- This exception is thrown if value of enable is True.public int getQueryTimeout() throws java.sql.SQLException
getQueryTimeout
in interface java.sql.Statement
java.sql.SQLException
- This exception is required by the interface, but it is never thrown.public void setQueryTimeout(int seconds) throws java.sql.SQLException
setQueryTimeout
in interface java.sql.Statement
seconds
- The value of this parameter must be 0. Timeout is currently not supported.
java.sql.SQLException
- This exception is thrown if value of seconds is not equal to 0.public void cancel() throws java.sql.SQLException
cancel
in interface java.sql.Statement
java.sql.SQLException
- This exception may be thrown.public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.Statement
java.sql.SQLException
- This exception is required by the interface, but it is never thrown.public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Statement
java.sql.SQLException
- This exception is required by the interface, but it is never thrown.public void setCursorName(java.lang.String name) throws java.sql.SQLException
setCursorName
in interface java.sql.Statement
name
- The new cursor name.
java.sql.SQLException
- This exception is required by the interface, but it is never thrown.public boolean execute(java.lang.String sql) throws java.sql.SQLException
execute
in interface java.sql.Statement
sql
- An SQL statement.
java.sql.SQLException
- This exception is thrown if a ShareNetException is detectedgetResultSet()
,
getUpdateCount()
,
getMoreResults()
public java.sql.ResultSet getResultSet() throws java.sql.SQLException
getResultSet
in interface java.sql.Statement
java.sql.SQLException
- This exception is required by the interface, but it is never thrown.execute(java.lang.String)
public int getUpdateCount() throws java.sql.SQLException
getUpdateCount
in interface java.sql.Statement
java.sql.SQLException
- This exception is required by the interface, but it is never thrown.execute(java.lang.String)
protected void setDescribe(boolean describe) throws java.sql.SQLException
java.sql.SQLException
protected boolean isDescribe() throws java.sql.SQLException
java.sql.SQLException
public boolean getMoreResults() throws java.sql.SQLException
getMoreResults
in interface java.sql.Statement
java.sql.SQLException
- This exception is required by the interface, but it is never thrown.execute(java.lang.String)
public void setFetchDirection(int direction) throws java.sql.SQLException
setFetchDirection
in interface java.sql.Statement
direction
- An integer indicating the direction in which the rows of
the result set will be processed. Currently supports only FETCH_FORWARD.
java.sql.SQLException
- This exception is thrown if the fetch direction is not FETCH_FORWARD.public int getFetchDirection() throws java.sql.SQLException
getFetchDirection
in interface java.sql.Statement
java.sql.SQLException
- This exception is required by the interface but it is never thrown.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
- This exception is thrown if a database-access error occurs, or 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
- This exception is required by the interface but it is never thrown.public int getResultSetConcurrency() throws java.sql.SQLException
getResultSetConcurrency
in interface java.sql.Statement
java.sql.SQLException
- This exception is required by the interface but it is never thrown.public int getResultSetType() throws java.sql.SQLException
getResultSetType
in interface java.sql.Statement
java.sql.SQLException
- This exception is required by the interface but it is never thrown.public void addBatch(java.lang.String sql) throws java.sql.SQLException
addBatch
in interface java.sql.Statement
sql
- Typically this is a static SQL INSERT or UPDATE statement.
java.sql.SQLException
- This exception is always thrown.public void clearBatch() throws java.sql.SQLException
clearBatch
in interface java.sql.Statement
java.sql.SQLException
- This exception is always thrown.public int[] executeBatch() throws java.sql.SQLException
executeBatch
in interface java.sql.Statement
java.sql.SQLException
- This exception is always thrown.public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface java.sql.Statement
This
- exception is required by the interface but it is never thrown.
java.sql.SQLException
public void addWarning(java.sql.SQLWarning warning)
warning
- The warning to add to this statement.public boolean getMoreResults(int current) throws java.sql.SQLException
Statement
object's next result, dealing with any current
ResultSet
object(s) according to the instructions specified by the given flag.
getMoreResults
in interface java.sql.Statement
current
- a Statement
constants indicating how current ResultSet
objects be dealt with.
java.sql.SQLException
- always thrown. This method is not supported by this driver.public java.sql.ResultSet getGeneratedKeys() throws java.sql.SQLException
Statement
object. If this Statement
object did not generate any keys, an empty
ResultSet
object is returned.
This method is not implemented in this driver.
getGeneratedKeys
in interface java.sql.Statement
java.sql.SQLException
- always thrown.public int executeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
Statement
object should
be made available for retrieval.
This method is not implemented.
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
- always thrown.public int executeUpdate(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
- always thrown.public int executeUpdate(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
- always thrown.public boolean execute(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
- always thrown.public boolean execute(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
- always thrown.public boolean execute(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
- always thrown.public int getResultSetHoldability() throws java.sql.SQLException
ResultSet
objects generated by this
Statement
object.
This method is not implemented.
getResultSetHoldability
in interface java.sql.Statement
java.sql.SQLException
- always thrown.protected int findFirstString(java.lang.String stmt, java.lang.String token, int offset)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- required. Not created in this method.protected void prepareDescribe(java.lang.String statement) throws ShareNetException
statement
- select statement, e.g., "select * from lib.name"
ShareNetException
- if an IOException is detectedprotected void prepare(java.lang.String statement) throws ShareNetException
statement
- select statement, e.g., "select * from lib.name"
ShareNetException
- if an IOException is detectedprotected void describe() throws ShareNetException
ShareNetException
- if an IOException is detectedprotected void destroy() throws ShareNetException
ShareNetException
- if an IOException is detectedpublic int numFields()
public java.lang.String[] fieldNames()
public int fieldType(int i)
public java.lang.String fieldFormat(int i)
protected com.sas.net.sharenet.Xhrspa3 getAns()
ShareNetException
- This exception is never thrown.protected com.sas.net.sharenet.SqlFieldArray getVars()
ShareNetException
- This exception is never thrown.protected void setVars(com.sas.net.sharenet.SqlFieldArray vars)
ShareNetException
- This exception is never thrown.
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |