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;
}
Aggregations