KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > sql > MockConnection2


1 package com.mockobjects.sql;
2
3 import java.sql.SQLException JavaDoc;
4 import java.sql.Savepoint JavaDoc;
5
6 /**
7  * MockConnection2 is a tempary replacement for the MockConnection.
8  * It differs from the MockConnection in the way in which PreparedStatements
9  * are handled. The changes are significant enough to break compatiblity with
10  * existing testcases so MockConnection2 provides a migration path to the new
11  * system of handling PreparedStatements.
12  * This class will eventually be merged back into MockConnection when it is
13  * felt systems using the classes have been provided with enough time to migrate.
14  */

15 public class MockConnection2 extends CommonMockConnection2{
16     private final MockConnection connection = new MockConnection();
17
18     public MockConnection2() {
19     }
20
21     public MockConnection2(String JavaDoc name) {
22         super(name);
23     }
24
25     public void releaseSavepoint(Savepoint JavaDoc savepoint) throws SQLException JavaDoc {
26         connection.releaseSavepoint(savepoint);
27     }
28
29     public void rollback(Savepoint JavaDoc savepoint) throws SQLException JavaDoc {
30         connection.rollback(savepoint);
31     }
32
33     public Savepoint JavaDoc setSavepoint() throws SQLException JavaDoc {
34         return connection.setSavepoint();
35     }
36
37     public Savepoint JavaDoc setSavepoint(String JavaDoc name) throws SQLException JavaDoc {
38         return connection.setSavepoint();
39     }
40 }
41
Popular Tags