Class DropTablesTool
- java.lang.Object
-
- de.akquinet.jbosscc.guttenbase.tools.DropTablesTool
-
public class DropTablesTool extends Object
Will drop tables in given schema. USE WITH CARE!© 2012-2034 akquinet tech@spree
- Author:
- M. Dahm
Hint is used by
TableOrderHintto determine order of tables
-
-
Constructor Summary
Constructors Constructor Description DropTablesTool(ConnectorRepository connectorRepository)DropTablesTool(ConnectorRepository connectorRepository, String dropTablesSuffix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearTables(String targetId)List<String>createDeleteTableStatements(String connectorId)List<String>createDropForeignKeyStatements(String connectorId)List<String>createDropIndexesStatements(String connectorId)List<String>createDropTableStatements(String connectorId)voiddropForeignKeys(String targetId)voiddropIndexes(String targetId)voiddropTables(String targetId)
-
-
-
Constructor Detail
-
DropTablesTool
public DropTablesTool(ConnectorRepository connectorRepository, String dropTablesSuffix)
- Parameters:
connectorRepository- connector repositorydropTablesSuffix- Some DBs support cascading DROPs, e.g. Postgresql DROP TABLE .... CASCADE;
-
DropTablesTool
public DropTablesTool(ConnectorRepository connectorRepository)
-
-
Method Detail
-
createDropForeignKeyStatements
public List<String> createDropForeignKeyStatements(String connectorId)
-
dropTables
public void dropTables(String targetId) throws SQLException
- Throws:
SQLException
-
clearTables
public void clearTables(String targetId) throws SQLException
- Throws:
SQLException
-
dropIndexes
public void dropIndexes(String targetId) throws SQLException
- Throws:
SQLException
-
dropForeignKeys
public void dropForeignKeys(String targetId) throws SQLException
- Throws:
SQLException
-
-