|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mockobjects.MockObject com.mockobjects.sql.CommonMockStatement com.mockobjects.sql.CommonMockPreparedStatement com.mockobjects.sql.MockPreparedStatement
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 |
Constructor Summary | |
MockPreparedStatement()
|
Method Summary | |
void |
addBatch()
Calls notImplemented. |
void |
addBatch(java.lang.String sql)
|
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(com.mockobjects.sql.MockResultSet aResultSet)
|
void |
addUpdateCount(int count)
Added value to be returned by executeUpdate() |
void |
cancel()
|
void |
clearBatch()
|
void |
clearParameters()
|
void |
clearWarnings()
|
void |
close()
|
boolean |
execute()
Calls innerExecute() (see CommonMockStatement). |
boolean |
execute(java.lang.String sql)
|
int[] |
executeBatch()
|
java.sql.ResultSet |
executeQuery()
Returns executeQuery(String) with an empty String. |
java.sql.ResultSet |
executeQuery(java.lang.String sql)
|
int |
executeUpdate()
Returns value set with addUpdateCount |
int |
executeUpdate(java.lang.String sql)
|
java.sql.Connection |
getConnection()
|
int |
getFetchDirection()
|
int |
getFetchSize()
|
int |
getMaxFieldSize()
|
int |
getMaxRows()
|
java.sql.ResultSetMetaData |
getMetaData()
Calls notImplemented. |
boolean |
getMoreResults()
|
int |
getQueryTimeout()
|
java.sql.ResultSet |
getResultSet()
|
int |
getResultSetConcurrency()
|
int |
getResultSetType()
|
int |
getUpdateCount()
|
java.sql.SQLWarning |
getWarnings()
|
void |
setArray(int param,
java.sql.Array array)
|
void |
setAsciiStream(int param,
java.io.InputStream inputStream,
int length)
Calls notImplemented. |
void |
setBigDecimal(int param,
java.math.BigDecimal bigDecimal)
|
void |
setBinaryStream(int param,
java.io.InputStream inputStream,
int length)
Calls notImplemented. |
void |
setBlob(int param,
java.sql.Blob blob)
|
void |
setBoolean(int param,
boolean aBoolean)
|
void |
setByte(int param,
byte aByte)
|
void |
setBytes(int param,
byte[] values)
|
void |
setCharacterStream(int param,
java.io.Reader reader,
int length)
Calls notImplemented. |
void |
setClob(int param,
java.sql.Clob clob)
|
void |
setCursorName(java.lang.String name)
|
void |
setDate(int param,
java.sql.Date date)
|
void |
setDate(int param,
java.sql.Date date,
java.util.Calendar calendar)
|
void |
setDouble(int param,
double aDouble)
|
void |
setEscapeProcessing(boolean enable)
|
void |
setExpectedClearParametersCalls(int callCount)
|
void |
setExpectedCloseCalls(int callCount)
|
void |
setExpectingNoSetParameters()
|
void |
setFetchDirection(int direction)
|
void |
setFetchSize(int rows)
|
void |
setFloat(int param,
float aFloat)
|
void |
setInt(int parameterIndex,
int x)
|
void |
setLong(int param,
long aLong)
|
void |
setMaxFieldSize(int max)
|
void |
setMaxRows(int max)
|
void |
setNull(int param,
int param1)
|
void |
setNull(int param,
int param1,
java.lang.String typeName)
Calls notImplemented. |
void |
setObject(int param,
java.lang.Object anObject)
|
void |
setObject(int param,
java.lang.Object anObject,
int aTargetSQLType)
|
void |
setObject(int param,
java.lang.Object anObject,
int targetSqlType,
int scale)
Calls notImplemented. |
void |
setQueryTimeout(int seconds)
|
void |
setRef(int param,
java.sql.Ref ref)
|
void |
setShort(int param,
short aShort)
|
void |
setString(int parameterIndex,
java.lang.String x)
|
void |
setTime(int param,
java.sql.Time time)
|
void |
setTime(int param,
java.sql.Time time,
java.util.Calendar calendar)
|
void |
setTimestamp(int param,
java.sql.Timestamp timestamp)
|
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 |
notImplemented, notYetImplemented, verify |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.sql.PreparedStatement |
getParameterMetaData, setURL |
Methods inherited from interface java.sql.Statement |
addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout |
Constructor Detail |
public MockPreparedStatement()
Method Detail |
public void addResultSet(com.mockobjects.sql.MockResultSet aResultSet)
public void addExpectedSetParameter(int parameterIndex, int intValue)
public void addExpectedSetParameter(int parameterIndex, java.lang.Object parameterValue)
public void addExpectedSetParameters(java.lang.Object[] parameters)
public void addExpectedTargetSQLType(int aTargetSQLType)
public void setExpectedClearParametersCalls(int callCount)
public void setExpectingNoSetParameters()
public void clearParameters() throws java.sql.SQLException
clearParameters
in interface java.sql.PreparedStatement
java.sql.SQLException
public boolean execute() throws java.sql.SQLException
execute
in interface java.sql.PreparedStatement
java.sql.SQLException
public java.sql.ResultSet executeQuery() throws java.sql.SQLException
executeQuery
in interface java.sql.PreparedStatement
java.sql.SQLException
public void addUpdateCount(int count)
count
- CommonMockPreparedStatement.executeUpdate()
public int executeUpdate() throws java.sql.SQLException
executeUpdate
in interface java.sql.PreparedStatement
java.sql.SQLException
CommonMockPreparedStatement.addUpdateCount(int)
public void setInt(int parameterIndex, int x) throws java.sql.SQLException
setInt
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setString(int parameterIndex, java.lang.String x) throws java.sql.SQLException
setString
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setTimestamp(int param, java.sql.Timestamp timestamp) throws java.sql.SQLException
setTimestamp
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setClob(int param, java.sql.Clob clob) throws java.sql.SQLException
setClob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setLong(int param, long aLong) throws java.sql.SQLException
setLong
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNull(int param, int param1) throws java.sql.SQLException
setNull
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setArray(int param, java.sql.Array array) throws java.sql.SQLException
setArray
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setShort(int param, short aShort) throws java.sql.SQLException
setShort
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setTime(int param, java.sql.Time time, java.util.Calendar calendar) throws java.sql.SQLException
setTime
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setObject(int param, java.lang.Object anObject, int aTargetSQLType) throws java.sql.SQLException
setObject
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setRef(int param, java.sql.Ref ref) throws java.sql.SQLException
setRef
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setDate(int param, java.sql.Date date) throws java.sql.SQLException
setDate
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setFloat(int param, float aFloat) throws java.sql.SQLException
setFloat
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBlob(int param, java.sql.Blob blob) throws java.sql.SQLException
setBlob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setDate(int param, java.sql.Date date, java.util.Calendar calendar) throws java.sql.SQLException
setDate
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBytes(int param, byte[] values) throws java.sql.SQLException
setBytes
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setObject(int param, java.lang.Object anObject) throws java.sql.SQLException
setObject
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setByte(int param, byte aByte) throws java.sql.SQLException
setByte
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setDouble(int param, double aDouble) throws java.sql.SQLException
setDouble
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setTime(int param, java.sql.Time time) throws java.sql.SQLException
setTime
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBoolean(int param, boolean aBoolean) throws java.sql.SQLException
setBoolean
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBigDecimal(int param, java.math.BigDecimal bigDecimal) throws java.sql.SQLException
setBigDecimal
in interface java.sql.PreparedStatement
java.sql.SQLException
public void addBatch() throws java.sql.SQLException
addBatch
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setObject(int param, java.lang.Object anObject, int targetSqlType, int scale) throws java.sql.SQLException
setObject
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setCharacterStream(int param, java.io.Reader reader, int length) throws java.sql.SQLException
setCharacterStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setAsciiStream(int param, java.io.InputStream inputStream, int length) throws java.sql.SQLException
setAsciiStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBinaryStream(int param, java.io.InputStream inputStream, int length) throws java.sql.SQLException
setBinaryStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNull(int param, int param1, java.lang.String typeName) throws java.sql.SQLException
setNull
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setUnicodeStream(int param, java.io.InputStream inputStream, int length) throws java.sql.SQLException
setUnicodeStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException
getMetaData
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setTimestamp(int param, java.sql.Timestamp timestamp, java.util.Calendar calendar) throws java.sql.SQLException
setTimestamp
in interface java.sql.PreparedStatement
java.sql.SQLException
public void addExpectedExecuteQuery(java.lang.String queryString, java.sql.ResultSet resultSet)
public void addExpectedExecuteUpdate(java.lang.String queryString, int updateCount)
public void addExpectedExecute(java.lang.String queryString, boolean success)
public void setExpectedCloseCalls(int callCount)
public void setupConnection(java.sql.Connection conn)
public void setupThrowExceptionOnExecute(java.sql.SQLException exception)
public void setupUpdateCount(int updateCount)
public void close() throws java.sql.SQLException
close
in interface java.sql.Statement
java.sql.SQLException
public boolean execute(java.lang.String sql) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
public java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException
executeQuery
in interface java.sql.Statement
java.sql.SQLException
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
public int getMaxFieldSize() throws java.sql.SQLException
getMaxFieldSize
in interface java.sql.Statement
java.sql.SQLException
public void setMaxFieldSize(int max) throws java.sql.SQLException
setMaxFieldSize
in interface java.sql.Statement
java.sql.SQLException
public int getMaxRows() throws java.sql.SQLException
getMaxRows
in interface java.sql.Statement
java.sql.SQLException
public void setMaxRows(int max) throws java.sql.SQLException
setMaxRows
in interface java.sql.Statement
java.sql.SQLException
public void setEscapeProcessing(boolean enable) throws java.sql.SQLException
setEscapeProcessing
in interface java.sql.Statement
java.sql.SQLException
public int getQueryTimeout() throws java.sql.SQLException
getQueryTimeout
in interface java.sql.Statement
java.sql.SQLException
public void setQueryTimeout(int seconds) throws java.sql.SQLException
setQueryTimeout
in interface java.sql.Statement
java.sql.SQLException
public void cancel() throws java.sql.SQLException
cancel
in interface java.sql.Statement
java.sql.SQLException
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.Statement
java.sql.SQLException
public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Statement
java.sql.SQLException
public void setCursorName(java.lang.String name) throws java.sql.SQLException
setCursorName
in interface java.sql.Statement
java.sql.SQLException
public java.sql.ResultSet getResultSet() throws java.sql.SQLException
getResultSet
in interface java.sql.Statement
java.sql.SQLException
public int getUpdateCount() throws java.sql.SQLException
getUpdateCount
in interface java.sql.Statement
java.sql.SQLException
public boolean getMoreResults() throws java.sql.SQLException
getMoreResults
in interface java.sql.Statement
java.sql.SQLException
public void setFetchDirection(int direction) throws java.sql.SQLException
setFetchDirection
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
java.sql.SQLException
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 addBatch(java.lang.String sql) throws java.sql.SQLException
addBatch
in interface java.sql.Statement
java.sql.SQLException
public void clearBatch() throws java.sql.SQLException
clearBatch
in interface java.sql.Statement
java.sql.SQLException
public int[] executeBatch() throws java.sql.SQLException
executeBatch
in interface java.sql.Statement
java.sql.SQLException
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface java.sql.Statement
java.sql.SQLException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |