Class ParameterizedEquivalenceStrategy
- java.lang.Object
- 
- com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy
 
- 
- All Implemented Interfaces:
- EquivalenceStrategy,- Cloneable
 
 public class ParameterizedEquivalenceStrategy extends Object implements EquivalenceStrategy, Cloneable Implementation of EquivalenceStrategy that uses a parametrization of built-in equals/hashCode/diff methods. These strategies are still in progress and (most probably) will be changed. L = literalDomComparison Compares DOM nodes literally. Currently this means that the comparison considers namespace prefixes. Also (a bit unrelated to DOM): when comparing relations, treats "null" and "org:default" relations as different. E = consideringElementNames Takes item names into account. So, for example, "c:user ..." is different from "x:dummy xsi:type=UserType ...". It looks like a negligible difference that is good to ignore, but beware: this also ensures that uid=jack attribute is different from name=jack attribute, when comparing attributes as prism properties. (When comparing them in their containers, element names are treated as different automatically.) O = consideringOperationalData Takes operational items into account (when comparing PCVs). Assumes that the definition is set, otherwise operational status cannot be determined. Currently, when calling operationalItem1.equals(operationalItem2), the fact that "root" items are operational, does not play any role. This could change in the future. See TestParseDiffPath.checkComparisonOfOperationalItems. I = consideringContainerIds When comparing PCVs we require their IDs are equal. So (e.g.) null vs. null is OK, 123 vs. 123 is OK, null vs. 123 is not OK, 123 vs. 456 is not OK. i = consideringDifferentContainerIds When comparing PCVs we require their IDs are not contradicting. So (e.g.) null vs. 123 is OK, null vs. null is OK, 123 vs. 456 is not OK. F = consideringReferenceFilters When comparing references, should we compare also reference filters? (An exception is the case when both OIDs are null: in that case we always compare the references.) r = consideringReferenceOptions (resolution time, reference integrity) When comparing references, should we compare also resolution options, i.e. resolution time and referential integrity? M = consideringValueMetadata When comparing prism values, should we take into account value metadata? If yes, we apply the same strategy to them as was used for data comparison. Summary of individual strategies: LITERAL L E O I i F r M DATA - E O I i F r M IGNORE_METADATA - E - - - F r - REAL_VALUE_CONSIDER_DIFFERENT_IDS - - - - i - - - REAL_VALUE - - - - - - - - Open questions ============== The difference between REAL_VALUE and IGNORE_METADATA is to be established yet. Basically, REAL_VALUE is oriented towards the effective content of the item or value. Contrary to IGNORE_METADATA it ignores reference filters (if OID is present) and reference resolution options (resolution time, reference integrity).
- 
- 
Field SummaryFields Modifier and Type Field Description static ParameterizedEquivalenceStrategyDEFAULT_FOR_EQUALSstatic ParameterizedEquivalenceStrategyFOR_DELTA_ADD_APPLICATIONstatic ParameterizedEquivalenceStrategyFOR_DELTA_DELETE_APPLICATION- 
Fields inherited from interface com.evolveum.midpoint.prism.equivalence.EquivalenceStrategyDATA, IGNORE_METADATA, LITERAL, NOT_LITERAL, REAL_VALUE, REAL_VALUE_CONSIDER_DIFFERENT_IDS
 
- 
 - 
Constructor SummaryConstructors Constructor Description ParameterizedEquivalenceStrategy()
 - 
Method Summary- 
Methods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface com.evolveum.midpoint.prism.equivalence.EquivalenceStrategyprismValueComparator
 
- 
 
- 
- 
- 
Field Detail- 
DEFAULT_FOR_EQUALSpublic static final ParameterizedEquivalenceStrategy DEFAULT_FOR_EQUALS 
 - 
FOR_DELTA_ADD_APPLICATIONpublic static final ParameterizedEquivalenceStrategy FOR_DELTA_ADD_APPLICATION 
 - 
FOR_DELTA_DELETE_APPLICATIONpublic static final ParameterizedEquivalenceStrategy FOR_DELTA_DELETE_APPLICATION 
 
- 
 - 
Method Detail- 
getLiteralpublic static ParameterizedEquivalenceStrategy getLiteral() 
 - 
getDescriptionpublic String getDescription() 
 - 
equalspublic boolean equals(Item<?,?> first, Item<?,?> second) - Specified by:
- equalsin interface- EquivalenceStrategy
 
 - 
equalspublic boolean equals(PrismValue first, PrismValue second) - Specified by:
- equalsin interface- EquivalenceStrategy
 
 - 
hashCodepublic int hashCode(Item<?,?> item) - Specified by:
- hashCodein interface- EquivalenceStrategy
 
 - 
hashCodepublic int hashCode(PrismValue value) - Specified by:
- hashCodein interface- EquivalenceStrategy
 
 - 
isConsideringDefinitionspublic boolean isConsideringDefinitions() 
 - 
isConsideringElementNamespublic boolean isConsideringElementNames() 
 - 
setConsideringElementNamespublic void setConsideringElementNames(boolean compareElementNames) 
 - 
isLiteralDomComparisonpublic boolean isLiteralDomComparison() 
 - 
setLiteralDomComparisonpublic void setLiteralDomComparison(boolean literalDomComparison) 
 - 
isConsideringContainerIdspublic boolean isConsideringContainerIds() 
 - 
setConsideringContainerIdspublic void setConsideringContainerIds(boolean consideringContainerIds) 
 - 
isConsideringDifferentContainerIdspublic boolean isConsideringDifferentContainerIds() 
 - 
setConsideringDifferentContainerIdspublic void setConsideringDifferentContainerIds(boolean consideringDifferentContainerIds) 
 - 
isConsideringOperationalDatapublic boolean isConsideringOperationalData() 
 - 
setConsideringOperationalDatapublic void setConsideringOperationalData(boolean consideringOperationalData) 
 - 
isConsideringReferenceFilterspublic boolean isConsideringReferenceFilters() 
 - 
setConsideringReferenceFilterspublic void setConsideringReferenceFilters(boolean consideringReferenceFilters) 
 - 
isConsideringReferenceOptionspublic boolean isConsideringReferenceOptions() 
 - 
setConsideringReferenceOptionspublic void setConsideringReferenceOptions(boolean consideringReferenceOptions) 
 - 
isHashRuntimeSchemaItemspublic boolean isHashRuntimeSchemaItems() 
 - 
setHashRuntimeSchemaItemspublic void setHashRuntimeSchemaItems(boolean hashRuntimeSchemaItems) 
 - 
isConsideringValueMetadatapublic boolean isConsideringValueMetadata() 
 - 
setConsideringValueMetadatapublic void setConsideringValueMetadata(boolean consideringValueMetadata) 
 - 
clonepublic ParameterizedEquivalenceStrategy clone() 
 - 
exceptForValueMetadatapublic ParameterizedEquivalenceStrategy exceptForValueMetadata() 
 
- 
 
-