com.alibaba.druid.mock
Class MockPreparedStatement

java.lang.Object
  extended by com.alibaba.druid.util.jdbc.StatementBase
      extended by com.alibaba.druid.util.jdbc.PreparedStatementBase
          extended by com.alibaba.druid.mock.MockPreparedStatement
All Implemented Interfaces:
MockStatementBase, PreparedStatement, Statement, Wrapper
Direct Known Subclasses:
MockCallableStatement

public class MockPreparedStatement
extends PreparedStatementBase
implements MockStatementBase, PreparedStatement


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(MockConnection conn, String sql)
           
 
Method Summary
 boolean execute()
           
 ResultSet executeQuery()
           
 int executeUpdate()
           
 MockConnection getConnection()
           
 ResultSet getResultSet()
           
 String getSql()
           
 
Methods inherited from class com.alibaba.druid.util.jdbc.PreparedStatementBase
addBatch, clearParameters, getMetaData, getParameterMetaData, getParameters, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL
 
Methods inherited from class com.alibaba.druid.util.jdbc.StatementBase
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getCursorName, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isEscapeProcessing, isPoolable, isWrapperFor, setConnection, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setGeneratedKeys, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, setResultSet, setResultSetConcurrency, setResultSetHoldability, setResultSetType, setUpdateCount, setWarning, setWarnings, unwrap
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.PreparedStatement
addBatch, clearParameters, getMetaData, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL
 
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Constructor Detail

MockPreparedStatement

public MockPreparedStatement(MockConnection conn,
                             String sql)
Method Detail

getSql

public String getSql()

getConnection

public MockConnection getConnection()
                             throws SQLException
Specified by:
getConnection in interface MockStatementBase
Specified by:
getConnection in interface Statement
Overrides:
getConnection in class StatementBase
Throws:
SQLException

executeQuery

public ResultSet executeQuery()
                       throws SQLException
Specified by:
executeQuery in interface PreparedStatement
Throws:
SQLException

executeUpdate

public int executeUpdate()
                  throws SQLException
Specified by:
executeUpdate in interface PreparedStatement
Throws:
SQLException

execute

public boolean execute()
                throws SQLException
Specified by:
execute in interface PreparedStatement
Throws:
SQLException

getResultSet

public ResultSet getResultSet()
                       throws SQLException
Specified by:
getResultSet in interface Statement
Overrides:
getResultSet in class StatementBase
Throws:
SQLException


Copyright © 2012 Alibaba Group. All Rights Reserved.