Search in sources :

Example 1 with WSWhereOperator

use of com.amalto.workbench.webservices.WSWhereOperator in project tmdm-studio-se by Talend.

the class Util method convertLine.

public static WSWhereCondition convertLine(String[] values) {
    WSWhereCondition wc = new WSWhereCondition();
    wc.setLeftPath(values[0]);
    WSWhereOperator operator = null;
    if (values[1].equals("Contains")) {
        // $NON-NLS-1$
        operator = WSWhereOperator.CONTAINS;
    } else if (values[1].equals("contains the sentence")) {
        // $NON-NLS-1$
        operator = WSWhereOperator.CONTAINS_SENTENCE;
    } else if (values[1].equals("Join With")) {
        // $NON-NLS-1$
        operator = WSWhereOperator.JOIN;
    } else if (values[1].equals("=")) {
        // $NON-NLS-1$
        operator = WSWhereOperator.EQUALS;
    } else if (values[1].equals(">")) {
        // $NON-NLS-1$
        operator = WSWhereOperator.GREATER_THAN;
    } else if (values[1].equals(">=")) {
        // $NON-NLS-1$
        operator = WSWhereOperator.GREATER_THAN_OR_EQUAL;
    } else if (values[1].equals("<")) {
        // $NON-NLS-1$
        operator = WSWhereOperator.LOWER_THAN;
    } else if (values[1].equals("<=")) {
        // $NON-NLS-1$
        operator = WSWhereOperator.LOWER_THAN_OR_EQUAL;
    } else if (values[1].equals("!=")) {
        // $NON-NLS-1$
        operator = WSWhereOperator.NOT_EQUALS;
    } else if (values[1].equals("Starts With")) {
        // $NON-NLS-1$
        operator = WSWhereOperator.STARTSWITH;
    } else if (values[1].equals("Is Empty Or Null")) {
        // $NON-NLS-1$
        operator = WSWhereOperator.EMPTY_NULL;
    } else if (values[1].equals("whole content contains")) {
        // $NON-NLS-1$
        operator = WSWhereOperator.FULLTEXTSEARCH;
    }
    wc.setOperator(operator);
    wc.setRightValueOrPath(values[2]);
    WSStringPredicate predicate = null;
    if (values[3].equals("")) {
        // $NON-NLS-1$
        predicate = WSStringPredicate.NONE;
    } else if (values[3].equals("Or")) {
        // $NON-NLS-1$
        predicate = WSStringPredicate.OR;
    }
    if (values[3].equals("And")) {
        // $NON-NLS-1$
        predicate = WSStringPredicate.AND;
    }
    if (values[3].equals("Not")) {
        // $NON-NLS-1$
        predicate = WSStringPredicate.NOT;
    }
    wc.setStringPredicate(predicate);
    return wc;
}
Also used : WSWhereOperator(com.amalto.workbench.webservices.WSWhereOperator) WSStringPredicate(com.amalto.workbench.webservices.WSStringPredicate) WSWhereCondition(com.amalto.workbench.webservices.WSWhereCondition)

Example 2 with WSWhereOperator

use of com.amalto.workbench.webservices.WSWhereOperator in project tmdm-studio-se by Talend.

the class ViewOperatorUpdator method getOperators.

protected List<String> getOperators() {
    if (operators == null) {
        operators = new ArrayList<String>();
        WSWhereOperator[] values = WSWhereOperator.values();
        for (WSWhereOperator op : values) {
            operators.add(op.name());
        }
    }
    return operators;
}
Also used : WSWhereOperator(com.amalto.workbench.webservices.WSWhereOperator)

Aggregations

WSWhereOperator (com.amalto.workbench.webservices.WSWhereOperator)2 WSStringPredicate (com.amalto.workbench.webservices.WSStringPredicate)1 WSWhereCondition (com.amalto.workbench.webservices.WSWhereCondition)1