SQL Plugin copied from Quantum plugin and refactored for PHPEclipse
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.sql / src / net / sourceforge / phpdt / sql / view / bookmark / MetaDataNode.java
diff --git a/archive/net.sourceforge.phpeclipse.sql/src/net/sourceforge/phpdt/sql/view/bookmark/MetaDataNode.java b/archive/net.sourceforge.phpeclipse.sql/src/net/sourceforge/phpdt/sql/view/bookmark/MetaDataNode.java
new file mode 100644 (file)
index 0000000..26b71e0
--- /dev/null
@@ -0,0 +1,49 @@
+package net.sourceforge.phpdt.sql.view.bookmark;
+
+public class MetaDataNode implements TreeNode {
+       TreeNode parent;
+       String name;
+       String type;
+       
+       public MetaDataNode(TableNode node, String name, String type) {
+               this.parent = node;
+               this.name = name;
+               this.type = type;
+       }
+       public MetaDataNode(ViewNode node, String name, String type) {
+               this.parent = node;
+               this.name = name;
+               this.type = type;
+       }
+       public String getName() {
+               return name;
+       }
+
+       public String getType() {
+               return type;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+
+       public void setType(String type) {
+               this.type = type;
+       }
+
+       public Object[] getChildren() {
+               return Root.EMPTY_ARRAY;
+       }
+
+       public Object getParent() {
+               return parent;
+       }
+
+       public boolean hasChildren() {
+               return false;
+       }
+
+       public String toString() {
+               return name + " " + type;
+       }
+}