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*_origor*_normcolumn depending on matching conditions. Sorting is always executed by*_origcolumn.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULTstatic StringNORMstatic StringNORM_IGNORE_CASEstatic StringORIGstatic StringORIG_IGNORE_CASEstatic StringSTRICTstatic StringSTRICT_IGNORE_CASE-
Fields inherited from class com.evolveum.midpoint.repo.sqlbase.filtering.item.ItemValueFilterProcessor
context
-
-
Constructor Summary
Constructors Constructor Description PolyStringItemFilterProcessor(SqlQueryContext<?,Q,R> context, Function<Q,com.querydsl.core.types.dsl.StringPath> origMapping, Function<Q,com.querydsl.core.types.dsl.StringPath> normMapping)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringextractNorm(Object value)Method extracting normalized value from (potentially poly-)string.static StringextractOrig(Object value)protected 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, fuzzyStringPredicate, getSingleValue, operation, predicateWithNotTreated, singleValuePredicate, singleValuePredicateWithNotTreated
-
-
-
-
Field Detail
-
STRICT
public static final String STRICT
-
ORIG
public static final String ORIG
-
NORM
public static final String NORM
-
DEFAULT
public static final String DEFAULT
-
STRICT_IGNORE_CASE
public static final String STRICT_IGNORE_CASE
- See Also:
- Constant Field Values
-
ORIG_IGNORE_CASE
public static final String ORIG_IGNORE_CASE
- See Also:
- Constant Field Values
-
NORM_IGNORE_CASE
public static final String NORM_IGNORE_CASE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 Detail
-
process
public com.querydsl.core.types.Predicate process(PropertyValueFilter<T> filter) throws QueryException
- Throws:
QueryException
-
isIgnoreCaseFilter
protected boolean isIgnoreCaseFilter(ValueFilter<?,?> filter)
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
public static boolean isIgnoreCasePolyStringFilter(ValueFilter<?,?> filter)
Extracted for other poly-string filters in other parts of the filter processor hierarchy.
-
extractNorm
public static String extractNorm(Object value)
Method extracting normalized value from (potentially poly-)string. May require adapter method to providePrismContextfor normalization, see usages.
-
rightHand
public com.querydsl.core.types.Expression<?> rightHand(ValueFilter<?,?> filter)
- 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
-
-