Class ItemPathNaturalKeyImpl
- java.lang.Object
-
- com.evolveum.midpoint.schema.merger.key.ItemPathNaturalKeyImpl
-
- All Implemented Interfaces:
NaturalKey
public class ItemPathNaturalKeyImpl extends Object implements NaturalKey
Natural key consisting of an item path. Assumptions: 1. the type of the key item isItemPathType
2. each container value to be merged must have the key value specified
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
mergeMatchingKeys(PrismContainerValue<?> targetValue, PrismContainerValue<?> sourceValue)
Source and target paths have to be equivalent here.static ItemPathNaturalKeyImpl
of(@NotNull ItemName itemName)
boolean
valuesMatch(PrismContainerValue<?> targetValue, PrismContainerValue<?> sourceValue)
Returns `true` if the target and source container values match on their natural key.
-
-
-
Method Detail
-
of
public static ItemPathNaturalKeyImpl of(@NotNull @NotNull ItemName itemName)
-
valuesMatch
public boolean valuesMatch(PrismContainerValue<?> targetValue, PrismContainerValue<?> sourceValue) throws ConfigurationException
Description copied from interface:NaturalKey
Returns `true` if the target and source container values match on their natural key. (I.e. they have to be merged together.)- Specified by:
valuesMatch
in interfaceNaturalKey
- Throws:
ConfigurationException
-
mergeMatchingKeys
public void mergeMatchingKeys(PrismContainerValue<?> targetValue, PrismContainerValue<?> sourceValue) throws ConfigurationException
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 interfaceNaturalKey
- Throws:
ConfigurationException
-
-