Package org.lilyproject.repository.api

Examples of org.lilyproject.repository.api.CompareOp


        if (filter.getFieldValue() == null) {
            throw new IllegalArgumentException("Field value should be specified in FieldValueFilter");
        }

        CompareOp compareOp = filter.getCompareOp() != null ? filter.getCompareOp() : CompareOp.EQUAL;
        if (compareOp != CompareOp.EQUAL && compareOp != CompareOp.NOT_EQUAL) {
            throw new IllegalArgumentException("FieldValueFilter does not support this compare operator: " + compareOp);
        }

        FieldType fieldType = repository.getTypeManager().getFieldTypeByName(filter.getField());
View Full Code Here


            }

            boolean allowMissing = JsonUtil.getBoolean(conditionNode, "allowMissing", false);

            String operator = JsonUtil.getString(conditionNode, "operator", null);
            CompareOp op = CompareOp.EQUAL;
            if (operator != null) {
                try {
                    op = CompareOp.valueOf(operator.toUpperCase());
                } catch (IllegalArgumentException e) {
                    throw new JsonFormatException("Invalid comparison operator in mutation condition: " + operator);
View Full Code Here

            if (avroCond.getValue() != null) {
                ValueType valueType = repository.getTypeManager().getValueType(avroCond.getValueType());
                value = valueType.read(avroCond.getValue().array());
            }

            CompareOp op = convert(avroCond.getOperator());
            boolean allowMissing = avroCond.getAllowMissing();

            conditions.add(new MutationCondition(name, op, value, allowMissing));
        }
View Full Code Here

TOP

Related Classes of org.lilyproject.repository.api.CompareOp

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.