upgrade.addStep(drop);
}
else if (sElement.equals("CreateIndex"))
{
CreateIndexStep create = new CreateIndexStep();
create.setTableName(XMLMetadataHelper.getNameAttr(stepElement, "table", XMLMetadataHelper.NAME_DOT));
IndexOutline outline = new IndexOutline();
loadIndexOutline(stepElement, outline);
create.setOutline(outline);
upgrade.addStep(create);
}
else if (sElement.equals("RenameIndex"))
{
RenameIndexStep ren = new RenameIndexStep();
ren.setOldName(XMLMetadataHelper.getNameAttr(stepElement, "name", XMLMetadataHelper.NAME_DOT));
ren.setNewName(XMLMetadataHelper.getNameAttr(stepElement, "to", XMLMetadataHelper.NAME_DOT));
upgrade.addStep(ren);
}
else if (sElement.equals("DropIndex"))
{
DropIndexStep drop = new DropIndexStep();
drop.setName(XMLMetadataHelper.getNameAttr(stepElement, "name", XMLMetadataHelper.NAME_DOT));
upgrade.addStep(drop);
}
else if (sElement.equals("ApplyIndexAspect"))
{
final ApplyIndexAspectStep apply = new ApplyIndexAspectStep();
apply.setAspectName(XMLMetadataHelper.getNameAttr(stepElement, "name", XMLMetadataHelper.NAME_DOT));
apply.setOverride(XMLUtil.getBooleanAttr(stepElement, "override", apply.isOverride()));
XMLMetadataLoader.parsePatterns(XMLUtil.getStringAttr(stepElement, "pointcuts"),
new XMLMetadataLoader.PatternHandler()
{
public void handlePattern(String sPattern, boolean bInclusive)
{
apply.addPointcutPattern(sPattern, bInclusive);
}
});
upgrade.addStep(apply);
}
else if (sElement.equals("RemoveIndexAspect"))
{
final RemoveIndexAspectStep remove = new RemoveIndexAspectStep();
remove.setAspectName(XMLMetadataHelper.getNameAttr(stepElement, "name", XMLMetadataHelper.NAME_DOT));
remove.setOverride(XMLUtil.getBooleanAttr(stepElement, "override", remove.isOverride()));
XMLMetadataLoader.parsePatterns(XMLUtil.getStringAttr(stepElement, "pointcuts"),
new XMLMetadataLoader.PatternHandler()
{
public void handlePattern(String sPattern, boolean bInclusive)
{
remove.addPointcutPattern(sPattern, bInclusive);
}
});
upgrade.addStep(remove);
}
else if (sElement.equals("CreateObject"))
{
CreateObjectStep create = new CreateObjectStep();
SQLScript script = new SQLScript();
create.setName(
XMLMetadataHelper.getNameAttr(stepElement, "name", XMLMetadataHelper.NAME_DOT));
loadSQLScript(stepElement, script);
create.setScript(script);
upgrade.addStep(create);
}
else if (sElement.equals("DropObject"))
{
DropObjectStep drop = new DropObjectStep();