*/
public Map<String,Database> getLinkedDatabases();
+
+ /**
+ * Returns {@code true} if this Database links to the given Table, {@code
+ * false} otherwise.
+ * @usage _general_method_
+ */
+ public boolean isLinkedTable(Table table) throws IOException;
+
/**
* Gets currently configured TimeZone (always non-{@code null}).
* @usage _intermediate_method_
Collections.unmodifiableMap(_linkedDbs));
}
+ public boolean isLinkedTable(Table table) throws IOException {
+
+ if((table == null) || (this == table.getDatabase())) {
+ // if the table is null or this db owns the table, not linked
+ return false;
+ }
+
+ TableInfo tableInfo = lookupTable(table.getName());
+
+ return((tableInfo != null) &&
+ tableInfo.isLinked() &&
+ (_linkedDbs != null) &&
+ (_linkedDbs.get(((LinkedTableInfo)tableInfo).linkedDbName) ==
+ table.getDatabase()));
+ }
+
public TimeZone getTimeZone() {
return _timeZone;
}