/** * Parses an n-ary relational expression from the given json object */ public static NaryRelationalExpression fromJson(ObjectNode node) { if (node.size() == 3) { if (node.get("rfield") != null) { return NaryFieldRelationalExpression.fromJson(node); } else if (node.get("values") != null) { return NaryValueRelationalExpression.fromJson(node); } } throw Error.get(QueryConstants.ERR_INVALID_COMPARISON_EXPRESSION, node.toString()); } }
/** * Parses an n-ary relational expression from the given json object */ public static NaryRelationalExpression fromJson(ObjectNode node) { if (node.size() == 3) { if (node.get("rfield") != null) { return NaryFieldRelationalExpression.fromJson(node); } else if (node.get("values") != null) { return NaryValueRelationalExpression.fromJson(node); } } throw Error.get(QueryConstants.ERR_INVALID_COMPARISON_EXPRESSION, node.toString()); } }