|
|||||||||
| Home >> All >> com >> mockobjects >> [ sql overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.mockobjects.sql
Class CommonMockPreparedStatement

java.lang.Objectcom.mockobjects.MockObject
com.mockobjects.sql.CommonMockStatement
com.mockobjects.sql.CommonMockPreparedStatement
- All Implemented Interfaces:
- java.sql.PreparedStatement, java.sql.Statement, com.mockobjects.Verifiable
- Direct Known Subclasses:
- CommonMockCallableStatement, MockPreparedStatement
- abstract class CommonMockPreparedStatement
- extends CommonMockStatement
- implements java.sql.PreparedStatement
- extends CommonMockStatement
Abstract PreparedStatement for use with mock testing. If a notImplemented method is are needed for your project, please submit a patch.
- Version:
- $Revision: 1.4 $ $Date: 2003/04/23 11:52:46 $
| Field Summary | |
private com.mockobjects.ReturnObjectList |
executeUpdates
|
private com.mockobjects.ExpectationCounter |
myClearParametersCalls
|
protected com.mockobjects.ExpectationCounter |
myCloseCalls
|
private com.mockobjects.ReturnObjectList |
myResultSets
|
private com.mockobjects.ExpectationSet |
mySetParameters
|
private com.mockobjects.ExpectationSet |
myTargetSQLTypes
|
| 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 | |
(package private) |
CommonMockPreparedStatement()
|
| Method Summary | |
void |
addBatch()
Calls notImplemented. |
void |
addBatch(java.lang.String sql)
This method adds a SQL statement to a SQL batch. |
void |
addExpectedExecute(java.lang.String queryString,
boolean success)
|
void |
addExpectedExecuteQuery(java.lang.String queryString,
java.sql.ResultSet resultSet)
|
void |
addExpectedExecuteUpdate(java.lang.String queryString,
int updateCount)
|
void |
addExpectedSetParameter(int parameterIndex,
int intValue)
|
void |
addExpectedSetParameter(int parameterIndex,
java.lang.Object parameterValue)
|
void |
addExpectedSetParameters(java.lang.Object[] parameters)
|
void |
addExpectedTargetSQLType(int aTargetSQLType)
|
void |
addResultSet(MockResultSet aResultSet)
|
void |
addUpdateCount(int count)
Added value to be returned by executeUpdate() |
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 |
clearParameters()
This method clears all of the input parameter that have been set on this statement. |
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()
Calls innerExecute() (see CommonMockStatement). |
boolean |
execute(java.lang.String sql)
This method executes an arbitrary SQL statement of any time. |
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()
Returns executeQuery(String) with an empty String. |
java.sql.ResultSet |
executeQuery(java.lang.String sql)
This method executes the specified SQL SELECT statement and returns a (possibly empty) ResultSet with the results of the query. |
int |
executeUpdate()
Returns value set with addUpdateCount |
int |
executeUpdate(java.lang.String sql)
This method executes the specified SQL INSERT, UPDATE, or DELETE statement and returns the number of rows affected, which may be 0. |
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. |
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. |
java.sql.ResultSetMetaData |
getMetaData()
Calls notImplemented. |
boolean |
getMoreResults()
This method advances the result set pointer to the next result set, which can then be retrieved using getResultSet |
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 |
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. |
protected void |
innerExecute()
|
void |
setArray(int param,
java.sql.Array array)
This method sets the specified parameter from the given Java Array value. |
void |
setAsciiStream(int param,
java.io.InputStream inputStream,
int length)
Calls notImplemented. |
void |
setBigDecimal(int param,
java.math.BigDecimal bigDecimal)
This method sets the specified parameter from the given Java java.math.BigDecimal value. |
void |
setBinaryStream(int param,
java.io.InputStream inputStream,
int length)
Calls notImplemented. |
void |
setBlob(int param,
java.sql.Blob blob)
This method sets the specified parameter from the given Java Blob value. |
void |
setBoolean(int param,
boolean aBoolean)
This method sets the specified parameter from the given Java boolean value. |
void |
setByte(int param,
byte aByte)
This method sets the specified parameter from the given Java byte value. |
void |
setBytes(int param,
byte[] values)
This method sets the specified parameter from the given Java byte array value. |
void |
setCharacterStream(int param,
java.io.Reader reader,
int length)
Calls notImplemented. |
void |
setClob(int param,
java.sql.Clob clob)
This method sets the specified parameter from the given Java Clob value. |
void |
setCursorName(java.lang.String name)
This method sets the cursor name that will be used by the result set. |
void |
setDate(int param,
java.sql.Date date)
This method sets the specified parameter from the given Java java.sql.Date value. |
void |
setDate(int param,
java.sql.Date date,
java.util.Calendar calendar)
This method sets the specified parameter from the given Java java.sql.Date value. |
void |
setDouble(int param,
double aDouble)
This method sets the specified parameter from the given Java double value. |
void |
setEscapeProcessing(boolean enable)
This method sets the local escape processing mode on or off. |
void |
setExpectedClearParametersCalls(int callCount)
|
void |
setExpectedCloseCalls(int callCount)
|
void |
setExpectingNoSetParameters()
|
void |
setFetchDirection(int direction)
This method informs the driver which direction the result set will be accessed in. |
void |
setFetchSize(int rows)
This method informs the driver how many rows it should fetch from the database at a time. |
void |
setFloat(int param,
float aFloat)
This method sets the specified parameter from the given Java float value. |
void |
setInt(int parameterIndex,
int x)
This method sets the specified parameter from the given Java int value. |
void |
setLong(int param,
long aLong)
This method sets the specified parameter from the given Java long value. |
void |
setMaxFieldSize(int max)
This method sets the limit for the maximum length of any column in bytes. |
void |
setMaxRows(int max)
This method sets the maximum number of rows that can be present in a result set. |
void |
setNull(int param,
int param1)
This method populates the specified parameter with a SQL NULL value for the specified type. |
void |
setNull(int param,
int param1,
java.lang.String typeName)
Calls notImplemented. |
void |
setObject(int param,
java.lang.Object anObject)
This method sets the specified parameter from the given Java Object value. |
void |
setObject(int param,
java.lang.Object anObject,
int aTargetSQLType)
This method sets the specified parameter from the given Java Object value. |
void |
setObject(int param,
java.lang.Object anObject,
int targetSqlType,
int scale)
Calls notImplemented. |
void |
setQueryTimeout(int seconds)
This method sets the number of seconds a statement may be in process before timing out. |
void |
setRef(int param,
java.sql.Ref ref)
This method sets the specified parameter from the given Java Ref value. |
void |
setShort(int param,
short aShort)
This method sets the specified parameter from the given Java short value. |
void |
setString(int parameterIndex,
java.lang.String x)
This method sets the specified parameter from the given Java String value. |
void |
setTime(int param,
java.sql.Time time)
This method sets the specified parameter from the given Java java.sql.Time value. |
void |
setTime(int param,
java.sql.Time time,
java.util.Calendar calendar)
This method sets the specified parameter from the given Java java.sql.Time value. |
void |
setTimestamp(int param,
java.sql.Timestamp timestamp)
This method sets the specified parameter from the given Java java.sql.Timestamp value. |
void |
setTimestamp(int param,
java.sql.Timestamp timestamp,
java.util.Calendar calendar)
Calls notImplemented. |
void |
setUnicodeStream(int param,
java.io.InputStream inputStream,
int length)
Calls notImplemented. |
void |
setupConnection(java.sql.Connection conn)
|
void |
setupThrowExceptionOnExecute(java.sql.SQLException exception)
|
void |
setupUpdateCount(int updateCount)
|
| Methods inherited from class com.mockobjects.MockObject |
assertEquals, assertEquals, assertTrue, fail, notImplemented, notYetImplemented, notYetImplemented, verify |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.sql.PreparedStatement |
getParameterMetaData, setURL |
| Field Detail |
mySetParameters
private com.mockobjects.ExpectationSet mySetParameters
myClearParametersCalls
private com.mockobjects.ExpectationCounter myClearParametersCalls
myTargetSQLTypes
private com.mockobjects.ExpectationSet myTargetSQLTypes
myResultSets
private final com.mockobjects.ReturnObjectList myResultSets
executeUpdates
private final com.mockobjects.ReturnObjectList executeUpdates
myCloseCalls
protected final com.mockobjects.ExpectationCounter myCloseCalls
| Constructor Detail |
CommonMockPreparedStatement
CommonMockPreparedStatement()
| Method Detail |
addResultSet
public void addResultSet(MockResultSet aResultSet)
addExpectedSetParameter
public void addExpectedSetParameter(int parameterIndex,
int intValue)
addExpectedSetParameter
public void addExpectedSetParameter(int parameterIndex,
java.lang.Object parameterValue)
addExpectedSetParameters
public void addExpectedSetParameters(java.lang.Object[] parameters)
addExpectedTargetSQLType
public void addExpectedTargetSQLType(int aTargetSQLType)
setExpectedClearParametersCalls
public void setExpectedClearParametersCalls(int callCount)
setExpectingNoSetParameters
public void setExpectingNoSetParameters()
clearParameters
public void clearParameters()
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method clears all of the input parameter that have been
set on this statement.
- Specified by:
clearParametersin interfacejava.sql.PreparedStatement
execute
public boolean execute()
throws java.sql.SQLException
- Calls innerExecute() (see CommonMockStatement). Returns false.
- Specified by:
executein interfacejava.sql.PreparedStatement
executeQuery
public java.sql.ResultSet executeQuery() throws java.sql.SQLException
- Returns executeQuery(String) with an empty String.
- Specified by:
executeQueryin interfacejava.sql.PreparedStatement
addUpdateCount
public void addUpdateCount(int count)
- Added value to be returned by executeUpdate()
executeUpdate
public int executeUpdate()
throws java.sql.SQLException
- Returns value set with addUpdateCount
- Specified by:
executeUpdatein interfacejava.sql.PreparedStatement
setInt
public void setInt(int parameterIndex,
int x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
intvalue.- Specified by:
setIntin interfacejava.sql.PreparedStatement
setString
public void setString(int parameterIndex,
java.lang.String x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Stringvalue.- Specified by:
setStringin interfacejava.sql.PreparedStatement
setTimestamp
public void setTimestamp(int param,
java.sql.Timestamp timestamp)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
java.sql.Timestampvalue.- Specified by:
setTimestampin interfacejava.sql.PreparedStatement
setClob
public void setClob(int param,
java.sql.Clob clob)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Clobvalue. The default object type to SQL type mapping will be used.- Specified by:
setClobin interfacejava.sql.PreparedStatement
setLong
public void setLong(int param,
long aLong)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
longvalue.- Specified by:
setLongin interfacejava.sql.PreparedStatement
setNull
public void setNull(int param,
int param1)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method populates the specified parameter with a SQL NULL value
for the specified type.
- Specified by:
setNullin interfacejava.sql.PreparedStatement
setArray
public void setArray(int param,
java.sql.Array array)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Arrayvalue. The default object type to SQL type mapping will be used.- Specified by:
setArrayin interfacejava.sql.PreparedStatement
setShort
public void setShort(int param,
short aShort)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
shortvalue.- Specified by:
setShortin interfacejava.sql.PreparedStatement
setTime
public void setTime(int param,
java.sql.Time time,
java.util.Calendar calendar)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
java.sql.Timevalue.- Specified by:
setTimein interfacejava.sql.PreparedStatement
setObject
public void setObject(int param,
java.lang.Object anObject,
int aTargetSQLType)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Objectvalue. The specified SQL object type will be used.- Specified by:
setObjectin interfacejava.sql.PreparedStatement
setRef
public void setRef(int param,
java.sql.Ref ref)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Refvalue. The default object type to SQL type mapping will be used.- Specified by:
setRefin interfacejava.sql.PreparedStatement
setDate
public void setDate(int param,
java.sql.Date date)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
java.sql.Datevalue.- Specified by:
setDatein interfacejava.sql.PreparedStatement
setFloat
public void setFloat(int param,
float aFloat)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
floatvalue.- Specified by:
setFloatin interfacejava.sql.PreparedStatement
setBlob
public void setBlob(int param,
java.sql.Blob blob)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Blobvalue. The default object type to SQL type mapping will be used.- Specified by:
setBlobin interfacejava.sql.PreparedStatement
setDate
public void setDate(int param,
java.sql.Date date,
java.util.Calendar calendar)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
java.sql.Datevalue.- Specified by:
setDatein interfacejava.sql.PreparedStatement
setBytes
public void setBytes(int param,
byte[] values)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
bytearray value.- Specified by:
setBytesin interfacejava.sql.PreparedStatement
setObject
public void setObject(int param,
java.lang.Object anObject)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Objectvalue. The default object type to SQL type mapping will be used.- Specified by:
setObjectin interfacejava.sql.PreparedStatement
setByte
public void setByte(int param,
byte aByte)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
bytevalue.- Specified by:
setBytein interfacejava.sql.PreparedStatement
setDouble
public void setDouble(int param,
double aDouble)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
doublevalue.- Specified by:
setDoublein interfacejava.sql.PreparedStatement
setTime
public void setTime(int param,
java.sql.Time time)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
java.sql.Timevalue.- Specified by:
setTimein interfacejava.sql.PreparedStatement
setBoolean
public void setBoolean(int param,
boolean aBoolean)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
booleanvalue.- Specified by:
setBooleanin interfacejava.sql.PreparedStatement
setBigDecimal
public void setBigDecimal(int param,
java.math.BigDecimal bigDecimal)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
java.math.BigDecimalvalue.- Specified by:
setBigDecimalin interfacejava.sql.PreparedStatement
addBatch
public void addBatch()
throws java.sql.SQLException
- Calls notImplemented.
- Specified by:
addBatchin interfacejava.sql.PreparedStatement
setObject
public void setObject(int param,
java.lang.Object anObject,
int targetSqlType,
int scale)
throws java.sql.SQLException
- Calls notImplemented.
- Specified by:
setObjectin interfacejava.sql.PreparedStatement
setCharacterStream
public void setCharacterStream(int param,
java.io.Reader reader,
int length)
throws java.sql.SQLException
- Calls notImplemented.
- Specified by:
setCharacterStreamin interfacejava.sql.PreparedStatement
setAsciiStream
public void setAsciiStream(int param,
java.io.InputStream inputStream,
int length)
throws java.sql.SQLException
- Calls notImplemented.
- Specified by:
setAsciiStreamin interfacejava.sql.PreparedStatement
setBinaryStream
public void setBinaryStream(int param,
java.io.InputStream inputStream,
int length)
throws java.sql.SQLException
- Calls notImplemented.
- Specified by:
setBinaryStreamin interfacejava.sql.PreparedStatement
setNull
public void setNull(int param,
int param1,
java.lang.String typeName)
throws java.sql.SQLException
- Calls notImplemented.
- Specified by:
setNullin interfacejava.sql.PreparedStatement
setUnicodeStream
public void setUnicodeStream(int param,
java.io.InputStream inputStream,
int length)
throws java.sql.SQLException
- Calls notImplemented.
- Specified by:
setUnicodeStreamin interfacejava.sql.PreparedStatement
getMetaData
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException
- Calls notImplemented. Returns null.
- Specified by:
getMetaDatain interfacejava.sql.PreparedStatement
setTimestamp
public void setTimestamp(int param,
java.sql.Timestamp timestamp,
java.util.Calendar calendar)
throws java.sql.SQLException
- Calls notImplemented.
- Specified by:
setTimestampin interfacejava.sql.PreparedStatement
addExpectedExecuteQuery
public void addExpectedExecuteQuery(java.lang.String queryString, java.sql.ResultSet resultSet)
addExpectedExecuteUpdate
public void addExpectedExecuteUpdate(java.lang.String queryString, int updateCount)
addExpectedExecute
public void addExpectedExecute(java.lang.String queryString, boolean success)
setExpectedCloseCalls
public void setExpectedCloseCalls(int callCount)
setupConnection
public void setupConnection(java.sql.Connection conn)
setupThrowExceptionOnExecute
public void setupThrowExceptionOnExecute(java.sql.SQLException exception)
setupUpdateCount
public void setupUpdateCount(int updateCount)
innerExecute
protected void innerExecute()
throws java.sql.SQLException
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 sql) 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
executeQuery
public java.sql.ResultSet executeQuery(java.lang.String sql) 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 sql) 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
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
setMaxFieldSize
public void setMaxFieldSize(int max)
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
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
setMaxRows
public void setMaxRows(int max)
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
setEscapeProcessing
public void setEscapeProcessing(boolean enable)
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
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
setQueryTimeout
public void setQueryTimeout(int seconds)
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
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
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
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
setCursorName
public void setCursorName(java.lang.String name) 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
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
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
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
setFetchDirection
public void setFetchDirection(int direction)
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
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
setFetchSize
public void setFetchSize(int rows)
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
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
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
addBatch
public void addBatch(java.lang.String sql) 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
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
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
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
|
|||||||||
| Home >> All >> com >> mockobjects >> [ sql overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC