01: /* DatabaseConnectionFactory.java
02: *
03: * DDSteps - Data Driven JUnit Test Steps
04: * Copyright (C) 2005 Jayway AB
05: * www.ddsteps.org
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License version 2.1 as published by the Free Software Foundation.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, visit
18: * http://www.opensource.org/licenses/lgpl-license.php
19: */
20:
21: package org.ddsteps.dbunit;
22:
23: import org.dbunit.database.IDatabaseConnection;
24:
25: /**
26: * Factory interface for DbUnit.
27: * <p>
28: * As we are not using the DbUnit base class directly, we need something to replace the getConnection() factory method.
29: * A factory comes to mind, and this is it.
30: * <p>
31: * There are many different implementations for this interface, typically one per database type, and probably one
32: * generic.
33: *
34: * @author adam
35: * @version $Id: DatabaseConnectionFactory.java,v 1.1 2005/12/03 12:51:41 adamskogman Exp $
36: */
37: public interface DatabaseConnectionFactory {
38:
39: /**
40: * Get a database connection. The caller may and should close the returned DatabaseConnection.
41: *
42: * @return Never null.
43: */
44: public abstract IDatabaseConnection getConnection();
45:
46: }
|