|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dbmaintain.structure.clear.impl.DefaultDBClearer
public class DefaultDBClearer
Implementation of DBClearer. This implementation individually drops every table, view, materialized view, synonym,
trigger and sequence in the database. A list of tables, views, ... that should be preserved can be specified at construction.
| Field Summary | |
|---|---|
protected ConstraintsDisabler |
constraintsDisabler
|
protected Databases |
databases
|
protected ExecutedScriptInfoSource |
executedScriptInfoSource
|
protected Set<DbItemIdentifier> |
itemsToPreserve
|
| Constructor Summary | |
|---|---|
DefaultDBClearer(Databases databases,
Set<DbItemIdentifier> itemsToPreserve,
ConstraintsDisabler constraintsDisabler,
ExecutedScriptInfoSource executedScriptInfoSource)
|
|
| Method Summary | |
|---|---|
protected void |
assertItemsToPreserveExist(Set<DbItemIdentifier> itemsToPreserve)
|
void |
clearDatabase()
Clears the database schemas. |
protected void |
clearDatabase(Database database)
|
protected void |
dropMaterializedViews(Database database,
String schemaName)
Drops all materialized views. |
protected void |
dropRules(Database database,
String schemaName)
Drops all rules. |
protected void |
dropSequences(Database database,
String schemaName)
Drops all sequences |
protected void |
dropStoredProcedures(Database database,
String schemaName)
|
protected void |
dropSynonyms(Database database,
String schemaName)
Drops all synonyms |
protected void |
dropTables(Database database,
String schemaName)
Drops all tables. |
protected void |
dropTriggers(Database database,
String schemaName)
Drops all triggers |
protected void |
dropTypes(Database database,
String schemaName)
Drops all types. |
protected void |
dropViews(Database database,
String schemaName)
Drops all views. |
protected Set<DbItemIdentifier> |
toDbItemIdentifiers(DbItemType type,
Database database,
String schemaName,
Set<String> itemNames)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ConstraintsDisabler constraintsDisabler
protected ExecutedScriptInfoSource executedScriptInfoSource
protected Set<DbItemIdentifier> itemsToPreserve
protected Databases databases
| Constructor Detail |
|---|
public DefaultDBClearer(Databases databases,
Set<DbItemIdentifier> itemsToPreserve,
ConstraintsDisabler constraintsDisabler,
ExecutedScriptInfoSource executedScriptInfoSource)
databases - The db support instances, not nullitemsToPreserve - The schema's, tables, triggers etc that should not be dropped, not nullconstraintsDisabler - Disables of constraints before clearing the database, not nullexecutedScriptInfoSource - Clears the executed scripts table, not null| Method Detail |
|---|
public void clearDatabase()
clearDatabase in interface DBClearerprotected void clearDatabase(Database database)
protected void dropTables(Database database,
String schemaName)
database - The database support, not nullschemaName - The name of the schema to drop tables from, not null
protected void dropViews(Database database,
String schemaName)
database - The database support, not nullschemaName - The name of the schema to drop views from, not null
protected void dropMaterializedViews(Database database,
String schemaName)
database - The database support, not nullschemaName - The name of the schema to drop materialized views from, not null
protected void dropSynonyms(Database database,
String schemaName)
database - The database support, not nullschemaName - The name of the schema to drop synonyms from, not null
protected void dropSequences(Database database,
String schemaName)
database - The database support, not nullschemaName - The name of the schema to drop sequences from, not null
protected void dropTriggers(Database database,
String schemaName)
database - The database support, not nullschemaName - The name of the schema to drop triggers from, not null
protected void dropStoredProcedures(Database database,
String schemaName)
protected void dropTypes(Database database,
String schemaName)
database - The database support, not nullschemaName - The name of the schema to drop types from, not null
protected void dropRules(Database database,
String schemaName)
database - The database support, not nullschemaName - The name of the schema to drop rules from, not nullprotected void assertItemsToPreserveExist(Set<DbItemIdentifier> itemsToPreserve)
protected Set<DbItemIdentifier> toDbItemIdentifiers(DbItemType type,
Database database,
String schemaName,
Set<String> itemNames)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||