state.removeIndex((String)itr.next());
}
// Apply all table-aspects to the table to get full list of indexes coming from aspects
final Table pointcut = new Table(new RelationalSchema());
AspectManager aspectManager = new AspectManager()
{
// override to avoid logging
public void applyAspects(int nPass) throws MetadataException
{
if (nPass == 0)
{
addAspects();
}
for (int i = 0, n = pointcut.getAspectCount(); i < n; ++i)
{
Aspect aspect = pointcut.getAspect(i);
if (m_aspectNameSet.contains(aspect.getName()))
{
aspect.applyTo(pointcut, nPass);
}
}
}
protected Iterator getAspectIterator()
{
return schema.getTableIterator();
}
protected Iterator getPointcutIterator()
{
return Collections.singletonList(pointcut).iterator();
}
protected void setProperties(MetadataMarker e, Pointcut pointcut, Aspect aspect)
{
}
};
pointcut.setType(Table.EXTERNAL);
pointcut.setName(getName());
pointcut.setType(getType());
addAspects(schema, pointcut);
aspectManager.applyAspects(0);
aspectManager.applyAspects(1);
for (int i = pointcut.getIndexCount() - 1; i >= 0; --i)
{
state.removeIndex(pointcut.getIndex(i).getName());
}