private Map<String, Object> getConstants(QueryMetadata metadata,
            Map<Object, String> constantToLabel) {
        Map<String,Object> constants = new HashMap<String,Object>();
        for (Map.Entry<Object,String> entry : constantToLabel.entrySet()) {
            if (entry.getKey() instanceof ParamExpression<?>) {
                Object value = metadata.getParams().get(entry.getKey());
                if (value == null) {
                    throw new ParamNotSetException((ParamExpression<?>) entry.getKey());
                }
                constants.put(entry.getValue(), value);
            } else {
                constants.put(entry.getValue(), entry.getKey());
            }
        }
        return constants;
    }
Create an Evaluator for the given sources and the given optional filter

@param metadata query metadata
@param joins joins
@param filter where condition
@return evaluator
querydsl-collections/src/main/java/com/querydsl/collections/DefaultEvaluatorFactory.java