X-Git-Url: http://git.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/view/subset/EntitySubset.java b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/view/subset/EntitySubset.java index 0b70c9d..853d135 100644 --- a/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/view/subset/EntitySubset.java +++ b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/view/subset/EntitySubset.java @@ -6,7 +6,9 @@ import com.quantum.model.Bookmark; import com.quantum.model.BookmarkCollection; import com.quantum.model.Column; import com.quantum.model.Entity; +import com.quantum.model.ForeignKey; import com.quantum.model.Index; +import com.quantum.model.NotConnectedException; import com.quantum.model.Schema; /** @@ -40,8 +42,14 @@ public class EntitySubset implements Entity { // TODO: limit the columns Entity relatedEntity = getEntityFromBookmark(); if (relatedEntity != null) { - Column[] columns = relatedEntity.getColumns(); - return columns; + try { + Column[] columns = relatedEntity.getColumns(); + return columns; + } catch (NotConnectedException e) { + return new Column[0]; + } catch (SQLException e) { + return new Column[0]; + } } else { return null; } @@ -51,13 +59,13 @@ public class EntitySubset implements Entity { return new Index[0]; } - public Column getColumn(String columnName) { + public Column getColumn(String columnName) throws NotConnectedException, SQLException { Entity relatedEntity = getEntityFromBookmark(); return relatedEntity == null ? null : relatedEntity.getColumn(columnName); } - public String getCondQualifiedName() { + public String getQualifiedName() { return this.schema + "." + this.name; } @@ -81,6 +89,38 @@ public class EntitySubset implements Entity { * @see com.quantum.model.Entity#getQuotedTableName() */ public String getQuotedTableName() { - return getBookmark().getAdapter().filterTableName(getCondQualifiedName()); + return getBookmark().getAdapter().filterTableName(getQualifiedName()); } + + /* (non-Javadoc) + * @see java.lang.Comparable#compareTo(java.lang.Object) + */ + public int compareTo(Object arg0) { + // TODO Auto-generated method stub + return 0; + } + + /* (non-Javadoc) + * @see com.quantum.model.Entity#getExportedKeys() + */ + public ForeignKey[] getExportedKeys() throws NotConnectedException, SQLException { + // TODO Auto-generated method stub + return null; + } + + /* (non-Javadoc) + * @see com.quantum.model.Entity#getImportedKeys() + */ + public ForeignKey[] getImportedKeys() throws NotConnectedException, SQLException { + // TODO Auto-generated method stub + return null; + } + + /* (non-Javadoc) + * @see com.quantum.model.Entity#getReferences() + */ + public ForeignKey[] getReferences() throws NotConnectedException, SQLException { + // TODO Auto-generated method stub + return null; + } }