m_table.setViewScript(m_viewScript);
m_table.setViewAutoUpdated(m_bViewAutoUpdated);
addAspects(schema, m_table);
RelationalSchemaAspectManager aspectManager = new RelationalSchemaAspectManager(schema)
{
protected Iterator getTableAspectIterator()
{
return schema.getTableIterator();
}
protected Iterator getTablePointcutIterator()
{
return Collections.singletonList(m_table).iterator();
}
protected Iterator getIndexAspectIterator()
{
return schema.getIndexIterator();
}
protected Iterator getIndexPointcutIterator()
{
return m_table.getIndexIterator();
}
};
aspectManager.applyAspects(0);
for (Lookup.Iterator itr = m_indexMap.valueIterator(); itr.hasNext();)
{
IndexOutline outline = (IndexOutline)itr.next();
Index index = new Index(outline.getName(), outline.getType(), m_table);
outline.copyTo(index);
m_table.addIndex(index);
}
aspectManager.applyAspects(1);
for (Lookup.Iterator itr = m_indexMap.valueIterator(); itr.hasNext();)
{
IndexOutline outline = (IndexOutline)itr.next();
Index index = m_table.getIndex(outline.getName());
if (outline.getRelatedTableName() != null)
{
schema.getTable(outline.getRelatedTableName()).addRelatedKey(index);
}
}
aspectManager.applyAspects(2);
if (m_hintList != null)
{
for (int i = 0, nCount = m_hintList.size(); i < nCount; ++i)
{