Class CatalogVersionLevelComparator
java.lang.Object
de.hybris.platform.cms2.multicountry.comparator.CatalogVersionLevelComparator
- All Implemented Interfaces:
Comparator<CatalogVersionModel>
public class CatalogVersionLevelComparator
extends Object
implements Comparator<CatalogVersionModel>
Compare
CatalogVersionModel by catalog level where the catalog version was defined. This is used in the
context of multi-country.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompare(CatalogVersionModel catalogVersion1, CatalogVersionModel catalogVersion2) protected intcompareSameLevelCatalogVersions(CatalogVersionModel catalogVersion1, CatalogVersionModel catalogVersion2) Determines the ordering of catalog versions that are on the same catalog level.protected CatalogLevelServicevoidsetCmsCatalogLevelService(CatalogLevelService cmsCatalogLevelService) 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
-
CatalogVersionLevelComparator
public CatalogVersionLevelComparator()
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<CatalogVersionModel>
-
compareSameLevelCatalogVersions
protected int compareSameLevelCatalogVersions(CatalogVersionModel catalogVersion1, CatalogVersionModel catalogVersion2) Determines the ordering of catalog versions that are on the same catalog level. The catalog version that is active takes precedence.- Parameters:
catalogVersion1- - the first catalog version to be comparedcatalogVersion2- - the second catalog version to be compared- Returns:
- The ordering of the catalog versions
-
getCmsCatalogLevelService
-
setCmsCatalogLevelService
-