Search in sources :

Example 1 with RowCountIndicatorsAdapter

use of org.talend.dataquality.helpers.RowCountIndicatorsAdapter in project tdq-studio-se by Talend.

the class ColumnAnalysisSqlExecutor method addElements2IndicatorsMapping.

/**
 * add mapping of analyzed elements to their indicators.
 *
 * @param elementToIndicator
 * @param indicator
 */
protected void addElements2IndicatorsMapping(Map<ModelElement, List<Indicator>> elementToIndicator, Indicator indicator) {
    // to set rowcount for each element
    if (indicator instanceof RowCountIndicatorsAdapter) {
        RowCountIndicatorsAdapter indicator1 = (RowCountIndicatorsAdapter) indicator;
        Set<RowCountIndicator> rowCountIndiSet = indicator1.getRowCountIndiSet();
        for (RowCountIndicator rowCountInd : rowCountIndiSet) {
            MultiMapHelper.addUniqueObjectToListMap(rowCountInd.getAnalyzedElement(), indicator, elementToIndicator);
        }
    } else {
        MultiMapHelper.addUniqueObjectToListMap(indicator.getAnalyzedElement(), indicator, elementToIndicator);
    }
}
Also used : RowCountIndicatorsAdapter(org.talend.dataquality.helpers.RowCountIndicatorsAdapter) RowCountIndicator(org.talend.dataquality.indicators.RowCountIndicator)

Aggregations

RowCountIndicatorsAdapter (org.talend.dataquality.helpers.RowCountIndicatorsAdapter)1 RowCountIndicator (org.talend.dataquality.indicators.RowCountIndicator)1