Class DefaultObjectAttributeComparator
java.lang.Object
de.hybris.platform.cockpit.services.values.impl.DefaultObjectAttributeComparator
- All Implemented Interfaces:
ObjectAttributeComparator
- Direct Known Subclasses:
ProductAwareAttributeComparator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancompareCollections(Collection coll1, Collection coll2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx) Compares collectionsprotected booleancompareFeatures(FeatureValue feature1, FeatureValue feature2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx) Compares two FeatureValue objects.protected booleancomparePlainObjects(Object object1, Object object2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx) Compares objects that are not instances of TypedObjectprotected booleancompareSingleObjects(Object object1, Object object2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx) Compares single (non-collection) values.protected booleancompareTypedObjects(TypedObject object1, TypedObject object2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx) Compares objects that are instances of TypedObjectbooleanisEqual(ObjectValuePair value1, ObjectValuePair value2) Checks, if two values are considered equal.
-
Constructor Details
-
DefaultObjectAttributeComparator
public DefaultObjectAttributeComparator()
-
-
Method Details
-
isEqual
Description copied from interface:ObjectAttributeComparatorChecks, 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:
isEqualin interfaceObjectAttributeComparator- Parameters:
value1- the first ObjectValuePairvalue2- 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 valueobject2- the second valuectx- 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 valueobject2- the second valuectx- 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 valueobject2- the second valuectx- 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 collectioncoll2- the second collectionctx- the context, holds informations about referencing items and property descriptor- Returns:
- true, if equal, false otherwise
-