use of org.talend.dq.indicators.ConnectionEvaluator in project tdq-studio-se by Talend.
the class ConnectionAnalysisExecutor method evaluate.
/*
* (non-Javadoc)
*
* @see org.talend.dq.analysis.AnalysisExecutor#runAnalysis(org.talend.dataquality.analysis.Analysis,
* java.lang.String)
*/
@Override
protected ReturnCode evaluate(Analysis analysis, java.sql.Connection connection, String sqlStatement) {
ConnectionEvaluator eval = new ConnectionEvaluator();
// MOD xqliu 2009-02-09 bug 6237
eval.setMonitor(getMonitor());
// // --- add indicators
EList<Indicator> indicators = analysis.getResults().getIndicators();
for (Indicator indicator : indicators) {
ModelElement analyzedElement = indicator.getAnalyzedElement();
if (analyzedElement == null) {
continue;
}
Connection dataProvider = SwitchHelpers.CONNECTION_SWITCH.doSwitch(analyzedElement);
if (dataProvider == null) {
continue;
}
eval.storeIndicator(dataProvider, indicator);
// ADDED rli 2008-07-10 fixed for the SchemaIndicator will increased after connection analysis running.
indicator.reset();
}
ReturnCode retCode = runAnalysisLow(analysis, sqlStatement, eval, connection);
if (getMonitor() != null) {
getMonitor().worked(compIndicatorsWorked);
}
return retCode;
}
Aggregations