Class ParameterizedEquivalenceStrategy
- java.lang.Object
- 
- com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy
 
- 
- All Implemented Interfaces:
- EquivalenceStrategy
 
 public class ParameterizedEquivalenceStrategy extends Object implements EquivalenceStrategy 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 before 4.0 release. 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 element names and reference filters (if OID is present).
- 
- 
Field SummaryFields Modifier and Type Field Description static ParameterizedEquivalenceStrategyDEFAULT_FOR_DELTA_APPLICATIONstatic ParameterizedEquivalenceStrategyDEFAULT_FOR_DIFFstatic ParameterizedEquivalenceStrategyDEFAULT_FOR_EQUALSstatic ParameterizedEquivalenceStrategyIGNORE_METADATAIgnores metadata, typically operational items and values, container IDs, and origin information.static ParameterizedEquivalenceStrategyIGNORE_METADATA_CONSIDER_DIFFERENT_IDSIgnores metadata, typically operational items and values and origin information.static ParameterizedEquivalenceStrategyLITERALThe (almost) highest level of recognition.static ParameterizedEquivalenceStrategyLITERAL_IGNORE_METADATAAs IGNORE_METADATA, but takes XML namespace prefixes into account.static ParameterizedEquivalenceStrategyNOT_LITERALAs LITERAL but ignores XML namespace prefixes.static ParameterizedEquivalenceStrategyREAL_VALUECompares the real content if prism structures.static ParameterizedEquivalenceStrategyREAL_VALUE_CONSIDER_DIFFERENT_IDSAs REAL_VALUE but treats values with different non-null IDs as not equivalent.
 - 
Constructor SummaryConstructors Constructor Description ParameterizedEquivalenceStrategy()
 - 
Method Summary
 
- 
- 
- 
Field Detail- 
LITERALpublic static final ParameterizedEquivalenceStrategy LITERAL The (almost) highest level of recognition. Useful e.g. for comparing values for the purpose of XML editing. Still, ignores e.g. definitions, parent objects, origin, immutability flag, etc. Corresponds to pre-4.0 flags ignoreMetadata = false, literal = true.
 - 
NOT_LITERALpublic static final ParameterizedEquivalenceStrategy NOT_LITERAL As LITERAL but ignores XML namespace prefixes. Also fills-in default relation name if not present (when comparing reference values). Currently this is the default for equals/hashCode. Roughly corresponds to pre-4.0 flags ignoreMetadata = false, literal = false.
 - 
IGNORE_METADATApublic static final ParameterizedEquivalenceStrategy IGNORE_METADATA Ignores metadata, typically operational items and values, container IDs, and origin information. However, takes OID-ful reference filters into account. Corresponds to pre-4.0 flags ignoreMetadata = true, literal = false.
 - 
IGNORE_METADATA_CONSIDER_DIFFERENT_IDS@Experimental public static final ParameterizedEquivalenceStrategy IGNORE_METADATA_CONSIDER_DIFFERENT_IDS Ignores metadata, typically operational items and values and origin information. Container IDs are taken into account only if they directly contradict each other, meaning both values being compared do have them and they are different. Currently this is the default for diff and for delta application. EXPERIMENTAL
 - 
LITERAL_IGNORE_METADATApublic static final ParameterizedEquivalenceStrategy LITERAL_IGNORE_METADATA As IGNORE_METADATA, but takes XML namespace prefixes into account. It is not clear in which situations this should be needed. But we include it here for compatibility reasons. Historically it is used on a few places in midPoint. Corresponds to pre-4.0 flags ignoreMetadata = true, literal = true.
 - 
REAL_VALUEpublic static final ParameterizedEquivalenceStrategy REAL_VALUE Compares the real content if prism structures. Corresponds to "equalsRealValue" method used in pre-4.0. It is to be seen if operational data should be considered in this mode (they are ignored now). So, currently this is the most lax way of determining equivalence.
 - 
REAL_VALUE_CONSIDER_DIFFERENT_IDSpublic static final ParameterizedEquivalenceStrategy REAL_VALUE_CONSIDER_DIFFERENT_IDS As REAL_VALUE but treats values with different non-null IDs as not equivalent. EXPERIMENTAL
 - 
DEFAULT_FOR_EQUALSpublic static final ParameterizedEquivalenceStrategy DEFAULT_FOR_EQUALS 
 - 
DEFAULT_FOR_DIFFpublic static final ParameterizedEquivalenceStrategy DEFAULT_FOR_DIFF 
 - 
DEFAULT_FOR_DELTA_APPLICATIONpublic static final ParameterizedEquivalenceStrategy DEFAULT_FOR_DELTA_APPLICATION 
 
- 
 - 
Method Detail- 
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() 
 - 
setCompareElementNamespublic void setCompareElementNames(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) 
 
- 
 
-