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
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class com.evolveum.midpoint.repo.sqlbase.filtering.item.ItemValueFilterProcessor
context
-
Constructor Summary
ConstructorDescriptionPolyStringItemFilterProcessor
(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 String
extractNorm
(Object value) Method extracting normalized value from (potentially poly-)string.static String
extractOrig
(Object value) com.querydsl.core.types.dsl.StringPath
com.querydsl.core.types.dsl.StringPath
protected boolean
isIgnoreCaseFilter
(ValueFilter<?, ?> filter) Returns true, if the filter implies ignore-case behavior.static boolean
isIgnoreCasePolyStringFilter
(ValueFilter<?, ?> filter) Extracted for other poly-string filters in other parts of the filter processor hierarchy.com.querydsl.core.types.Predicate
process
(PropertyValueFilter<T> filter) com.querydsl.core.types.Predicate
process
(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:ItemValueFilterProcessor
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.- Overrides:
isIgnoreCaseFilter
in 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 providePrismContext
for normalization, see usages. -
extractOrig
-
rightHand
- Specified by:
rightHand
in interfaceRightHandProcessor
- Overrides:
rightHand
in 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()
-