1 24 package org.riotfamily.revolt.refactor; 25 26 import org.riotfamily.revolt.Dialect; 27 import org.riotfamily.revolt.Refactoring; 28 import org.riotfamily.revolt.Script; 29 import org.riotfamily.revolt.definition.Database; 30 31 35 public class DropTable implements Refactoring { 36 37 private String table; 38 39 public DropTable() { 40 } 41 42 public DropTable(String table) { 43 this.table = table; 44 } 45 46 public void setTable(String table) { 47 this.table = table; 48 } 49 50 public void alterModel(Database database) { 51 database.removeTable(table); 52 } 53 54 public Script getScript(Dialect dialect) { 55 return dialect.dropTable(table); 56 } 57 58 } 59 | Popular Tags |