public class MockStatement extends Object implements Statement
Statement.CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO| Constructor and Description |
|---|
MockStatement(Connection connection) |
MockStatement(Connection connection,
int resultSetType,
int resultSetConcurrency) |
MockStatement(Connection connection,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
public MockStatement(Connection connection)
public MockStatement(Connection connection, int resultSetType, int resultSetConcurrency)
public MockStatement(Connection connection, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
public void setResultSetHandler(AbstractResultSetHandler resultSetHandler)
protected void setResultSets(ResultSet[] resultSets)
protected void setUpdateCounts(int[] updateCounts)
public String getCursorName()
public ResultSet executeQuery(String sql) throws SQLException
executeQuery in interface StatementSQLExceptionpublic int executeUpdate(String sql) throws SQLException
executeUpdate in interface StatementSQLExceptionpublic boolean execute(String sql) throws SQLException
execute in interface StatementSQLExceptionpublic int[] executeBatch()
throws SQLException
executeBatch in interface StatementSQLExceptionprotected SQLException prepareFailedResult(int[] actualResults, int index, String message, SQLException caughtException)
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
executeUpdate in interface StatementSQLExceptionpublic int executeUpdate(String sql, int[] columnIndexes) throws SQLException
executeUpdate in interface StatementSQLExceptionpublic int executeUpdate(String sql, String[] columnNames) throws SQLException
executeUpdate in interface StatementSQLExceptionpublic boolean execute(String sql, int autoGeneratedKeys) throws SQLException
execute in interface StatementSQLExceptionpublic boolean execute(String sql, int[] columnIndexes) throws SQLException
execute in interface StatementSQLExceptionpublic boolean execute(String sql, String[] columnNames) throws SQLException
execute in interface StatementSQLExceptionprotected void setLastGeneratedKeysResultSet(MockResultSet generatedKeys)
protected MockResultSet determineGeneratedKeysResultSet(String sql)
public void close()
throws SQLException
close in interface AutoCloseableclose in interface StatementSQLExceptionpublic int getMaxFieldSize()
throws SQLException
getMaxFieldSize in interface StatementSQLExceptionpublic void setMaxFieldSize(int maxFieldSize)
throws SQLException
setMaxFieldSize in interface StatementSQLExceptionpublic int getMaxRows()
throws SQLException
getMaxRows in interface StatementSQLExceptionpublic void setMaxRows(int maxRows)
throws SQLException
setMaxRows in interface StatementSQLExceptionpublic void setEscapeProcessing(boolean enable)
throws SQLException
setEscapeProcessing in interface StatementSQLExceptionpublic int getQueryTimeout()
throws SQLException
getQueryTimeout in interface StatementSQLExceptionpublic void setQueryTimeout(int querySeconds)
throws SQLException
setQueryTimeout in interface StatementSQLExceptionpublic void cancel()
throws SQLException
cancel in interface StatementSQLExceptionpublic SQLWarning getWarnings() throws SQLException
getWarnings in interface StatementSQLExceptionpublic void clearWarnings()
throws SQLException
clearWarnings in interface StatementSQLExceptionpublic void setCursorName(String cursorName) throws SQLException
setCursorName in interface StatementSQLExceptionprotected boolean isQuery(String sql)
public ResultSet getResultSet() throws SQLException
getResultSet in interface StatementSQLExceptionpublic int getUpdateCount()
throws SQLException
getUpdateCount in interface StatementSQLExceptionpublic boolean getMoreResults(int current)
throws SQLException
getMoreResults in interface StatementSQLExceptionpublic boolean getMoreResults()
throws SQLException
getMoreResults in interface StatementSQLExceptionpublic void setFetchDirection(int fetchDirection)
throws SQLException
setFetchDirection in interface StatementSQLExceptionpublic int getFetchDirection()
throws SQLException
getFetchDirection in interface StatementSQLExceptionpublic void setFetchSize(int fetchSize)
throws SQLException
setFetchSize in interface StatementSQLExceptionpublic int getFetchSize()
throws SQLException
getFetchSize in interface StatementSQLExceptionpublic void addBatch(String sql) throws SQLException
addBatch in interface StatementSQLExceptionpublic void clearBatch()
throws SQLException
clearBatch in interface StatementSQLExceptionpublic Connection getConnection() throws SQLException
getConnection in interface StatementSQLExceptionpublic ResultSet getGeneratedKeys() throws SQLException
getGeneratedKeys in interface StatementSQLExceptionpublic int getResultSetType()
throws SQLException
getResultSetType in interface StatementSQLExceptionpublic int getResultSetConcurrency()
throws SQLException
getResultSetConcurrency in interface StatementSQLExceptionpublic int getResultSetHoldability()
throws SQLException
getResultSetHoldability in interface StatementSQLExceptionpublic boolean isPoolable()
throws SQLException
isPoolable in interface StatementSQLExceptionpublic void setPoolable(boolean poolable)
throws SQLException
setPoolable in interface StatementSQLExceptionpublic boolean isWrapperFor(Class iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic Object unwrap(Class iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic void closeOnCompletion()
throws SQLException
closeOnCompletion in interface StatementSQLExceptionpublic boolean isCloseOnCompletion()
throws SQLException
isCloseOnCompletion in interface StatementSQLExceptionprotected MockResultSet cloneResultSet(MockResultSet resultSet)
protected MockResultSet[] cloneResultSets(MockResultSet[] resultSets)
Copyright © 2003-2014. All Rights Reserved.