org.kuali.rice.test
Class ClearDatabaseLifecycle
java.lang.Object
org.kuali.rice.core.api.lifecycle.BaseLifecycle
org.kuali.rice.test.ClearDatabaseLifecycle
- All Implemented Interfaces:
- Lifecycle
public class ClearDatabaseLifecycle
- extends BaseLifecycle
Lifecycle class to clean up the database for use in testing.
This lifecycle will not be run (even if it is listed in the lifecycles list)
if the 'use.use.clearDatabaseLifecycle' configuration property is defined, and is
not 'true'. If the property is omitted the lifecycle runs as normal.
- Since:
- 0.9
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static final org.apache.log4j.Logger LOG
TEST_TABLE_NAME
public static final String TEST_TABLE_NAME
- See Also:
- Constant Field Values
ClearDatabaseLifecycle
public ClearDatabaseLifecycle()
ClearDatabaseLifecycle
public ClearDatabaseLifecycle(List<String> tablesToClear,
List<String> tablesNotToClear)
addStandardTables
protected void addStandardTables()
start
public void start()
throws Exception
- Specified by:
start
in interface Lifecycle
- Overrides:
start
in class BaseLifecycle
- Throws:
Exception
isTestTableInSchema
protected Boolean isTestTableInSchema(Connection connection)
throws SQLException
- Throws:
SQLException
verifyTestEnvironment
protected void verifyTestEnvironment(DataSource dataSource)
clearTables
protected void clearTables(org.springframework.transaction.PlatformTransactionManager transactionManager,
DataSource dataSource)
indexExportedKeys
protected Map<String,List<String[]>> indexExportedKeys(DatabaseMetaData metaData,
String schemaName)
throws SQLException
- Throws:
SQLException
getTablesToClear
public List<String> getTablesToClear()
getTablesNotToClear
public List<String> getTablesNotToClear()
Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.