// Add table types to list.
if (_tableTypes.length > 0)
{
for (int i = 0; i < _tableTypes.length; ++i)
{
IDatabaseObjectInfo dbo = new DatabaseObjectInfo(catalogName,
schemaName, _tableTypes[i],
DatabaseObjectType.TABLE_TYPE_DBO, md);
ObjectTreeNode child = new ObjectTreeNode(session, dbo);
list.add(child);
}
}
else
{
s_log.debug("List of table types is empty so trying null table type to load all tables");
IDatabaseObjectInfo dbo = new DatabaseObjectInfo(catalogName,
schemaName, null,
DatabaseObjectType.TABLE_TYPE_DBO, md);
ObjectTreeNode child = new ObjectTreeNode(session, dbo);
child.setUserObject("TABLE");
list.add(child);
}
// Add stored proc parent node.
boolean supportsStoredProcs = false;
try
{
supportsStoredProcs = md.supportsStoredProcedures();
}
catch (SQLException ex)
{
s_log.debug("DBMS doesn't support 'supportsStoredProcedures()'", ex);
}
if (supportsStoredProcs)
{
IDatabaseObjectInfo dbo = new DatabaseObjectInfo(catalogName,
schemaName, "PROCEDURE",
DatabaseObjectType.PROC_TYPE_DBO, md);
ObjectTreeNode child = new ObjectTreeNode(session, dbo);
list.add(child);
}
// Add UDT parent node.
{
IDatabaseObjectInfo dbo = new DatabaseObjectInfo(catalogName,
schemaName, "UDT",
DatabaseObjectType.UDT_TYPE_DBO, md);
ObjectTreeNode child = new ObjectTreeNode(session, dbo);
list.add(child);
}