Package com.evolveum.midpoint.prism.key
Interface NaturalKeyDefinition
public interface NaturalKeyDefinition
Describes how to handle a natural key of multivalued items.
Responsibilities:
1. _Matching_ values of a multivalued item, so that the matching pairs can be appropriately merged.
2. _Merging_ values of the key itself. For example, definitions of an attribute `ri:drink` with `ref`
of `drink` (unqualified) and `ri:drink` (qualified) have to be merged, and the result should use the
`ref` of `ri:drink`, i.e. the qualified version.
(See also the description in
GenericItemMerger
, where this class is primarily used.)-
Method Summary
Modifier and TypeMethodDescriptiondefault Collection<Item<?,
?>> getConstituents
(PrismContainerValue<?> value) Returns a collection of items that constitute the natural key for specific value.void
mergeMatchingKeys
(PrismContainerValue<?> targetValue, PrismContainerValue<?> sourceValue) Merges natural key value in target and in source (assuming they match according tovaluesMatch(PrismContainerValue, PrismContainerValue)
), i.e.boolean
valuesMatch
(PrismContainerValue<?> targetValue, PrismContainerValue<?> sourceValue) Returns `true` if the target and source container values match on their natural key.
-
Method Details
-
valuesMatch
Returns `true` if the target and source container values match on their natural key. (I.e. they have to be merged/diffed together.) -
mergeMatchingKeys
Merges natural key value in target and in source (assuming they match according tovaluesMatch(PrismContainerValue, PrismContainerValue)
), i.e. updates the key in targetValue if necessary. -
getConstituents
Returns a collection of items that constitute the natural key for specific value.
-