Class GenericVariantProductModelComparator
java.lang.Object
de.hybris.platform.commerceservices.search.solrfacetsearch.provider.entity.GenericVariantProductModelComparator
- All Implemented Interfaces:
Comparator<GenericVariantProductModel>
public class GenericVariantProductModelComparator
extends Object
implements Comparator<GenericVariantProductModel>
Comparator for type
GenericVariantProductModel.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompare(GenericVariantProductModel variant1, GenericVariantProductModel variant2) Considers variant1 greater then other if, for the same variant category level, the value of theVariantValueCategoryModelbelonging to variant1 has a bigger sequence then theVariantValueCategoryModelbelonging to variant2.protected List<VariantValueCategoryModel>getVariantValuesCategories(GenericVariantProductModel productModel) Get the list ofVariantValueCategoryModelrelated to a specificGenericVariantProductModel.voidsetVariantValueCategoryModelPriorityComparator(Comparator<VariantValueCategoryModel> variantValueCategoryModelPriorityComparator) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
GenericVariantProductModelComparator
public GenericVariantProductModelComparator()
-
-
Method Details
-
compare
Considers variant1 greater then other if, for the same variant category level, the value of theVariantValueCategoryModelbelonging to variant1 has a bigger sequence then theVariantValueCategoryModelbelonging to variant2.- Specified by:
comparein interfaceComparator<GenericVariantProductModel>
-
getVariantValuesCategories
protected List<VariantValueCategoryModel> getVariantValuesCategories(GenericVariantProductModel productModel) Get the list ofVariantValueCategoryModelrelated to a specificGenericVariantProductModel.- Parameters:
productModel- the variant product.- Returns:
- The variant value categories, ordered by variant category priority.
-
getVariantValueCategoryModelPriorityComparator
-
setVariantValueCategoryModelPriorityComparator
public void setVariantValueCategoryModelPriorityComparator(Comparator<VariantValueCategoryModel> variantValueCategoryModelPriorityComparator)
-