01: package org.dbunit;
02:
03: import org.slf4j.Logger;
04: import org.slf4j.LoggerFactory;
05:
06: import org.dbunit.database.IDatabaseConnection;
07:
08: /**
09: * Default implementation of AbstractDatabaseTester, which does not know how
10: * to get a connection by itself.
11: *
12: * @author Felipe Leme <dbunit@felipeal.net>
13: *
14: */
15:
16: public class DefaultDatabaseTester extends AbstractDatabaseTester {
17:
18: /**
19: * Logger for this class
20: */
21: private static final Logger logger = LoggerFactory
22: .getLogger(DefaultDatabaseTester.class);
23:
24: final IDatabaseConnection connection;
25:
26: /**
27: * Creates a new DefaultDatabaseTester with the suplied connection.
28: */
29: public DefaultDatabaseTester(final IDatabaseConnection connection) {
30: this .connection = connection;
31: }
32:
33: public IDatabaseConnection getConnection() throws Exception {
34: logger.debug("getConnection() - start");
35:
36: return this.connection;
37: }
38:
39: }
|