Quantum version 2.4.2
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / sql / parser / DropEntityStatement.java
diff --git a/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/sql/parser/DropEntityStatement.java b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/sql/parser/DropEntityStatement.java
new file mode 100644 (file)
index 0000000..61edb06
--- /dev/null
@@ -0,0 +1,46 @@
+package com.quantum.sql.parser;
+
+import com.quantum.model.Entity;
+
+
+/**
+ * Drop a table, view or sequence.
+ * 
+ * @author BC Holmes
+ */
+public class DropEntityStatement implements SQL {
+
+       private String tableName;
+       private String type = Entity.TABLE_TYPE;
+       private String dependentRule = "";
+       
+       /**
+        * @see com.quantum.sql.parser.SQL#getCommand()
+        */
+       public String getCommand() {
+               return "DROP " + getType().toUpperCase();
+       }
+       
+       public String getTableName() {
+               return this.tableName;
+       }
+       public void setTableName(String tableName) {
+               this.tableName = tableName;
+       }
+       
+       public String toString() {
+               return getCommand() + " " + getTableName() + " " + this.dependentRule;
+       }
+       public String getType() {
+               return this.type;
+       }
+       public void setType(String type) {
+               this.type = type;
+       }
+       public String getDependentRule() {
+               return this.dependentRule;
+       }
+       public void setDependentRule(String dependentRule) {
+               this.dependentRule = dependentRule;
+       }
+}