public class MockDriver extends Object implements Driver, MockDriverMBean
限定符和类型 | 字段和说明 |
---|---|
static MockExecuteHandler |
DEFAULT_HANDLER |
static MockDriver |
instance |
构造器和说明 |
---|
MockDriver() |
public static final MockExecuteHandler DEFAULT_HANDLER
public static final MockDriver instance
public boolean isLogExecuteQueryEnable()
isLogExecuteQueryEnable
在接口中 MockDriverMBean
public void setLogExecuteQueryEnable(boolean logExecuteQueryEnable)
setLogExecuteQueryEnable
在接口中 MockDriverMBean
public long getIdleTimeCount()
getIdleTimeCount
在接口中 MockDriverMBean
public void setIdleTimeCount(long idleTimeCount)
setIdleTimeCount
在接口中 MockDriverMBean
public long generateConnectionId()
public void closeAllConnections() throws SQLException
closeAllConnections
在接口中 MockDriverMBean
SQLException
public int getConnectionsSize()
getConnectionsSize
在接口中 MockDriverMBean
public List<MockConnection> getConnections()
public long getConnectionCloseCount()
getConnectionCloseCount
在接口中 MockDriverMBean
public static boolean registerDriver(Driver driver)
public MockExecuteHandler getExecuteHandler()
public void setExecuteHandler(MockExecuteHandler executeHandler)
public Connection connect(String url, Properties info) throws SQLException
connect
在接口中 Driver
SQLException
public boolean acceptsURL(String url) throws SQLException
acceptsURL
在接口中 MockDriverMBean
acceptsURL
在接口中 Driver
SQLException
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
getPropertyInfo
在接口中 Driver
SQLException
public int getMajorVersion()
getMajorVersion
在接口中 MockDriverMBean
getMajorVersion
在接口中 Driver
public int getMinorVersion()
getMinorVersion
在接口中 MockDriverMBean
getMinorVersion
在接口中 Driver
public boolean jdbcCompliant()
jdbcCompliant
在接口中 MockDriverMBean
jdbcCompliant
在接口中 Driver
public ResultSet executeQuery(MockStatementBase stmt, String sql) throws SQLException
SQLException
public void handleSleep(MockConnection conn)
public ResultSet createResultSet(MockPreparedStatement stmt)
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
在接口中 Driver
SQLFeatureNotSupportedException
public MockConnection createMockConnection(MockDriver driver, String url, Properties connectProperties)
public MockPreparedStatement createMockPreparedStatement(MockConnection conn, String sql)
public MockStatement createMockStatement(MockConnection conn)
public MockCallableStatement createMockCallableStatement(MockConnection conn, String sql)
Copyright © 2012 Alibaba Group. All Rights Reserved.