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: 1.10 $
- Author:
- Manuel Laflamme
Constructor Summary |
DatabaseDataSourceConnection(javax.sql.DataSource dataSource)
|
DatabaseDataSourceConnection(javax.sql.DataSource dataSource,
java.lang.String schema)
|
DatabaseDataSourceConnection(javax.sql.DataSource dataSource,
java.lang.String user,
java.lang.String password)
|
DatabaseDataSourceConnection(javax.sql.DataSource dataSource,
java.lang.String schema,
java.lang.String user,
java.lang.String password)
|
DatabaseDataSourceConnection(javax.naming.InitialContext context,
java.lang.String jndiName)
|
DatabaseDataSourceConnection(javax.naming.InitialContext context,
java.lang.String jndiName,
java.lang.String schema)
|
DatabaseDataSourceConnection(javax.naming.InitialContext context,
java.lang.String jndiName,
java.lang.String user,
java.lang.String password)
|
DatabaseDataSourceConnection(javax.naming.InitialContext context,
java.lang.String jndiName,
java.lang.String schema,
java.lang.String user,
java.lang.String password)
|
Method Summary |
void |
close()
Close this connection. |
java.sql.Connection |
getConnection()
Returns a JDBC database connection. |
java.lang.String |
getSchema()
Returns the database schema name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(javax.naming.InitialContext context,
java.lang.String jndiName,
java.lang.String schema)
throws javax.naming.NamingException,
java.sql.SQLException
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(javax.naming.InitialContext context,
java.lang.String jndiName,
java.lang.String schema,
java.lang.String user,
java.lang.String password)
throws javax.naming.NamingException,
java.sql.SQLException
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(javax.naming.InitialContext context,
java.lang.String jndiName)
throws javax.naming.NamingException,
java.sql.SQLException
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(javax.naming.InitialContext context,
java.lang.String jndiName,
java.lang.String user,
java.lang.String password)
throws javax.naming.NamingException,
java.sql.SQLException
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(javax.sql.DataSource dataSource)
throws java.sql.SQLException
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(javax.sql.DataSource dataSource,
java.lang.String user,
java.lang.String password)
throws java.sql.SQLException
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(javax.sql.DataSource dataSource,
java.lang.String schema)
throws java.sql.SQLException
DatabaseDataSourceConnection
public DatabaseDataSourceConnection(javax.sql.DataSource dataSource,
java.lang.String schema,
java.lang.String user,
java.lang.String password)
throws java.sql.SQLException
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Description copied from interface:
IDatabaseConnection
- Returns a JDBC database connection.
- Specified by:
getConnection
in interface IDatabaseConnection
- Throws:
java.sql.SQLException
getSchema
public java.lang.String getSchema()
- Description copied from interface:
IDatabaseConnection
- Returns the database schema name.
- Specified by:
getSchema
in interface IDatabaseConnection
close
public void close()
throws java.sql.SQLException
- Description copied from interface:
IDatabaseConnection
- Close this connection.
- Specified by:
close
in interface IDatabaseConnection
- Throws:
java.sql.SQLException
Copyright © 2002-2004 DbUnit.org. All Rights Reserved.