m_tableFixupList = new ArrayList(256);
m_indexFixupList = new ArrayList(256);
m_aspectFixupList = new ArrayList(256);
m_keyFixupList = new ArrayList(256);
XMLUtil.withFirstChildElement(element, "Tables", false, new ElementHandler()
{
public void handleElement(Element tablesElement)
{
XMLUtil.forEachChildElement(tablesElement, "Table",
getHelper().new ElementHandler("table")
{
public void handleElement(Element tableElement, String sTableName)
{
XMLMetadataHelper.validateName(sTableName, XMLMetadataHelper.NAME_DOT);
Table table = new Table(m_schema);
loadTable(tableElement, sTableName, table);
m_schema.addTable(table);
}
});
}
});
getHelper().fixup(m_tableFixupList.iterator());
m_tableFixupList = null;
RelationalSchemaAspectManager aspectManager = new RelationalSchemaAspectManager(m_schema)
{
protected Iterator getTableAspectIterator()
{
return m_schema.getTableIterator();
}
protected Iterator getTablePointcutIterator()
{
return m_schema.getTableIterator();
}
protected Iterator getIndexAspectIterator()
{
return m_schema.getIndexIterator();
}
protected Iterator getIndexPointcutIterator()
{
return m_schema.getIndexIterator();
}
};
aspectManager.applyAspects(0);
getHelper().fixup(m_indexFixupList.iterator());
m_indexFixupList = null;
aspectManager.applyAspects(1);
getHelper().fixup(m_aspectFixupList.iterator());
m_aspectFixupList = null;
aspectManager.applyAspects(2);
getHelper().fixup(m_keyFixupList.iterator());
m_keyFixupList = null;
String sVersionTable = XMLUtil.getStringAttr(element, "versionTable");
if (sVersionTable != null)
{
m_schema.setVersionTable(m_schema.getTable(sVersionTable));
}
XMLUtil.withFirstChildElement(element, "Objects", false, new ElementHandler()
{
public void handleElement(Element tablesElement)
{
XMLUtil.forEachChildElement(tablesElement, "Object",
getHelper().new ElementHandler("object")
{
public void handleElement(Element objectElement, String sObjectName)
{
XMLMetadataHelper.validateName(sObjectName, XMLMetadataHelper.NAME_DOT);