Interface NaturalKey
-
- All Known Implementing Classes:
DefaultNaturalKeyImpl
,ItemPathNaturalKeyImpl
public interface NaturalKey
Describes how to handle a natural key of multi-valued items. Responsibilities: 1. _Matching_ values of a multi-valued 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 inGenericItemMerger
, where this class is primarily used.)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 Detail
-
valuesMatch
boolean valuesMatch(PrismContainerValue<?> targetValue, PrismContainerValue<?> sourceValue) throws ConfigurationException
Returns `true` if the target and source container values match on their natural key. (I.e. they have to be merged together.)- Throws:
ConfigurationException
-
mergeMatchingKeys
void mergeMatchingKeys(PrismContainerValue<?> targetValue, PrismContainerValue<?> sourceValue) throws ConfigurationException
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.- Throws:
ConfigurationException
-
-