Class ExtensionItemFilterProcessor
java.lang.Object
com.evolveum.midpoint.repo.sqlbase.filtering.item.ItemValueFilterProcessor<ValueFilter<?,?>>
com.evolveum.midpoint.repo.sqale.filtering.ExtensionItemFilterProcessor
- All Implemented Interfaces:
FilterProcessor<ValueFilter<?,,?>> RightHandProcessor
Filter processor for extension items stored in JSONB.
This takes care of any supported type, scalar or array, and handles any operation.
NOTE about NOT treatment:
We use the same not treatment for extensions like for other columns resulting in conditions like:
`not (u.ext->>'1510' < ? and u.ext->>'1510' is not null)`
One might think that the part after AND can be replaced with u.ext ? '1510' to benefit from the GIN index.
But `NOT (u.ext ? '...')` is *not* fully complement to the `u.ext ? '...'` (without NOT).
It is only fully complement if additional `AND u.ext is not null` is added in which case the index will not be used either.
So instead of adding special treatment code for extensions, we just reuse existing predicateWithNotTreated methods.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic 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
ConstructorsConstructorDescriptionExtensionItemFilterProcessor(SqlQueryContext<?, ?, ?> context, Function<FlexibleRelationalPathBase<?>, JsonbPath> rootToExtensionPath, MExtItemHolderType holderType) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisIgnoreCaseFilter(ValueFilter<?, ?> filter) Returns true, if the filter implies ignore-case behavior.com.querydsl.core.types.Predicateprocess(ValueFilter<?, ?> filter) Methods inherited from class com.evolveum.midpoint.repo.sqlbase.filtering.item.ItemValueFilterProcessor
createBinaryCondition, createUnsupportedMatchingRuleException, createUnsupportedMatchingRuleException, fuzzyStringPredicate, getSingleValue, operation, predicateWithNotTreated, rightHand, singleValuePredicate, singleValuePredicateWithNotTreatedMethods 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
-
Field Details
-
STRING_TYPE
-
INT_TYPE
-
INTEGER_TYPE
-
SHORT_TYPE
-
LONG_TYPE
-
DECIMAL_TYPE
-
DOUBLE_TYPE
-
FLOAT_TYPE
-
BOOLEAN_TYPE
-
DATETIME_TYPE
-
POLY_STRING_TYPE
-
-
Constructor Details
-
ExtensionItemFilterProcessor
public ExtensionItemFilterProcessor(SqlQueryContext<?, ?, ?> context, Function<FlexibleRelationalPathBase<?>, JsonbPath> rootToExtensionPath, MExtItemHolderType holderType)
-
-
Method Details
-
process
public com.querydsl.core.types.Predicate process(ValueFilter<?, ?> filter) throws RepositoryException- Throws:
RepositoryException
-
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<ValueFilter<?,?>>
-