1 11 12 package com.nilostep.xlsql.sql; 13 14 import com.nilostep.xlsql.database.xlDatabase; 15 import com.nilostep.xlsql.database.*; 16 17 import java.sql.*; 18 19 24 public class xlSqlDropTable implements xlSqlCommand { 25 27 protected com.nilostep.xlsql.database.xlDatabase db; 28 protected String _schema; 29 protected String _table; 30 31 38 public xlSqlDropTable(com.nilostep.xlsql.database.xlDatabase database, String schema, String table) { 39 if (database == null) { 40 throw new NullPointerException ("xlSQL: database null"); 41 } else { 42 db = database; 43 } 44 45 if (schema == null) { 46 throw new NullPointerException ("xlSQL: schema null"); 47 } else { 48 _schema = schema; 49 } 50 51 if (table == null) { 52 throw new NullPointerException ("xlSQL: table null"); 53 } else { 54 _table = table; 55 } 56 } 57 58 64 public boolean execAllowed() throws SQLException { 65 boolean ret = true; 66 return ret; 67 } 68 69 73 public void execute() throws SQLException { 74 db.removeTable(_schema, _table); 75 } 76 } | Popular Tags |