public class MockPreparedStatement extends MockStatement implements PreparedStatement
PreparedStatement.CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO| Constructor and Description |
|---|
MockPreparedStatement(Connection connection,
String sql) |
MockPreparedStatement(Connection connection,
String sql,
boolean returnGeneratedKeys) |
MockPreparedStatement(Connection connection,
String sql,
int resultSetType,
int resultSetConcurrency) |
MockPreparedStatement(Connection connection,
String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBatch() |
void |
clearBatch() |
void |
clearParameters() |
boolean |
execute() |
int[] |
executeBatch() |
protected int[] |
executeBatch(List batchParams) |
ResultSet |
executeQuery() |
protected ResultSet |
executeQuery(Map params) |
int |
executeUpdate() |
protected int |
executeUpdate(Map params) |
Map |
getIndexedParameterMap() |
ResultSetMetaData |
getMetaData() |
Object |
getParameter(int index) |
Map |
getParameterMap() |
ParameterMetaData |
getParameterMetaData() |
String |
getSQL() |
void |
setArray(int parameterIndex,
Array array) |
void |
setAsciiStream(int parameterIndex,
InputStream stream) |
void |
setAsciiStream(int parameterIndex,
InputStream stream,
int length) |
void |
setAsciiStream(int parameterIndex,
InputStream stream,
long length) |
void |
setBigDecimal(int parameterIndex,
BigDecimal bigDecimal) |
void |
setBinaryStream(int parameterIndex,
InputStream stream) |
void |
setBinaryStream(int parameterIndex,
InputStream stream,
int length) |
void |
setBinaryStream(int parameterIndex,
InputStream stream,
long length) |
void |
setBlob(int parameterIndex,
Blob blob) |
void |
setBlob(int parameterIndex,
InputStream inputStream) |
void |
setBlob(int parameterIndex,
InputStream inputStream,
long length) |
void |
setBoolean(int parameterIndex,
boolean bool) |
void |
setByte(int parameterIndex,
byte byteValue) |
void |
setBytes(int parameterIndex,
byte[] byteArray) |
void |
setCharacterStream(int parameterIndex,
Reader reader) |
void |
setCharacterStream(int parameterIndex,
Reader reader,
int length) |
void |
setCharacterStream(int parameterIndex,
Reader reader,
long length) |
void |
setClob(int parameterIndex,
Clob clob) |
void |
setClob(int parameterIndex,
Reader reader) |
void |
setClob(int parameterIndex,
Reader reader,
long length) |
void |
setDate(int parameterIndex,
Date date) |
void |
setDate(int parameterIndex,
Date date,
Calendar calendar) |
void |
setDouble(int parameterIndex,
double doubleValue) |
void |
setFloat(int parameterIndex,
float floatValue) |
void |
setInt(int parameterIndex,
int intValue) |
void |
setLong(int parameterIndex,
long longValue) |
void |
setNCharacterStream(int parameterIndex,
Reader reader) |
void |
setNCharacterStream(int parameterIndex,
Reader reader,
long length) |
void |
setNClob(int parameterIndex,
NClob nClob) |
void |
setNClob(int parameterIndex,
Reader reader) |
void |
setNClob(int parameterIndex,
Reader reader,
long length) |
void |
setNString(int parameterIndex,
String string) |
void |
setNull(int parameterIndex,
int sqlType) |
void |
setNull(int parameterIndex,
int sqlType,
String typeName) |
void |
setObject(int index,
Object object) |
void |
setObject(int parameterIndex,
Object object,
int targetSqlType) |
void |
setObject(int parameterIndex,
Object object,
int targetSqlType,
int scale) |
void |
setPreparedStatementResultSetHandler(AbstractParameterResultSetHandler resultSetHandler) |
void |
setRef(int parameterIndex,
Ref ref) |
void |
setRowId(int parameterIndex,
RowId rowId) |
void |
setShort(int parameterIndex,
short shortValue) |
void |
setSQLXML(int parameterIndex,
SQLXML xmlObject) |
void |
setString(int parameterIndex,
String string) |
void |
setTime(int parameterIndex,
Time time) |
void |
setTime(int parameterIndex,
Time time,
Calendar calendar) |
void |
setTimestamp(int parameterIndex,
Timestamp timeStamp) |
void |
setTimestamp(int parameterIndex,
Timestamp timeStamp,
Calendar cal) |
void |
setUnicodeStream(int parameterIndex,
InputStream stream,
int length) |
void |
setURL(int parameterIndex,
URL url) |
addBatch, cancel, clearWarnings, cloneResultSet, cloneResultSets, close, closeOnCompletion, determineGeneratedKeysResultSet, execute, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getCursorName, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isQuery, isWrapperFor, prepareFailedResult, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLastGeneratedKeysResultSet, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, setResultSetHandler, setResultSets, setUpdateCounts, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddBatch, cancel, clearWarnings, close, closeOnCompletion, execute, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutisWrapperFor, unwrappublic MockPreparedStatement(Connection connection, String sql)
public MockPreparedStatement(Connection connection, String sql, boolean returnGeneratedKeys)
public MockPreparedStatement(Connection connection, String sql, int resultSetType, int resultSetConcurrency)
public MockPreparedStatement(Connection connection, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
public void setPreparedStatementResultSetHandler(AbstractParameterResultSetHandler resultSetHandler)
public String getSQL()
public Map getIndexedParameterMap()
public Map getParameterMap()
public Object getParameter(int index)
public void setObject(int index,
Object object)
throws SQLException
setObject in interface PreparedStatementSQLExceptionpublic void setObject(int parameterIndex,
Object object,
int targetSqlType,
int scale)
throws SQLException
setObject in interface PreparedStatementSQLExceptionpublic void setObject(int parameterIndex,
Object object,
int targetSqlType)
throws SQLException
setObject in interface PreparedStatementSQLExceptionpublic void addBatch()
throws SQLException
addBatch in interface PreparedStatementSQLExceptionpublic void clearBatch()
throws SQLException
clearBatch in interface StatementclearBatch in class MockStatementSQLExceptionpublic void clearParameters()
throws SQLException
clearParameters in interface PreparedStatementSQLExceptionpublic boolean execute()
throws SQLException
execute in interface PreparedStatementSQLExceptionpublic ResultSet executeQuery() throws SQLException
executeQuery in interface PreparedStatementSQLExceptionprotected ResultSet executeQuery(Map params) throws SQLException
SQLExceptionpublic int executeUpdate()
throws SQLException
executeUpdate in interface PreparedStatementSQLExceptionprotected int executeUpdate(Map params) throws SQLException
SQLExceptionpublic int[] executeBatch()
throws SQLException
executeBatch in interface StatementexecuteBatch in class MockStatementSQLExceptionprotected int[] executeBatch(List batchParams) throws SQLException
SQLExceptionpublic ResultSetMetaData getMetaData() throws SQLException
getMetaData in interface PreparedStatementSQLExceptionpublic ParameterMetaData getParameterMetaData() throws SQLException
getParameterMetaData in interface PreparedStatementSQLExceptionpublic void setArray(int parameterIndex,
Array array)
throws SQLException
setArray in interface PreparedStatementSQLExceptionpublic void setAsciiStream(int parameterIndex,
InputStream stream)
throws SQLException
setAsciiStream in interface PreparedStatementSQLExceptionpublic void setAsciiStream(int parameterIndex,
InputStream stream,
int length)
throws SQLException
setAsciiStream in interface PreparedStatementSQLExceptionpublic void setAsciiStream(int parameterIndex,
InputStream stream,
long length)
throws SQLException
setAsciiStream in interface PreparedStatementSQLExceptionpublic void setBinaryStream(int parameterIndex,
InputStream stream)
throws SQLException
setBinaryStream in interface PreparedStatementSQLExceptionpublic void setBinaryStream(int parameterIndex,
InputStream stream,
int length)
throws SQLException
setBinaryStream in interface PreparedStatementSQLExceptionpublic void setBinaryStream(int parameterIndex,
InputStream stream,
long length)
throws SQLException
setBinaryStream in interface PreparedStatementSQLExceptionpublic void setCharacterStream(int parameterIndex,
Reader reader)
throws SQLException
setCharacterStream in interface PreparedStatementSQLExceptionpublic void setCharacterStream(int parameterIndex,
Reader reader,
int length)
throws SQLException
setCharacterStream in interface PreparedStatementSQLExceptionpublic void setCharacterStream(int parameterIndex,
Reader reader,
long length)
throws SQLException
setCharacterStream in interface PreparedStatementSQLExceptionpublic void setNCharacterStream(int parameterIndex,
Reader reader)
throws SQLException
setNCharacterStream in interface PreparedStatementSQLExceptionpublic void setNCharacterStream(int parameterIndex,
Reader reader,
long length)
throws SQLException
setNCharacterStream in interface PreparedStatementSQLExceptionpublic void setBigDecimal(int parameterIndex,
BigDecimal bigDecimal)
throws SQLException
setBigDecimal in interface PreparedStatementSQLExceptionpublic void setBlob(int parameterIndex,
Blob blob)
throws SQLException
setBlob in interface PreparedStatementSQLExceptionpublic void setBlob(int parameterIndex,
InputStream inputStream)
throws SQLException
setBlob in interface PreparedStatementSQLExceptionpublic void setBlob(int parameterIndex,
InputStream inputStream,
long length)
throws SQLException
setBlob in interface PreparedStatementSQLExceptionpublic void setBoolean(int parameterIndex,
boolean bool)
throws SQLException
setBoolean in interface PreparedStatementSQLExceptionpublic void setByte(int parameterIndex,
byte byteValue)
throws SQLException
setByte in interface PreparedStatementSQLExceptionpublic void setBytes(int parameterIndex,
byte[] byteArray)
throws SQLException
setBytes in interface PreparedStatementSQLExceptionpublic void setClob(int parameterIndex,
Clob clob)
throws SQLException
setClob in interface PreparedStatementSQLExceptionpublic void setClob(int parameterIndex,
Reader reader)
throws SQLException
setClob in interface PreparedStatementSQLExceptionpublic void setClob(int parameterIndex,
Reader reader,
long length)
throws SQLException
setClob in interface PreparedStatementSQLExceptionpublic void setNClob(int parameterIndex,
NClob nClob)
throws SQLException
setNClob in interface PreparedStatementSQLExceptionpublic void setNClob(int parameterIndex,
Reader reader)
throws SQLException
setNClob in interface PreparedStatementSQLExceptionpublic void setNClob(int parameterIndex,
Reader reader,
long length)
throws SQLException
setNClob in interface PreparedStatementSQLExceptionpublic void setSQLXML(int parameterIndex,
SQLXML xmlObject)
throws SQLException
setSQLXML in interface PreparedStatementSQLExceptionpublic void setDate(int parameterIndex,
Date date,
Calendar calendar)
throws SQLException
setDate in interface PreparedStatementSQLExceptionpublic void setDate(int parameterIndex,
Date date)
throws SQLException
setDate in interface PreparedStatementSQLExceptionpublic void setDouble(int parameterIndex,
double doubleValue)
throws SQLException
setDouble in interface PreparedStatementSQLExceptionpublic void setFloat(int parameterIndex,
float floatValue)
throws SQLException
setFloat in interface PreparedStatementSQLExceptionpublic void setInt(int parameterIndex,
int intValue)
throws SQLException
setInt in interface PreparedStatementSQLExceptionpublic void setLong(int parameterIndex,
long longValue)
throws SQLException
setLong in interface PreparedStatementSQLExceptionpublic void setNull(int parameterIndex,
int sqlType,
String typeName)
throws SQLException
setNull in interface PreparedStatementSQLExceptionpublic void setNull(int parameterIndex,
int sqlType)
throws SQLException
setNull in interface PreparedStatementSQLExceptionpublic void setRef(int parameterIndex,
Ref ref)
throws SQLException
setRef in interface PreparedStatementSQLExceptionpublic void setRowId(int parameterIndex,
RowId rowId)
throws SQLException
setRowId in interface PreparedStatementSQLExceptionpublic void setShort(int parameterIndex,
short shortValue)
throws SQLException
setShort in interface PreparedStatementSQLExceptionpublic void setString(int parameterIndex,
String string)
throws SQLException
setString in interface PreparedStatementSQLExceptionpublic void setNString(int parameterIndex,
String string)
throws SQLException
setNString in interface PreparedStatementSQLExceptionpublic void setTime(int parameterIndex,
Time time,
Calendar calendar)
throws SQLException
setTime in interface PreparedStatementSQLExceptionpublic void setTime(int parameterIndex,
Time time)
throws SQLException
setTime in interface PreparedStatementSQLExceptionpublic void setTimestamp(int parameterIndex,
Timestamp timeStamp,
Calendar cal)
throws SQLException
setTimestamp in interface PreparedStatementSQLExceptionpublic void setTimestamp(int parameterIndex,
Timestamp timeStamp)
throws SQLException
setTimestamp in interface PreparedStatementSQLExceptionpublic void setUnicodeStream(int parameterIndex,
InputStream stream,
int length)
throws SQLException
setUnicodeStream in interface PreparedStatementSQLExceptionpublic void setURL(int parameterIndex,
URL url)
throws SQLException
setURL in interface PreparedStatementSQLExceptionCopyright © 2003-2014. All Rights Reserved.