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
1 package net.sourceforge.phpdt.sql.view.bookmark;
2
3 public class MetaDataNode implements TreeNode {
4         TreeNode parent;
5         String name;
6         String type;
7         
8         public MetaDataNode(TableNode node, String name, String type) {
9                 this.parent = node;
10                 this.name = name;
11                 this.type = type;
12         }
13         public MetaDataNode(ViewNode node, String name, String type) {
14                 this.parent = node;
15                 this.name = name;
16                 this.type = type;
17         }
18         public String getName() {
19                 return name;
20         }
21
22         public String getType() {
23                 return type;
24         }
25
26         public void setName(String name) {
27                 this.name = name;
28         }
29
30         public void setType(String type) {
31                 this.type = type;
32         }
33
34         public Object[] getChildren() {
35                 return Root.EMPTY_ARRAY;
36         }
37
38         public Object getParent() {
39                 return parent;
40         }
41
42         public boolean hasChildren() {
43                 return false;
44         }
45
46         public String toString() {
47                 return name + " " + type;
48         }
49 }