Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/mockobjects/sql/MockConnection2.java


1   package com.mockobjects.sql;
2   
3   import java.sql.SQLException;
4   import java.sql.Savepoint;
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 name) {
22          super(name);
23      }
24  
25      public void releaseSavepoint(Savepoint savepoint) throws SQLException {
26          connection.releaseSavepoint(savepoint);
27      }
28  
29      public void rollback(Savepoint savepoint) throws SQLException {
30          connection.rollback(savepoint);
31      }
32  
33      public Savepoint setSavepoint() throws SQLException {
34          return connection.setSavepoint();
35      }
36  
37      public Savepoint setSavepoint(String name) throws SQLException {
38          return connection.setSavepoint();
39      }
40  }