meta.setTables(tables); MockConnection cx = jdbcMock.getMockConnection(); cx.setMetaData(meta);
/** * Returns a list of all <code>Savepoint</code> objects. * @return the <code>List</code> of {@link com.mockrunner.mock.jdbc.MockSavepoint} objects */ public List<MockSavepoint> getSavepoints() { return new ArrayList<MockSavepoint>(mockFactory.getMockConnection().getSavepointMap().values()); }
/** * Returns a list of all <code>Savepoint</code> objects. * @return the <code>List</code> of {@link com.mockrunner.mock.jdbc.MockSavepoint} objects */ public List getSavepoints() { return new ArrayList(mockFactory.getMockConnection().getSavepointMap().values()); }
/** * Returns the {@link PreparedStatementResultSetHandler}. * The {@link PreparedStatementResultSetHandler} * contains methods that can be used to specify the * {@link com.mockrunner.mock.jdbc.MockResultSet} objects * and update counts that a {@link com.mockrunner.mock.jdbc.MockPreparedStatement} * should return when executing an SQL statement. * @return the {@link PreparedStatementResultSetHandler} */ public PreparedStatementResultSetHandler getPreparedStatementResultSetHandler() { return mockFactory.getMockConnection().getPreparedStatementResultSetHandler(); }
/** * Returns the {@link PreparedStatementResultSetHandler}. * The {@link PreparedStatementResultSetHandler} * contains methods that can be used to specify the * {@link com.mockrunner.mock.jdbc.MockResultSet} objects * and update counts that a {@link com.mockrunner.mock.jdbc.MockPreparedStatement} * should return when executing an SQL statement. * @return the {@link PreparedStatementResultSetHandler} */ public PreparedStatementResultSetHandler getPreparedStatementResultSetHandler() { return mockFactory.getMockConnection().getPreparedStatementResultSetHandler(); }
/** * Returns the {@link StatementResultSetHandler}. * The {@link StatementResultSetHandler} * contains methods that can be used to specify the * {@link com.mockrunner.mock.jdbc.MockResultSet} objects * and update counts that a {@link com.mockrunner.mock.jdbc.MockStatement} * should return when executing an SQL statement. * @return the {@link StatementResultSetHandler} */ public StatementResultSetHandler getStatementResultSetHandler() { return mockFactory.getMockConnection().getStatementResultSetHandler(); }
/** * Returns the {@link CallableStatementResultSetHandler}. * The {@link CallableStatementResultSetHandler} * contains methods that can be used to specify the * {@link com.mockrunner.mock.jdbc.MockResultSet} objects * and update counts that a {@link com.mockrunner.mock.jdbc.MockCallableStatement} * should return when executing an SQL statement. * @return the {@link CallableStatementResultSetHandler} */ public CallableStatementResultSetHandler getCallableStatementResultSetHandler() { return mockFactory.getMockConnection().getCallableStatementResultSetHandler(); }
/** * Returns the {@link CallableStatementResultSetHandler}. * The {@link CallableStatementResultSetHandler} * contains methods that can be used to specify the * {@link com.mockrunner.mock.jdbc.MockResultSet} objects * and update counts that a {@link com.mockrunner.mock.jdbc.MockCallableStatement} * should return when executing an SQL statement. * @return the {@link CallableStatementResultSetHandler} */ public CallableStatementResultSetHandler getCallableStatementResultSetHandler() { return mockFactory.getMockConnection().getCallableStatementResultSetHandler(); }
/** * Returns the {@link CallableStatementResultSetHandler}. * The {@link CallableStatementResultSetHandler} * contains methods that can be used to specify the * {@link com.mockrunner.mock.jdbc.MockResultSet} objects * and update counts that a {@link com.mockrunner.mock.jdbc.MockCallableStatement} * should return when executing an SQL statement. * @return the {@link CallableStatementResultSetHandler} */ public CallableStatementResultSetHandler getCallableStatementResultSetHandler() { return mockFactory.getMockConnection().getCallableStatementResultSetHandler(); }
/** * Returns all {@link com.mockrunner.mock.jdbc.MockCallableStatement} objects. * @return the <code>List</code> of <code>CallableStatement</code> objects */ public List getCallableStatements() { return mockFactory.getMockConnection().getCallableStatementResultSetHandler().getCallableStatements(); }
/** * Returns all {@link com.mockrunner.mock.jdbc.MockStatement} objects. * @return the <code>List</code> of <code>Statement</code> objects */ public List<MockStatement> getStatements() { return mockFactory.getMockConnection().getStatementResultSetHandler().getStatements(); }
/** * Returns all {@link com.mockrunner.mock.jdbc.MockStatement} objects. * @return the <code>List</code> of <code>Statement</code> objects */ public List getStatements() { return mockFactory.getMockConnection().getStatementResultSetHandler().getStatements(); }
/** * Returns all {@link com.mockrunner.mock.jdbc.MockPreparedStatement} objects. * @return the <code>List</code> of <code>PreparedStatement</code> objects */ public List getPreparedStatements() { return mockFactory.getMockConnection().getPreparedStatementResultSetHandler().getPreparedStatements(); }
/** * Returns all {@link com.mockrunner.mock.jdbc.MockPreparedStatement} objects. * @return the <code>List</code> of <code>PreparedStatement</code> objects */ public List<MockPreparedStatement> getPreparedStatements() { return mockFactory.getMockConnection().getPreparedStatementResultSetHandler().getPreparedStatements(); }
/** * Returns all {@link com.mockrunner.mock.jdbc.MockPreparedStatement} objects. * @return the <code>List</code> of <code>PreparedStatement</code> objects */ public List getPreparedStatements() { return mockFactory.getMockConnection().getPreparedStatementResultSetHandler().getPreparedStatements(); }
/** * Returns all {@link com.mockrunner.mock.jdbc.MockCallableStatement} objects. * @return the <code>List</code> of <code>CallableStatement</code> objects */ public List getCallableStatements() { return mockFactory.getMockConnection().getCallableStatementResultSetHandler().getCallableStatements(); }
/** * Returns all {@link com.mockrunner.mock.jdbc.MockCallableStatement} objects. * @return the <code>List</code> of <code>CallableStatement</code> objects */ public List<MockCallableStatement> getCallableStatements() { return mockFactory.getMockConnection().getCallableStatementResultSetHandler().getCallableStatements(); }
/** * Returns all {@link com.mockrunner.mock.jdbc.MockStatement} objects. * @return the <code>List</code> of <code>Statement</code> objects */ public List getStatements() { return mockFactory.getMockConnection().getStatementResultSetHandler().getStatements(); }
/** * Verifies that the changes were commited, i.e. the <code>commit</code> * method of <code>Connection</code> was at least called once. * Makes only sense, if the <code>Connection</code> is not in * autocommit mode. Automatic commits are not recognized. * @throws VerifyFailedException if verification fails */ public void verifyCommitted() { int number = mockFactory.getMockConnection().getNumberCommits(); if(number <= 0) { throw new VerifyFailedException("Connection received no commits."); } }
/** * Verifies that the changes were commited, i.e. the <code>commit</code> * method of <code>Connection</code> was at least called once. * Makes only sense, if the <code>Connection</code> is not in * autocommit mode. Automatic commits are not recognized. * @throws VerifyFailedException if verification fails */ public void verifyCommitted() { int number = mockFactory.getMockConnection().getNumberCommits(); if(number <= 0) { throw new VerifyFailedException("Connection received no commits."); } }