|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.springtestdbunit.bean.DatabaseDataSourceConnectionFactoryBean
public class DatabaseDataSourceConnectionFactoryBean
A FactoryBean that can be used to create a transaction aware
DatabaseDataSourceConnection using the specified dataSource. Additional configuration
is also supported using setDatabaseConfig(DatabaseConfigBean).
| Constructor Summary | |
|---|---|
DatabaseDataSourceConnectionFactoryBean()
|
|
DatabaseDataSourceConnectionFactoryBean(DataSource dataSource)
|
|
| Method Summary | |
|---|---|
org.dbunit.database.DatabaseDataSourceConnection |
getObject()
|
Class<?> |
getObjectType()
|
boolean |
isSingleton()
|
static org.dbunit.database.IDatabaseConnection |
newConnection(DataSource dataSource)
Convenience method that can be used to construct a transaction aware IDatabaseConnection from a
DataSource. |
void |
setDatabaseConfig(DatabaseConfigBean databaseConfig)
Set an optional configuration that will be applied to the newly created
DatabaseDataSourceConnection |
void |
setDataSource(DataSource dataSource)
Set the data source that will be used for the DatabaseDataSourceConnection. |
void |
setPassword(String password)
Set the password to use when accessing the data source. |
void |
setSchema(String schema)
Set the schema to use when accessing the data source. |
void |
setTransactionAware(boolean transactionAware)
Determines if the IDatabaseConnection created by this bean should be aware of Spring
PlatformTransactionManagers. |
void |
setUsername(String username)
Set the user name to use when accessing the data source. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DatabaseDataSourceConnectionFactoryBean()
public DatabaseDataSourceConnectionFactoryBean(DataSource dataSource)
| Method Detail |
|---|
public org.dbunit.database.DatabaseDataSourceConnection getObject()
throws Exception
getObject in interface org.springframework.beans.factory.FactoryBean<org.dbunit.database.DatabaseDataSourceConnection>Exceptionpublic Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<org.dbunit.database.DatabaseDataSourceConnection>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<org.dbunit.database.DatabaseDataSourceConnection>public void setDataSource(DataSource dataSource)
DatabaseDataSourceConnection. This value must be set before
the connection can be created.
dataSource - the data sourcepublic void setUsername(String username)
username - the user name or nullpublic void setPassword(String password)
password - the password or nullpublic void setSchema(String schema)
schema - the schema or nullpublic void setDatabaseConfig(DatabaseConfigBean databaseConfig)
configuration that will be applied to the newly created
DatabaseDataSourceConnection
databaseConfig - the database configuration or null if no additional configuration is required.public void setTransactionAware(boolean transactionAware)
IDatabaseConnection created by this bean should be aware of Spring
PlatformTransactionManagers. Defaults to true
transactionAware - If the connection should be transaction awarepublic static org.dbunit.database.IDatabaseConnection newConnection(DataSource dataSource)
IDatabaseConnection from a
DataSource.
dataSource - The data source
IDatabaseConnection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||