Search in sources :

Example 6 with MatchRuleTableComposite

use of org.talend.dataquality.record.linkage.ui.composite.MatchRuleTableComposite in project tdq-studio-se by Talend.

the class MatchingKeySection method checkAndRemoveEmptyMatchRule.

/**
 * check and remove empty match rule
 */
protected void checkAndRemoveEmptyMatchRule(CTabItem theTab) {
    MatchRuleTableComposite matchRuleTableComp = (MatchRuleTableComposite) getMatchRuleComposite(theTab);
    EList<MatchKeyDefinition> matchKeys = matchRuleTableComp.getMatchRule().getMatchKeys();
    if (matchKeys.size() <= 0) {
        getMatchRuleList().remove(matchRuleTableComp.getMatchRule());
    }
}
Also used : MatchRuleTableComposite(org.talend.dataquality.record.linkage.ui.composite.MatchRuleTableComposite) MatchKeyDefinition(org.talend.dataquality.rules.MatchKeyDefinition)

Example 7 with MatchRuleTableComposite

use of org.talend.dataquality.record.linkage.ui.composite.MatchRuleTableComposite in project tdq-studio-se by Talend.

the class MatchingKeySection method getCurrentMatchRule.

protected MatchRule getCurrentMatchRule() throws Exception {
    CTabItem currentTabItem = ruleFolder.getSelection();
    if (currentTabItem == null) {
        // $NON-NLS-1$
        throw new Exception(DefaultMessagesImpl.getString("MatchingKeySection.ONE_MATCH_RULE_REQUIRED"));
    }
    MatchRuleTableComposite matchRuleTableComp = (MatchRuleTableComposite) getMatchRuleComposite(currentTabItem);
    MatchRule matchRule = matchRuleTableComp.getMatchRule();
    return matchRule;
}
Also used : MatchRuleTableComposite(org.talend.dataquality.record.linkage.ui.composite.MatchRuleTableComposite) MatchRule(org.talend.dataquality.rules.MatchRule) CTabItem(org.eclipse.swt.custom.CTabItem)

Example 8 with MatchRuleTableComposite

use of org.talend.dataquality.record.linkage.ui.composite.MatchRuleTableComposite in project tdq-studio-se by Talend.

the class MatchingKeySection method removeMatchKeyFromCurrentMatchRule.

/**
 * Remove the match key by column name from current selected match rule tab.
 *
 * @param column
 */
public void removeMatchKeyFromCurrentMatchRule(MatchKeyDefinition columnkey) {
    MatchRuleTableComposite matchRuleTableComp = (MatchRuleTableComposite) getCurrentMatchRuleTableComposite();
    matchRuleTableComp.removeKeyDefinition(columnkey, matchRuleTableComp.getMatchRule().getMatchKeys());
}
Also used : MatchRuleTableComposite(org.talend.dataquality.record.linkage.ui.composite.MatchRuleTableComposite)

Example 9 with MatchRuleTableComposite

use of org.talend.dataquality.record.linkage.ui.composite.MatchRuleTableComposite in project tdq-studio-se by Talend.

the class MatchingKeySection method removeMatchKeyFromCurrentMatchRule.

/**
 * Remove the match key by column name from current selected match rule tab.
 *
 * @param column
 */
public void removeMatchKeyFromCurrentMatchRule(String column) {
    MatchRuleTableComposite matchRuleTableComp = (MatchRuleTableComposite) getCurrentMatchRuleTableComposite();
    matchRuleTableComp.removeKeyDefinition(column, matchRuleTableComp.getMatchRule().getMatchKeys());
}
Also used : MatchRuleTableComposite(org.talend.dataquality.record.linkage.ui.composite.MatchRuleTableComposite)

Aggregations

MatchRuleTableComposite (org.talend.dataquality.record.linkage.ui.composite.MatchRuleTableComposite)9 MatchRule (org.talend.dataquality.rules.MatchRule)2 CTabItem (org.eclipse.swt.custom.CTabItem)1 MatchKeyDefinition (org.talend.dataquality.rules.MatchKeyDefinition)1