Search in sources :

Example 1 with Matcher

use of com.evolveum.midpoint.repo.sql.query.matcher.Matcher in project midpoint by Evolveum.

the class ItemValueRestriction method createPropertyVsConstantCondition.

Condition createPropertyVsConstantCondition(String hqlPropertyPath, Object value, ValueFilter filter) throws QueryException {
    ItemRestrictionOperation operation = findOperationForFilter(filter);
    InterpretationContext context = getContext();
    QueryInterpreter interpreter = context.getInterpreter();
    Matcher matcher = interpreter.findMatcher(value);
    String matchingRule = filter.getMatchingRule() != null ? filter.getMatchingRule().getLocalPart() : null;
    // noinspection unchecked
    return matcher.match(context.getHibernateQuery(), operation, hqlPropertyPath, value, matchingRule);
}
Also used : InterpretationContext(com.evolveum.midpoint.repo.sql.query.InterpretationContext) Matcher(com.evolveum.midpoint.repo.sql.query.matcher.Matcher) QueryInterpreter(com.evolveum.midpoint.repo.sql.query.QueryInterpreter)

Aggregations

InterpretationContext (com.evolveum.midpoint.repo.sql.query.InterpretationContext)1 QueryInterpreter (com.evolveum.midpoint.repo.sql.query.QueryInterpreter)1 Matcher (com.evolveum.midpoint.repo.sql.query.matcher.Matcher)1