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
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static 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
ConstructorDescriptionExtensionItemFilterProcessor
(SqlQueryContext<?, ?, ?> context, Function<FlexibleRelationalPathBase<?>, JsonbPath> rootToExtensionPath, MExtItemHolderType holderType) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isIgnoreCaseFilter
(ValueFilter<?, ?> filter) Returns true, if the filter implies ignore-case behavior.com.querydsl.core.types.Predicate
process
(ValueFilter<?, ?> filter) Methods inherited from class com.evolveum.midpoint.repo.sqlbase.filtering.item.ItemValueFilterProcessor
createBinaryCondition, createUnsupportedMatchingRuleException, createUnsupportedMatchingRuleException, fuzzyStringPredicate, getSingleValue, operation, predicateWithNotTreated, rightHand, singleValuePredicate, singleValuePredicateWithNotTreated
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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: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<ValueFilter<?,
?>>
-