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 SummaryFieldsModifier and TypeFieldDescriptionstatic final ParameterizedEquivalenceStrategystatic final ParameterizedEquivalenceStrategystatic final ParameterizedEquivalenceStrategyFields inherited from interface com.evolveum.midpoint.prism.equivalence.EquivalenceStrategyDATA, IGNORE_METADATA, LITERAL, NOT_LITERAL, REAL_VALUE, REAL_VALUE_CONSIDER_DIFFERENT_IDS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionclone()booleanbooleanequals(PrismValue first, PrismValue second) booleaninthashCode()intinthashCode(PrismValue value) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidsetConsideringContainerIds(boolean consideringContainerIds) voidsetConsideringDifferentContainerIds(boolean consideringDifferentContainerIds) voidsetConsideringElementNames(boolean compareElementNames) voidsetConsideringOperationalData(boolean consideringOperationalData) voidsetConsideringReferenceFilters(boolean consideringReferenceFilters) voidsetConsideringReferenceOptions(boolean consideringReferenceOptions) voidsetConsideringValueMetadata(boolean consideringValueMetadata) voidsetHashRuntimeSchemaItems(boolean hashRuntimeSchemaItems) voidsetLiteralDomComparison(boolean literalDomComparison) toString()Methods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.prism.equivalence.EquivalenceStrategyprismValueComparator
- 
Field Details- 
DEFAULT_FOR_EQUALS
- 
FOR_DELTA_ADD_APPLICATION
- 
FOR_DELTA_DELETE_APPLICATION
 
- 
- 
Constructor Details- 
ParameterizedEquivalenceStrategypublic ParameterizedEquivalenceStrategy()
 
- 
- 
Method Details- 
getLiteral
- 
getDescription
- 
equals- Specified by:
- equalsin interface- EquivalenceStrategy
 
- 
equals- Specified by:
- equalsin interface- EquivalenceStrategy
 
- 
hashCode- Specified by:
- hashCodein interface- EquivalenceStrategy
 
- 
hashCode- 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) 
- 
toString
- 
clone
- 
exceptForValueMetadata
- 
equals
- 
hashCodepublic int hashCode()
 
-