return;
}
}
// Run SchemaTool
StoreManager storeMgr = nucleusCtx.getStoreManager();
if (!(storeMgr instanceof SchemaAwareStoreManager))
{
LOGGER.error("StoreManager of type " + storeMgr.getClass().getName() +
" is not schema-aware so cannot be used with SchemaTool");
System.exit(2);
return;
}
SchemaAwareStoreManager schemaStoreMgr = (SchemaAwareStoreManager) storeMgr;
try
{
if (mode == SCHEMATOOL_CREATE_MODE)
{
tool.createSchema(schemaStoreMgr, classNames);
}
else if (mode == SCHEMATOOL_DELETE_MODE)
{
tool.deleteSchema(schemaStoreMgr, classNames);
}
else if (mode == SCHEMATOOL_VALIDATE_MODE)
{
tool.validateSchema(schemaStoreMgr, classNames);
}
else if (mode == SCHEMATOOL_DATABASE_INFO_MODE)
{
storeMgr.printInformation("DATASTORE", System.out);
}
else if (mode == SCHEMATOOL_SCHEMA_INFO_MODE)
{
storeMgr.printInformation("SCHEMA", System.out);
}
msg = LOCALISER.msg(false, "014043");
LOGGER.info(msg);
System.out.println(msg);