com.liferay.commerce.availability.estimate.web.internal.util.CommerceAvailabilityEstimateUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.commerce.availability.estimate.web
Show all versions of com.liferay.commerce.availability.estimate.web
Liferay Commerce Availability Estimate Web
The newest version!
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
package com.liferay.commerce.availability.estimate.web.internal.util;
import com.liferay.commerce.model.CommerceAvailabilityEstimate;
import com.liferay.commerce.util.comparator.CommerceAvailabilityEstimatePriorityComparator;
import com.liferay.portal.kernel.util.OrderByComparator;
/**
* @author Alessio Antonio Rendina
*/
public class CommerceAvailabilityEstimateUtil {
public static OrderByComparator
getCommerceAvailabilityEstimateOrderByComparator(
String orderByCol, String orderByType) {
boolean orderByAsc = false;
if (orderByType.equals("asc")) {
orderByAsc = true;
}
OrderByComparator orderByComparator =
null;
if (orderByCol.equals("priority")) {
orderByComparator =
CommerceAvailabilityEstimatePriorityComparator.getInstance(
orderByAsc);
}
return orderByComparator;
}
}