/* TODO: sort the list. */
}
private void populateAvailableTable(JTable table) {
DatabaseObjectInfoTableModel model = (DatabaseObjectInfoTableModel) table.getModel();
try {
String catalog = _session.getSQLConnection().getCatalog();
SQLDatabaseMetaData metaData = _session.getSQLConnection().getSQLMetaData();
int i;
/* add the tables. */
ITableInfo[] tables = _session.getSchemaInfo().getITableInfos(catalog,null,new ObjFilterMatcher(),new String[] { "TABLE" });
for (i = 0; i < tables.length; i++)
model.addElement(tables[i]);
/* add the views. */
ITableInfo[] views = _session.getSchemaInfo().getITableInfos(catalog,null,new ObjFilterMatcher(),new String[] { "VIEW" });
for (i = 0; i < views.length; i++)
model.addElement(views[i]);
/* add the procedures. */
//IProcedureInfo[] procs = metaData.getProcedures(catalog,null,null);
IProcedureInfo[] procs = _session.getSchemaInfo().getStoredProceduresInfos(catalog,null,new ObjFilterMatcher());
for (i = 0; i < procs.length; i++)
if (!procs[i].getSimpleName().startsWith("dt_"))
model.addElement(procs[i]);
/* add the UDTs. */
IUDTInfo[] udts = metaData.getUDTs(catalog,null,null,null);
for (i = 0; i < udts.length; i++)
model.addElement(udts[i]);
}
catch (SQLException ex) {
_session.getApplication().showErrorDialog(ex.getMessage(),ex);
}
}