Interface ValueFilter<V extends PrismValue,D extends ItemDefinition<?>>
- All Superinterfaces:
DebugDumpable
,Freezable
,Itemable
,ItemFilter
,ObjectFilter
,PrismContextSensitive
,Revivable
,Serializable
- All Known Subinterfaces:
AnyInFilter<T>
,ComparativeFilter<T>
,EqualFilter<T>
,FuzzyStringMatchFilter<T>
,GreaterFilter<T>
,LessFilter<T>
,PropertyValueFilter<T>
,RefFilter
,SubstringFilter<T>
public interface ValueFilter<V extends PrismValue,D extends ItemDefinition<?>>
extends ObjectFilter, ItemFilter, Itemable
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
canNestInsideExists
(ItemPath existsPath) Returns true, if current filter can be rewritten to be nested inside exists filter with prefix path This means filter with path prefix/item will become prefix exists (item)void
checkConsistence
(boolean requireDefinitions) clone()
Does a SHALLOW clone.boolean
@Nullable QName
Returns explicit matching rule provided in the filter.@NotNull ItemName
@Nullable ExpressionWrapper
@NotNull ItemPath
@Nullable QName
Returns matching rule that should be used.@NotNull ItemPath
getPath()
@Nullable ItemDefinition<?>
@Nullable ItemPath
Returns single value ornull
, throws exception if multiple values are present.Returns a live list of values.default boolean
Returns true if there are no values (list is null or empty).boolean
isRaw()
boolean
match
(PrismContainerValue<?> cvalue, MatchingRuleRegistry matchingRuleRegistry) default boolean
matchesOnly
(ItemPath... paths) Returns true, if filter processes only enumerated item paths and does not use referencedBy, ownedBy where path context changes drastically.default ValueFilter<V,
D> void
setDefinition
(D definition) void
setExpression
(@Nullable ExpressionWrapper expression) void
setMatchingRule
(@Nullable QName matchingRule) void
setRightHandSideDefinition
(@Nullable ItemDefinition<?> rightHandSideDefinition) void
setRightHandSidePath
(@Nullable ItemPath rightHandSidePath) void
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutable
Methods inherited from interface com.evolveum.midpoint.prism.query.ObjectFilter
accept, revive
Methods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitive
getPrismContext
-
Method Details
-
getFullPath
- Specified by:
getFullPath
in interfaceItemFilter
-
getParentPath
-
getElementName
- Specified by:
getElementName
in interfaceItemable
-
getDefinition
- Specified by:
getDefinition
in interfaceItemable
-
setDefinition
-
getMatchingRule
Returns matching rule that should be used. This can be matching rule provided with the filter or some fallback/default. See MID-6935 for more, currently only returns the explicitly provided matching rule. -
getDeclaredMatchingRule
Returns explicit matching rule provided in the filter. -
setMatchingRule
-
getValues
Returns a live list of values. The filter values can be manipulated through it. TODO - reconsider. -
hasNoValue
default boolean hasNoValue()Returns true if there are no values (list is null or empty). If false is returned, thengetValues()
is definitely not null. -
getSingleValue
Returns single value ornull
, throws exception if multiple values are present. -
setValue
- Parameters:
value
- value, has to be parent-less
-
getExpression
-
setExpression
-
getRightHandSidePath
-
setRightHandSidePath
-
getRightHandSideDefinition
-
setRightHandSideDefinition
-
getPath
ItemPath getPath() -
isRaw
boolean isRaw() -
match
boolean match(PrismContainerValue<?> cvalue, MatchingRuleRegistry matchingRuleRegistry) throws SchemaException - Specified by:
match
in interfaceObjectFilter
- Throws:
SchemaException
-
clone
ValueFilter<V,D> clone()Description copied from interface:ObjectFilter
Does a SHALLOW clone.- Specified by:
clone
in interfaceObjectFilter
-
equals
- Specified by:
equals
in interfaceObjectFilter
-
checkConsistence
void checkConsistence(boolean requireDefinitions) - Specified by:
checkConsistence
in interfaceObjectFilter
-
matchesOnly
Description copied from interface:ObjectFilter
Returns true, if filter processes only enumerated item paths and does not use referencedBy, ownedBy where path context changes drastically. Useful to find if filter could be executed with limited set of information (e.g. only access to target name inRefFilter
- Specified by:
matchesOnly
in interfaceObjectFilter
-
canNestInsideExists
Returns true, if current filter can be rewritten to be nested inside exists filter with prefix path This means filter with path prefix/item will become prefix exists (item)- Parameters:
potential
- exists path- Returns:
- true if filter can be rewritten and nested inside exists
-
nested
-