use of org.pentaho.di.trans.dataservice.optimization.AutoOptimizationService in project pdi-dataservice-server-plugin by pentaho.
the class ParameterGenerationController method runAutoGenerate.
public void runAutoGenerate() throws XulException {
DataServiceModel dialogModel = model.getDialogModel();
try {
AutoOptimizationService autoOptimizationService = factory.createAutoOptimizationService();
Collection<PushDownOptimizationMeta> found = autoOptimizationService.apply(dialogModel.getDataService());
if (dialogModel.addAll(found)) {
model.updateParameterMap();
}
info(getString(PKG, "ParameterGenerationController.AutoGen.Title"), getString(PKG, "ParameterGenerationController.AutoGen.Message", found.size()));
} catch (Exception e) {
String message = getString(PKG, "ParameterGenerationController.AutoGen.Error");
getLogChannel().logError(message, e);
error(getString(PKG, "ParameterGenerationController.AutoGen.Title"), message);
}
}
Aggregations