protected Predicate buildPredicateWithOperator(Path<T> tt, String name, String value) throws BadUsageException {
        CriteriaBuilder criteriaBuilder = getEntityManager().getCriteriaBuilder();
        Operator operator = Operator.fromString(name);
        // perform operation, default operation is equal
        if (operator == null) {
            Path<T> attribute = tt.get(name);
            Object valueObject = convertStringValueToObject(value, attribute.getJavaType());
            System.out.println("### bp RETURN "+name+"="+value);
            return criteriaBuilder.equal(attribute, valueObject);
        } else {
            Class javaType = tt.getJavaType();
            if (! classCompatibleWithOperator(javaType, operator)) {
                throw new BadUsageException(ExceptionType.BAD_USAGE_OPERATOR, operator.getValue()+" operator incompatible with field");
            }
            Object valueObject = convertStringValueToObject(value, javaType);
            switch (operator) {
                case GT:
                    return criteriaBuilder.greaterThan((Expression) tt, (Comparable) valueObject);
                case GTE:
                    return criteriaBuilder.greaterThanOrEqualTo((Expression) tt, (Comparable) valueObject);
                case LT:
                    return criteriaBuilder.lessThan((Expression) tt, (Comparable) valueObject);
                case LTE:
                    return criteriaBuilder.lessThanOrEqualTo((Expression) tt, (Comparable) valueObject);
                case NE:
                    return criteriaBuilder.notEqual(tt, valueObject);
                case EQ:
                    return criteriaBuilder.equal(tt, valueObject);
                case EX:
                    return criteriaBuilder.like((Expression) tt, value.replace('*', '%'));
                default: {
                    Path<T> attribute = tt.get(name);
                    valueObject = convertStringValueToObject(value, attribute.getJavaType());
                    return criteriaBuilder.equal(attribute, valueObject);
                }
            }
        }
    }