Class DefaultObjectAttributeComparator

java.lang.Object
de.hybris.platform.cockpit.services.values.impl.DefaultObjectAttributeComparator
All Implemented Interfaces:
ObjectAttributeComparator
Direct Known Subclasses:
ProductAwareAttributeComparator

public class DefaultObjectAttributeComparator extends Object implements ObjectAttributeComparator
  • Constructor Details

    • DefaultObjectAttributeComparator

      public DefaultObjectAttributeComparator()
  • Method Details

    • isEqual

      public boolean isEqual(ObjectValuePair value1, ObjectValuePair value2)
      Description copied from interface: ObjectAttributeComparator
      Checks, if two values are considered equal. Takes two ObjectValuePairs as parameters, which hold informations about the values itself and the items and property descriptors from which they are referenced.
      Specified by:
      isEqual in interface ObjectAttributeComparator
      Parameters:
      value1 - the first ObjectValuePair
      value2 - the second ObjectValuePair
      Returns:
      true, if equal, false otherwise
    • compareSingleObjects

      protected boolean compareSingleObjects(Object object1, Object object2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
      Compares single (non-collection) values.
      Parameters:
      object1 - the first value
      object2 - the second value
      ctx - the context, holds informations about referencing items and property descriptor
      Returns:
      true, if equal, false otherwise
    • comparePlainObjects

      protected boolean comparePlainObjects(Object object1, Object object2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
      Compares objects that are not instances of TypedObject
      Parameters:
      object1 - the first value
      object2 - the second value
      ctx - the context, holds informations about referencing items and property descriptor
      Returns:
      true, if equal, false otherwise
    • compareFeatures

      protected boolean compareFeatures(FeatureValue feature1, FeatureValue feature2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
      Compares two FeatureValue objects.
      Returns:
      true, if value, description and unit attributes are equal.
    • compareTypedObjects

      protected boolean compareTypedObjects(TypedObject object1, TypedObject object2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
      Compares objects that are instances of TypedObject
      Parameters:
      object1 - the first value
      object2 - the second value
      ctx - the context, holds informations about referencing items and property descriptor
      Returns:
      true, if equal, false otherwise
    • compareCollections

      protected boolean compareCollections(Collection coll1, Collection coll2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
      Compares collections
      Parameters:
      coll1 - the first collection
      coll2 - the second collection
      ctx - the context, holds informations about referencing items and property descriptor
      Returns:
      true, if equal, false otherwise