Class ItemValueFilterProcessor<O extends ValueFilter<?,?>>
java.lang.Object
com.evolveum.midpoint.repo.sqlbase.filtering.item.ItemValueFilterProcessor<O>
- All Implemented Interfaces:
FilterProcessor<O>,RightHandProcessor
- Direct Known Subclasses:
AuditCustomColumnItemFilterProcessor,DetailTableItemFilterProcessor,ExtensionItemFilterProcessor,PolyStringItemFilterProcessor,RefItemFilterProcessor,RefTableItemFilterProcessor,SinglePathItemFilterProcessor
public abstract class ItemValueFilterProcessor<O extends ValueFilter<?,?>>
extends Object
implements FilterProcessor<O>, RightHandProcessor
Type of
FilterProcessor for a single Prism item (not necessarily one SQL column).
These are executed as "leaves" of filter processing tree returning terminal predicates.
These are used in QueryTableMapping objects.
This superclass contains support methods for determining operator from filter,
getting single value and other typical operations needed by item filter processors.
See ValueFilterProcessor for details how complex paths are resolved to its last part.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> @NotNull com.querydsl.core.types.PredicatecreateBinaryCondition(ValueFilter<?, ?> filter, com.querydsl.core.types.Path<T> path, ValueFilterValues<?, T> values) protected final QueryExceptionprotected final QueryExceptioncreateUnsupportedMatchingRuleException(O filter, boolean addFilter) protected com.querydsl.core.types.PredicatefuzzyStringPredicate(FuzzyStringMatchFilter<?> filter, com.querydsl.core.types.Expression<?> path, ValueFilterValues<?, ?> values) protected <T> TgetSingleValue(PropertyValueFilter<T> filter) Returns the single "real" value from the property filter (or null).protected booleanisIgnoreCaseFilter(ValueFilter<?, ?> filter) Returns true, if the filter implies ignore-case behavior.protected FilterOperationoperation(ValueFilter<?, ?> filter) protected com.querydsl.core.types.PredicatepredicateWithNotTreated(com.querydsl.core.types.Expression<?> path, com.querydsl.core.types.Predicate predicate) Returns the predicate or (predicate AND path IS NOT NULL) if NOT is used somewhere above.com.querydsl.core.types.Expression<?>rightHand(ValueFilter<?, ?> filter) protected com.querydsl.core.types.PredicatesingleValuePredicate(com.querydsl.core.types.Expression<?> path, FilterOperation operation, Object value) protected com.querydsl.core.types.PredicatesingleValuePredicateWithNotTreated(com.querydsl.core.types.Expression<?> path, FilterOperation operation, Object value) Creates predicate for specified path and value using the provided operator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.repo.sqlbase.filtering.FilterProcessor
process, process
-
Field Details
-
context
-
-
Constructor Details
-
ItemValueFilterProcessor
-
-
Method Details
-
getSingleValue
Returns the single "real" value from the property filter (or null). -
operation
- Throws:
QueryException
-
isIgnoreCaseFilter
Returns true, if the filter implies ignore-case behavior. Used when filter is transformed to SQL operation, or to determine whether operands need some treatment (e.g. `lower()` function). Can be overridden to cover other matching rules, e.g. for poly-strings. -
createBinaryCondition
@NotNull protected <T> @NotNull com.querydsl.core.types.Predicate createBinaryCondition(ValueFilter<?, ?> filter, com.querydsl.core.types.Path<T> path, ValueFilterValues<?, throws QueryExceptionT> values) - Throws:
QueryException
-
fuzzyStringPredicate
protected com.querydsl.core.types.Predicate fuzzyStringPredicate(FuzzyStringMatchFilter<?> filter, com.querydsl.core.types.Expression<?> path, ValueFilterValues<?, ?> values) throws QueryException- Throws:
QueryException
-
singleValuePredicateWithNotTreated
protected com.querydsl.core.types.Predicate singleValuePredicateWithNotTreated(com.querydsl.core.types.Expression<?> path, FilterOperation operation, Object value) Creates predicate for specified path and value using the provided operator. If the value is not QuerydslExpressionit is changed to constant expression, otherwise the expression is passed as-is. Technically, any expression can be used on path side as well. -
singleValuePredicate
protected com.querydsl.core.types.Predicate singleValuePredicate(com.querydsl.core.types.Expression<?> path, FilterOperation operation, Object value) -
predicateWithNotTreated
protected com.querydsl.core.types.Predicate predicateWithNotTreated(com.querydsl.core.types.Expression<?> path, com.querydsl.core.types.Predicate predicate) Returns the predicate or (predicate AND path IS NOT NULL) if NOT is used somewhere above. This makes NOT truly complementary to non-NOT result. -
rightHand
public com.querydsl.core.types.Expression<?> rightHand(ValueFilter<?, ?> filter) throws RepositoryException- Specified by:
rightHandin interfaceRightHandProcessor- Throws:
RepositoryException
-
createUnsupportedMatchingRuleException
-
createUnsupportedMatchingRuleException
-