org.dbunit.database
Class DatabaseDataSourceConnection
java.lang.Object
org.dbunit.database.AbstractDatabaseConnection
org.dbunit.database.DatabaseDataSourceConnection
- All Implemented Interfaces:
- IDatabaseConnection
public class DatabaseDataSourceConnection
- extends AbstractDatabaseConnection
- implements IDatabaseConnection
This class adapts a JDBC DataSource
to a
IDatabaseConnection
.
- Since:
- Mar 8, 2002
- Version:
- $Revision: 1188 $
- Author:
- Manuel Laflamme
Constructor Summary |
DatabaseDataSourceConnection(DataSource dataSource)
|
DatabaseDataSourceConnection(DataSource dataSource,
String schema)
|
DatabaseDataSourceConnection(DataSource dataSource,
String user,
String password)
|
DatabaseDataSourceConnection(DataSource dataSource,
String schema,
String user,
String password)
|
DatabaseDataSourceConnection(InitialContext context,
String jndiName)
|
DatabaseDataSourceConnection(InitialContext context,
String jndiName,
String schema)
|
DatabaseDataSourceConnection(InitialContext context,
String jndiName,
String user,
String password)
|
DatabaseDataSourceConnection(InitialContext context,
String jndiName,
String schema,
String user,
String password)
|
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(InitialContext context,
String jndiName,
String schema)
throws NamingException,
SQLException
- Throws:
NamingException
SQLException
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(InitialContext context,
String jndiName,
String schema,
String user,
String password)
throws NamingException,
SQLException
- Throws:
NamingException
SQLException
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(InitialContext context,
String jndiName)
throws NamingException,
SQLException
- Throws:
NamingException
SQLException
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(InitialContext context,
String jndiName,
String user,
String password)
throws NamingException,
SQLException
- Throws:
NamingException
SQLException
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(DataSource dataSource)
throws SQLException
- Throws:
SQLException
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(DataSource dataSource,
String user,
String password)
throws SQLException
- Throws:
SQLException
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(DataSource dataSource,
String schema)
throws SQLException
- Throws:
SQLException
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(DataSource dataSource,
String schema,
String user,
String password)
throws SQLException
- Throws:
SQLException
getConnection
public Connection getConnection()
throws SQLException
- Description copied from interface:
IDatabaseConnection
- Returns a JDBC database connection.
- Specified by:
getConnection
in interface IDatabaseConnection
- Throws:
SQLException
getSchema
public String getSchema()
- Description copied from interface:
IDatabaseConnection
- Returns the database schema name.
- Specified by:
getSchema
in interface IDatabaseConnection
close
public void close()
throws SQLException
- Description copied from interface:
IDatabaseConnection
- Close this connection.
- Specified by:
close
in interface IDatabaseConnection
- Throws:
SQLException
Copyright © 2002-2012. All Rights Reserved.