uk.ac.ed.inf.utils.database
Class DbCreator

java.lang.Object
  extended by uk.ac.ed.inf.utils.database.DbManaged
      extended by uk.ac.ed.inf.utils.database.DbCreator

public class DbCreator
extends DbManaged

Class

Version:
20 Feb 2009
Author:
Luna De Ferrari luna.deferrari-at-ed.ac.uk

Constructor Summary
DbCreator(DbManager dbManager)
           
 
Method Summary
 boolean dropTable(java.lang.String tableName)
          Drops the database table.
 java.lang.String getSqlToDropTable(java.lang.String tableName)
          Get sql command to drop table
 
Methods inherited from class uk.ac.ed.inf.utils.database.DbManaged
getDbConnection, getDbManager
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbCreator

public DbCreator(DbManager dbManager)
Method Detail

dropTable

public boolean dropTable(java.lang.String tableName)
Drops the database table. Beware! risk of data loss. Better to rename the old table and relaunch than to drop the table.

Returns:
true if the table does not exist in the database anymore

getSqlToDropTable

public java.lang.String getSqlToDropTable(java.lang.String tableName)
Get sql command to drop table

Returns:
the drop table SQL command