1 21 22 package org.dbunit.database; 23 24 import java.sql.Connection ; 25 import java.sql.SQLException ; 26 27 35 public class DatabaseConnection extends AbstractDatabaseConnection 36 implements IDatabaseConnection 37 { 38 private final Connection _connection; 39 private final String _schema; 40 41 47 public DatabaseConnection(Connection connection, String schema) 48 { 49 _connection = connection; 50 _schema = schema; 51 } 52 53 58 public DatabaseConnection(Connection connection) 59 { 60 _connection = connection; 61 _schema = null; 62 } 63 64 67 public Connection getConnection() throws SQLException 68 { 69 return _connection; 70 } 71 72 public String getSchema() 73 { 74 return _schema; 75 } 76 77 public void close() throws SQLException 78 { 79 _connection.close(); 80 } 81 } 82 83 84 85 86 87 88 | Popular Tags |