Search in sources :

Example 1 with IndicatorSqlFactory

use of org.talend.dataquality.indicators.sql.IndicatorSqlFactory in project tdq-studio-se by Talend.

the class TableIndicator method createSpecialIndicatorUnit.

private TableIndicatorUnit createSpecialIndicatorUnit(IndicatorDefinition whereRule, IndicatorEnum indicatorEnum, Indicator indicator) {
    Indicator indicatorNew = indicator;
    if (indicatorNew == null) {
        IndicatorSqlFactory factory = IndicatorSqlFactory.eINSTANCE;
        indicatorNew = (Indicator) factory.create(indicatorEnum.getIndicatorType());
        if (whereRule != null && indicatorNew instanceof WhereRuleIndicator) {
            indicatorNew.setAnalyzedElement(getColumnSet());
            indicatorNew.setIndicatorDefinition(whereRule);
        }
    }
    if (!indicatorEnumList.contains(indicatorEnum)) {
        this.indicatorEnumList.add(indicatorEnum);
    }
    if (this.specialIndicatorUnitList == null) {
        this.specialIndicatorUnitList = new ArrayList<TableIndicatorUnit>();
    }
    TableIndicatorUnit indicatorUnit = new TableIndicatorUnit(indicatorEnum, indicatorNew, this);
    specialIndicatorUnitList.add(indicatorUnit);
    return indicatorUnit;
}
Also used : IndicatorSqlFactory(org.talend.dataquality.indicators.sql.IndicatorSqlFactory) WhereRuleIndicator(org.talend.dataquality.indicators.sql.WhereRuleIndicator) TableIndicatorUnit(org.talend.dataprofiler.core.ui.editor.preview.TableIndicatorUnit) Indicator(org.talend.dataquality.indicators.Indicator) RowCountIndicator(org.talend.dataquality.indicators.RowCountIndicator) WhereRuleIndicator(org.talend.dataquality.indicators.sql.WhereRuleIndicator)

Aggregations

TableIndicatorUnit (org.talend.dataprofiler.core.ui.editor.preview.TableIndicatorUnit)1 Indicator (org.talend.dataquality.indicators.Indicator)1 RowCountIndicator (org.talend.dataquality.indicators.RowCountIndicator)1 IndicatorSqlFactory (org.talend.dataquality.indicators.sql.IndicatorSqlFactory)1 WhereRuleIndicator (org.talend.dataquality.indicators.sql.WhereRuleIndicator)1