|
|||||||||
| Home >> All >> org >> jdaemon >> test >> [ sql overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jdaemon.test.sql
Class TestStatement

java.lang.Objectorg.jdaemon.test.sql.TestStatement
- All Implemented Interfaces:
- java.sql.Statement
- public class TestStatement
- extends java.lang.Object
- implements java.sql.Statement
- extends java.lang.Object
Statement object for test database connection Ultimately most operations simply cause output to be written to the parent collection's Log
| Field Summary | |
(package private) java.util.LinkedList |
batch
|
(package private) TestConnection |
parent
|
| 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 | |
TestStatement(TestConnection parent)
Creates a new instance of TestStatement |
|
| Method Summary | |
void |
addBatch(java.lang.String str)
This method adds a SQL statement to a SQL batch. |
void |
cancel()
This method cancels an outstanding statement, if the database supports that operation. |
void |
clearBatch()
This method clears out any SQL statements that have been populated in the current batch. |
void |
clearWarnings()
This method clears any SQL warnings that have been attached to this statement. |
void |
close()
This method closes the statement and frees any associated resources. |
boolean |
execute(java.lang.String str)
This method executes an arbitrary SQL statement of any time. |
boolean |
execute(java.lang.String str,
int i)
|
boolean |
execute(java.lang.String str,
int[] i)
|
boolean |
execute(java.lang.String str,
java.lang.String[] strs)
|
int[] |
executeBatch()
This method executes the SQL batch and returns an array of update counts - one for each SQL statement in the batch - ordered in the same order the statements were added to the batch. |
java.sql.ResultSet |
executeQuery(java.lang.String str)
This method executes the specified SQL SELECT statement and returns a (possibly empty) ResultSet with the results of the query. |
int |
executeUpdate(java.lang.String str)
This method executes the specified SQL INSERT, UPDATE, or DELETE statement and returns the number of rows affected, which may be 0. |
int |
executeUpdate(java.lang.String str,
int i)
|
int |
executeUpdate(java.lang.String str,
int[] i)
|
int |
executeUpdate(java.lang.String str,
java.lang.String[] strs)
|
java.sql.Connection |
getConnection()
This method returns the Connection instance that was
used to create this object. |
int |
getFetchDirection()
This method returns the current direction that the driver thinks the result set will be accessed int. |
int |
getFetchSize()
This method returns the number of rows the driver believes should be fetched from the database at a time. |
java.sql.ResultSet |
getGeneratedKeys()
|
int |
getMaxFieldSize()
This method returns the maximum length of any column value in bytes. |
int |
getMaxRows()
This method returns the maximum possible number of rows in a result set. |
boolean |
getMoreResults()
This method advances the result set pointer to the next result set, which can then be retrieved using getResultSet |
boolean |
getMoreResults(int ind)
|
int |
getQueryTimeout()
The method returns the number of seconds a statement may be in process before timing out. |
java.sql.ResultSet |
getResultSet()
This method returns the result set of the SQL statement that was executed. |
int |
getResultSetConcurrency()
This method returns the concurrency type of the result set for this statement. |
int |
getResultSetHoldability()
|
int |
getResultSetType()
This method returns the result set type for this statement. |
int |
getUpdateCount()
This method returns the update count of the SQL statement that was executed. |
java.sql.SQLWarning |
getWarnings()
This method returns the first SQL warning attached to this statement. |
void |
setCursorName(java.lang.String str)
This method sets the cursor name that will be used by the result set. |
void |
setEscapeProcessing(boolean param)
This method sets the local escape processing mode on or off. |
void |
setFetchDirection(int param)
This method informs the driver which direction the result set will be accessed in. |
void |
setFetchSize(int param)
This method informs the driver how many rows it should fetch from the database at a time. |
void |
setMaxFieldSize(int param)
This method sets the limit for the maximum length of any column in bytes. |
void |
setMaxRows(int param)
This method sets the maximum number of rows that can be present in a result set. |
void |
setQueryTimeout(int param)
This method sets the number of seconds a statement may be in process before timing out. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
parent
TestConnection parent
batch
java.util.LinkedList batch
| Constructor Detail |
TestStatement
public TestStatement(TestConnection parent)
- Creates a new instance of TestStatement
| Method Detail |
getGeneratedKeys
public java.sql.ResultSet getGeneratedKeys()
- Specified by:
getGeneratedKeysin interfacejava.sql.Statement
executeUpdate
public int executeUpdate(java.lang.String str, int i)
- Specified by:
executeUpdatein interfacejava.sql.Statement
executeUpdate
public int executeUpdate(java.lang.String str, int[] i)
- Specified by:
executeUpdatein interfacejava.sql.Statement
executeUpdate
public int executeUpdate(java.lang.String str, java.lang.String[] strs)
- Specified by:
executeUpdatein interfacejava.sql.Statement
execute
public boolean execute(java.lang.String str, int i)
- Specified by:
executein interfacejava.sql.Statement
execute
public boolean execute(java.lang.String str, int[] i)
- Specified by:
executein interfacejava.sql.Statement
execute
public boolean execute(java.lang.String str, java.lang.String[] strs)
- Specified by:
executein interfacejava.sql.Statement
getResultSetHoldability
public int getResultSetHoldability()
- Specified by:
getResultSetHoldabilityin interfacejava.sql.Statement
addBatch
public void addBatch(java.lang.String str) throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method adds a SQL statement to a SQL batch. A driver is not
required to implement this method.
- Specified by:
addBatchin interfacejava.sql.Statement
cancel
public void cancel()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method cancels an outstanding statement, if the database supports
that operation.
- Specified by:
cancelin interfacejava.sql.Statement
clearBatch
public void clearBatch()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method clears out any SQL statements that have been populated in
the current batch. A driver is not required to implement this method.
- Specified by:
clearBatchin interfacejava.sql.Statement
clearWarnings
public void clearWarnings()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method clears any SQL warnings that have been attached to this
statement.
- Specified by:
clearWarningsin interfacejava.sql.Statement
close
public void close()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method closes the statement and frees any associated resources.
- Specified by:
closein interfacejava.sql.Statement
execute
public boolean execute(java.lang.String str) throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method executes an arbitrary SQL statement of any time. The
methods
getResultSet,getMoreResultsandgetUpdateCountretrieve the results.- Specified by:
executein interfacejava.sql.Statement
executeBatch
public int[] executeBatch()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method executes the SQL batch and returns an array of update
counts - one for each SQL statement in the batch - ordered in the same
order the statements were added to the batch. A driver is not required
to implement this method.
- Specified by:
executeBatchin interfacejava.sql.Statement
executeQuery
public java.sql.ResultSet executeQuery(java.lang.String str) throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method executes the specified SQL SELECT statement and returns a
(possibly empty)
ResultSetwith the results of the query.- Specified by:
executeQueryin interfacejava.sql.Statement
executeUpdate
public int executeUpdate(java.lang.String str) throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method executes the specified SQL INSERT, UPDATE, or DELETE statement
and returns the number of rows affected, which may be 0.
- Specified by:
executeUpdatein interfacejava.sql.Statement
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the
Connectioninstance that was used to create this object.- Specified by:
getConnectionin interfacejava.sql.Statement
getFetchDirection
public int getFetchDirection()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the current direction that the driver thinks the
result set will be accessed int.
- Specified by:
getFetchDirectionin interfacejava.sql.Statement
getFetchSize
public int getFetchSize()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the number of rows the driver believes should be
fetched from the database at a time.
- Specified by:
getFetchSizein interfacejava.sql.Statement
getMaxFieldSize
public int getMaxFieldSize()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the maximum length of any column value in bytes.
- Specified by:
getMaxFieldSizein interfacejava.sql.Statement
getMaxRows
public int getMaxRows()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the maximum possible number of rows in a result set.
- Specified by:
getMaxRowsin interfacejava.sql.Statement
getMoreResults
public boolean getMoreResults()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method advances the result set pointer to the next result set,
which can then be retrieved using
getResultSet- Specified by:
getMoreResultsin interfacejava.sql.Statement
getQueryTimeout
public int getQueryTimeout()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - The method returns the number of seconds a statement may be in process
before timing out. A value of 0 means there is no timeout.
- Specified by:
getQueryTimeoutin interfacejava.sql.Statement
getResultSet
public java.sql.ResultSet getResultSet() throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the result set of the SQL statement that was
executed. This should be called only once per result set returned.
- Specified by:
getResultSetin interfacejava.sql.Statement
getMoreResults
public boolean getMoreResults(int ind)
throws java.sql.SQLException
- Specified by:
getMoreResultsin interfacejava.sql.Statement
getResultSetConcurrency
public int getResultSetConcurrency()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the concurrency type of the result set for this
statement. This will be one of the concurrency types defined in
ResultSet.- Specified by:
getResultSetConcurrencyin interfacejava.sql.Statement
getResultSetType
public int getResultSetType()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the result set type for this statement. This will
be one of the result set types defined in
ResultSet.- Specified by:
getResultSetTypein interfacejava.sql.Statement
getUpdateCount
public int getUpdateCount()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the update count of the SQL statement that was
executed. This should be called only once per executed SQL statement.
- Specified by:
getUpdateCountin interfacejava.sql.Statement
getWarnings
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the first SQL warning attached to this statement.
Subsequent warnings will be chained to this one.
- Specified by:
getWarningsin interfacejava.sql.Statement
setCursorName
public void setCursorName(java.lang.String str) throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method sets the cursor name that will be used by the result set.
- Specified by:
setCursorNamein interfacejava.sql.Statement
setEscapeProcessing
public void setEscapeProcessing(boolean param)
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method sets the local escape processing mode on or off. The
default value is on.
- Specified by:
setEscapeProcessingin interfacejava.sql.Statement
setFetchDirection
public void setFetchDirection(int param)
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method informs the driver which direction the result set will
be accessed in.
- Specified by:
setFetchDirectionin interfacejava.sql.Statement
setFetchSize
public void setFetchSize(int param)
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method informs the driver how many rows it should fetch from the
database at a time.
- Specified by:
setFetchSizein interfacejava.sql.Statement
setMaxFieldSize
public void setMaxFieldSize(int param)
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method sets the limit for the maximum length of any column in bytes.
- Specified by:
setMaxFieldSizein interfacejava.sql.Statement
setMaxRows
public void setMaxRows(int param)
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method sets the maximum number of rows that can be present in a
result set.
- Specified by:
setMaxRowsin interfacejava.sql.Statement
setQueryTimeout
public void setQueryTimeout(int param)
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method sets the number of seconds a statement may be in process
before timing out. A value of 0 means there is no timeout.
- Specified by:
setQueryTimeoutin interfacejava.sql.Statement
|
|||||||||
| Home >> All >> org >> jdaemon >> test >> [ sql overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.jdaemon.test.sql.TestStatement