Class ItemPathNaturalKeyDefinitionImpl
java.lang.Object
com.evolveum.midpoint.prism.impl.key.ItemPathNaturalKeyDefinitionImpl
- All Implemented Interfaces:
NaturalKeyDefinition
Natural key consisting of an item path.
Assumptions:
1. the type of the key item is
ItemPathType
2. each container value to be merged must have the key value specified-
Method Summary
Modifier and TypeMethodDescriptionvoid
mergeMatchingKeys
(PrismContainerValue<?> targetValue, PrismContainerValue<?> sourceValue) Source and target paths have to be equivalent here.boolean
valuesMatch
(PrismContainerValue<?> targetValue, PrismContainerValue<?> sourceValue) Returns `true` if the target and source container values match on their natural key.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.prism.key.NaturalKeyDefinition
getConstituents
-
Method Details
-
of
-
valuesMatch
Description copied from interface:NaturalKeyDefinition
Returns `true` if the target and source container values match on their natural key. (I.e. they have to be merged/diffed together.)- Specified by:
valuesMatch
in interfaceNaturalKeyDefinition
-
mergeMatchingKeys
public void mergeMatchingKeys(PrismContainerValue<?> targetValue, PrismContainerValue<?> sourceValue) Source and target paths have to be equivalent here. We assume the source and target paths are purely name-based. We go through them and construct the resulting path from the "most qualified" segments of these. We intentionally ignore some exotic cases here. (We are not obliged to create a "ideal" merged key, anyway.)- Specified by:
mergeMatchingKeys
in interfaceNaturalKeyDefinition
-