AbstractTransactionalJUnit4SpringContextTests)@Deprecated public abstract class AbstractTransactionalDataSourceSpringContextTests extends AbstractTransactionalSpringContextTests
DataSource bean
 to be defined in the Spring application context.
 This class exposes a JdbcTemplate
 and provides an easy way to delete from the database in a new transaction.
setDataSource(javax.sql.DataSource), 
getJdbcTemplate()| Modifier and Type | Field and Description | 
|---|---|
protected JdbcTemplate | 
jdbcTemplate
Deprecated.  
  | 
transactionDefinition, transactionManager, transactionStatusAUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NOapplicationContextlogger| Constructor and Description | 
|---|
AbstractTransactionalDataSourceSpringContextTests()
Deprecated.  
Default constructor for AbstractTransactionalDataSourceSpringContextTests. 
 | 
AbstractTransactionalDataSourceSpringContextTests(String name)
Deprecated.  
Constructor for AbstractTransactionalDataSourceSpringContextTests with a JUnit name. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected int | 
countRowsInTable(String tableName)
Deprecated.  
Count the rows in the given table 
 | 
protected void | 
deleteFromTables(String[] names)
Deprecated.  
Convenient method to delete all rows from these tables. 
 | 
protected void | 
executeSqlScript(String sqlResourcePath,
                boolean continueOnError)
Deprecated.  
Execute the given SQL script. 
 | 
JdbcTemplate | 
getJdbcTemplate()
Deprecated.  
Return the JdbcTemplate that this base class manages. 
 | 
protected void | 
setComplete()
Deprecated.  
Overridden to prevent the transaction committing if a number of tables have been
 cleared, as a defensive measure against accidental permanent wiping of a database. 
 | 
void | 
setDataSource(DataSource dataSource)
Deprecated.  
Setter: DataSource is provided by Dependency Injection. 
 | 
void | 
setSqlScriptEncoding(String sqlScriptEncoding)
Deprecated.  
Specify the encoding for SQL scripts, if different from the platform encoding. 
 | 
endTransaction, isDefaultRollback, isRollback, onSetUp, onSetUpBeforeTransaction, onSetUpInTransaction, onTearDown, onTearDownAfterTransaction, onTearDownInTransaction, preventTransaction, setDefaultRollback, setTransactionDefinition, setTransactionManager, startNewTransactiongetAutowireMode, injectDependencies, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariablescontextKey, createApplicationContext, createBeanDefinitionReader, customizeBeanFactory, getApplicationContext, getConfigLocations, getConfigPath, getConfigPaths, getLoadCount, loadContext, loadContextLocations, prepareApplicationContext, setDirty, setUp, tearDownaddContext, contextKeyString, getContext, hasCachedContext, isContextKeyEmpty, setDirtygetDisabledTestCount, isDisabledInThisEnvironment, recordDisabled, runBareassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, toStringprotected JdbcTemplate jdbcTemplate
public AbstractTransactionalDataSourceSpringContextTests()
public AbstractTransactionalDataSourceSpringContextTests(String name)
public void setDataSource(DataSource dataSource)
public final JdbcTemplate getJdbcTemplate()
public void setSqlScriptEncoding(String sqlScriptEncoding)
protected void deleteFromTables(String[] names)
setComplete() impossible.setComplete()protected final void setComplete()
setComplete in class AbstractTransactionalSpringContextTestsAbstractTransactionalSpringContextTests.setComplete()protected int countRowsInTable(String tableName)
tableName - table name to count rows inprotected void executeSqlScript(String sqlResourcePath, boolean continueOnError) throws DataAccessException
sqlResourcePath - Spring resource path for the SQL script.
 Should normally be loaded by classpath.
 Statements should be delimited with a semicolon. If statements are not delimited with a semicolon then there should be one statement per line. Statements are allowed to span lines only if they are delimited with a semicolon.
Do not use this method to execute DDL if you expect rollback.
continueOnError - whether or not to continue without throwing
 an exception in the event of an errorDataAccessException - if there is an error executing a statement
 and continueOnError was false