latest quantum sources 2.3.2
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / view / bookmark / EntityNode.java
index 6d5adbe..eb9d742 100644 (file)
@@ -1,8 +1,11 @@
 package com.quantum.view.bookmark;
 
+import java.sql.SQLException;
+
 import com.quantum.model.Column;
 import com.quantum.model.Entity;
 import com.quantum.model.EntityHolder;
+import com.quantum.model.NotConnectedException;
 import com.quantum.model.SchemaHolder;
 import com.quantum.model.Table;
 import com.quantum.model.View;
@@ -31,7 +34,7 @@ public class EntityNode extends TreeNode implements EntityHolder {
         }
     }
 
-    public Object[] getChildren() {
+    public Object[] getChildren() throws NotConnectedException, SQLException {
         initializeChildren();
         if (this.children.size() > 0) {
             return (ColumnNode[]) this.children.toArray(new ColumnNode[this.children.size()]);
@@ -40,7 +43,7 @@ public class EntityNode extends TreeNode implements EntityHolder {
         }
     }
 
-    protected synchronized void initializeChildren() {
+    protected synchronized void initializeChildren() throws NotConnectedException, SQLException {
         this.children.clear();
         Column[] columns = this.entity.getColumns();
         for (int i = 0, length = (columns == null) ? 0 : columns.length;
@@ -68,7 +71,7 @@ public class EntityNode extends TreeNode implements EntityHolder {
     }
     
     public String getLabelName() {
-        return (this.longFormName) ? this.entity.getCondQualifiedName() : this.entity.getName();
+        return (this.longFormName) ? this.entity.getQualifiedName() : this.entity.getName();
     }
     
     public boolean isTable() {
@@ -119,8 +122,8 @@ public class EntityNode extends TreeNode implements EntityHolder {
     public int compareTo(Object o) {
         if (o instanceof EntityNode) {
             EntityNode that = (EntityNode) o;
-            return this.entity.getCondQualifiedName().compareTo(
-                that.entity.getCondQualifiedName());
+            return this.entity.getQualifiedName().compareTo(
+                that.entity.getQualifiedName());
         } else {
             return super.compareTo(o);
         }