Class ValueFilterImpl<V extends PrismValue,D extends ItemDefinition<?>>
java.lang.Object
com.evolveum.midpoint.prism.AbstractFreezable
com.evolveum.midpoint.prism.impl.query.ObjectFilterImpl
com.evolveum.midpoint.prism.impl.query.ValueFilterImpl<V,D>
- All Implemented Interfaces:
Freezable
,Itemable
,PrismContextSensitive
,ItemFilter
,ObjectFilter
,ValueFilter<V,
,D> Revivable
,DebugDumpable
,Serializable
- Direct Known Subclasses:
PropertyValueFilterImpl
,RefFilterImpl
public abstract class ValueFilterImpl<V extends PrismValue,D extends ItemDefinition<?>>
extends ObjectFilterImpl
implements ValueFilter<V,D>
- See Also:
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Constructor Summary
ModifierConstructorDescriptionprotected
ValueFilterImpl
(@NotNull ItemPath fullPath, D definition, @Nullable QName matchingRule, @Nullable List<V> values, @Nullable ExpressionWrapper expression, @Nullable ItemPath rightHandSidePath, @Nullable ItemDefinition<?> rightHandSideDefinition) -
Method Summary
Modifier and TypeMethodDescriptionboolean
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) abstract ValueFilterImpl<V,
D> clone()
Does a SHALLOW clone.debugDump
(int indent) protected void
debugDump
(int indent, StringBuilder sb) boolean
boolean
@Nullable QName
Returns explicit matching rule provided in the filter.@NotNull ItemName
@Nullable ExpressionWrapper
protected abstract String
@NotNull ItemPath
@NotNull ItemPath
getPath()
@Nullable ItemDefinition<?>
@Nullable ItemPath
Returns single value ornull
, throws exception if multiple values are present.Returns a live list of values.int
hashCode()
boolean
isRaw()
abstract boolean
match
(PrismContainerValue<?> cvalue, MatchingRuleRegistry matchingRuleRegistry) protected void
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
toString()
protected String
Methods inherited from class com.evolveum.midpoint.prism.impl.query.ObjectFilterImpl
accept, revive, setPrismContext
Methods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutable
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
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.query.ValueFilter
getMatchingRule, hasNoValue, matchesOnly, nested
-
Constructor Details
-
ValueFilterImpl
protected ValueFilterImpl(@NotNull @NotNull ItemPath fullPath, @Nullable D definition, @Nullable @Nullable QName matchingRule, @Nullable @Nullable List<V> values, @Nullable @Nullable ExpressionWrapper expression, @Nullable @Nullable ItemPath rightHandSidePath, @Nullable @Nullable ItemDefinition<?> rightHandSideDefinition)
-
-
Method Details
-
getFullPath
- Specified by:
getFullPath
in interfaceItemFilter
- Specified by:
getFullPath
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
getParentPath
- Specified by:
getParentPath
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
getElementName
- Specified by:
getElementName
in interfaceItemable
- Specified by:
getElementName
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
getDefinition
- Specified by:
getDefinition
in interfaceItemable
- Specified by:
getDefinition
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
setDefinition
- Specified by:
setDefinition
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
getDeclaredMatchingRule
Description copied from interface:ValueFilter
Returns explicit matching rule provided in the filter.- Specified by:
getDeclaredMatchingRule
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
setMatchingRule
- Specified by:
setMatchingRule
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
getValues
Description copied from interface:ValueFilter
Returns a live list of values. The filter values can be manipulated through it. TODO - reconsider.- Specified by:
getValues
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
getSingleValue
Description copied from interface:ValueFilter
Returns single value ornull
, throws exception if multiple values are present.- Specified by:
getSingleValue
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
setValue
- Specified by:
setValue
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>> - Parameters:
value
- value, has to be parent-less
-
getExpression
- Specified by:
getExpression
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
setExpression
- Specified by:
setExpression
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
getRightHandSidePath
- Specified by:
getRightHandSidePath
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
setRightHandSidePath
- Specified by:
setRightHandSidePath
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
getRightHandSideDefinition
- Specified by:
getRightHandSideDefinition
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
setRightHandSideDefinition
public void setRightHandSideDefinition(@Nullable @Nullable ItemDefinition<?> rightHandSideDefinition) - Specified by:
setRightHandSideDefinition
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
getPrismContext
- Specified by:
getPrismContext
in interfacePrismContextSensitive
- Overrides:
getPrismContext
in classObjectFilterImpl
-
getPath
- Specified by:
getPath
in interfaceItemable
- Specified by:
getPath
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
isRaw
public boolean isRaw()- Specified by:
isRaw
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
match
public abstract boolean match(PrismContainerValue<?> cvalue, MatchingRuleRegistry matchingRuleRegistry) throws SchemaException - Specified by:
match
in interfaceObjectFilter
- Specified by:
match
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>> - Throws:
SchemaException
-
clone
Description copied from interface:ObjectFilter
Does a SHALLOW clone.- Specified by:
clone
in interfaceObjectFilter
- Specified by:
clone
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>> - Specified by:
clone
in classObjectFilterImpl
-
equals
-
equals
- Specified by:
equals
in interfaceObjectFilter
- Specified by:
equals
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
hashCode
public int hashCode() -
debugDump
- Specified by:
debugDump
in interfaceDebugDumpable
-
toString
-
getFilterName
-
debugDump
-
toString
-
performFreeze
protected void performFreeze()- Specified by:
performFreeze
in classObjectFilterImpl
-
checkConsistence
public void checkConsistence(boolean requireDefinitions) - Specified by:
checkConsistence
in interfaceObjectFilter
- Specified by:
checkConsistence
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>>
-
canNestInsideExists
Description copied from interface:ValueFilter
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)- Specified by:
canNestInsideExists
in interfaceValueFilter<V extends PrismValue,
D extends ItemDefinition<?>> - Returns:
- true if filter can be rewritten and nested inside exists
-