Class PolyStringItemFilterProcessor<T>
java.lang.Object
com.evolveum.midpoint.repo.sqlbase.filtering.item.ItemValueFilterProcessor<PropertyValueFilter<T>>
com.evolveum.midpoint.repo.sqlbase.filtering.item.PolyStringItemFilterProcessor<T>
- Type Parameters:
T- type of values in filter - PolyString, PolyStringType and String is supported
- All Implemented Interfaces:
FilterProcessor<PropertyValueFilter<T>>,RightHandProcessor
public class PolyStringItemFilterProcessor<T>
extends ItemValueFilterProcessor<PropertyValueFilter<T>>
Filter processor for a polystring attribute path (Prism item).
This creates conditions to either
*_orig or *_norm column depending on
matching conditions.
Sorting is always executed by *_orig column.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class com.evolveum.midpoint.repo.sqlbase.filtering.item.ItemValueFilterProcessor
context -
Constructor Summary
ConstructorsConstructorDescriptionPolyStringItemFilterProcessor(SqlQueryContext<?, Q, R> context, Function<Q, com.querydsl.core.types.dsl.StringPath> origMapping, Function<Q, com.querydsl.core.types.dsl.StringPath> normMapping) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringextractNorm(Object value) Method extracting normalized value from (potentially poly-)string.static StringextractOrig(Object value) com.querydsl.core.types.dsl.StringPathcom.querydsl.core.types.dsl.StringPathprotected booleanisIgnoreCaseFilter(ValueFilter<?, ?> filter) Returns true, if the filter implies ignore-case behavior.static booleanisIgnoreCasePolyStringFilter(ValueFilter<?, ?> filter) Extracted for other poly-string filters in other parts of the filter processor hierarchy.com.querydsl.core.types.Predicateprocess(PropertyValueFilter<T> filter) com.querydsl.core.types.Predicateprocess(PropertyValueFilter<T> filter, RightHandProcessor rightPath) com.querydsl.core.types.Expression<?>rightHand(ValueFilter<?, ?> filter) Methods inherited from class com.evolveum.midpoint.repo.sqlbase.filtering.item.ItemValueFilterProcessor
createBinaryCondition, createUnsupportedMatchingRuleException, createUnsupportedMatchingRuleException, fuzzyStringPredicate, getSingleValue, operation, predicateWithNotTreated, singleValuePredicate, singleValuePredicateWithNotTreated
-
Field Details
-
STRICT
-
ORIG
-
NORM
-
DEFAULT
-
STRICT_IGNORE_CASE
- See Also:
-
ORIG_IGNORE_CASE
- See Also:
-
NORM_IGNORE_CASE
- See Also:
-
-
Constructor Details
-
PolyStringItemFilterProcessor
public PolyStringItemFilterProcessor(SqlQueryContext<?, Q, R> context, Function<Q, com.querydsl.core.types.dsl.StringPath> origMapping, Function<Q, com.querydsl.core.types.dsl.StringPath> normMapping)
-
-
Method Details
-
process
public com.querydsl.core.types.Predicate process(PropertyValueFilter<T> filter) throws QueryException - Throws:
QueryException
-
isIgnoreCaseFilter
Description copied from class:ItemValueFilterProcessorReturns 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.- Overrides:
isIgnoreCaseFilterin classItemValueFilterProcessor<PropertyValueFilter<T>>
-
isIgnoreCasePolyStringFilter
Extracted for other poly-string filters in other parts of the filter processor hierarchy. -
extractNorm
Method extracting normalized value from (potentially poly-)string. May require adapter method to providePrismContextfor normalization, see usages. -
extractOrig
-
rightHand
- Specified by:
rightHandin interfaceRightHandProcessor- Overrides:
rightHandin classItemValueFilterProcessor<PropertyValueFilter<T>>
-
process
public com.querydsl.core.types.Predicate process(PropertyValueFilter<T> filter, RightHandProcessor rightPath) throws RepositoryException - Throws:
RepositoryException
-
getOrigPath
public com.querydsl.core.types.dsl.StringPath getOrigPath() -
getNormPath
public com.querydsl.core.types.dsl.StringPath getNormPath()
-