1 package net.sourceforge.phpdt.sql.view.bookmark;
3 import java.util.Vector;
5 public class TableNode implements TreeNode, Comparable {
6 private Vector metadata;
7 private BookmarkNode parent;
11 public TableNode(BookmarkNode parent, String tableName) {
13 this.name = tableName;
16 public Object[] getChildren() {
17 if (metadata != null) {
18 return metadata.toArray();
20 return Root.EMPTY_ARRAY;
24 public Object getParent() {
28 public boolean hasChildren() {
29 return (metadata != null) && (metadata.size() > 0);
32 public String getName() {
36 public String toString() {
40 public int compareTo(Object o) {
41 if (o instanceof TableNode) {
42 TableNode node = (TableNode) o;
43 return name.compareTo(node.getName());
44 } else if (o instanceof ViewNode ||
45 o instanceof SequenceNode) {
51 public int getSize() {
55 public void setSize(int size) {
59 public void setMetadata(Vector metadata) {
60 this.metadata = metadata;