Class CxMulticountryParamSupport

java.lang.Object
de.hybris.platform.personalizationservices.dao.CxMulticountryParamSupport

public final class CxMulticountryParamSupport extends Object
  • Field Details

  • Method Details

    • isMulticountryEnabled

      public static boolean isMulticountryEnabled(Map<String,Object> queryParams)
      Checks if query should provide multicountry support.
      Parameters:
      queryParams - query parameters
      Returns:
      true if multicountry support is required
    • getMulticountryWhereOperator

      public static String getMulticountryWhereOperator(Map<String,Object> queryParams)
      Returns operator and parameter for catalog version of customization for "WHERE" part of the query.
      Parameters:
      queryParams - query parameters
      Returns:
      " IN (?catalogVersions)" for multicountry and " = ?catalogVersion" for single catalog query
    • buildOrderByForMulticountry

      public static String buildOrderByForMulticountry(Map<String,Object> queryParams)
      Builds extra order by statement for multicountry for ordering by catalog version. If query does not support multicountry returns empty string.
      Parameters:
      queryParams - query parameters
      Returns:
      order by statement or empty string if query does not support multicountry
    • buildOrderByForMulticountry

      public static String buildOrderByForMulticountry(Map<String,Object> queryParams, String prefix)
      Builds extra order by statement for multicountry for ordering by catalog version. If query does not support multicountry returns empty string.
      Parameters:
      queryParams - query parameters
      prefix - prefix for customization table
      Returns:
      order by statement or empty string if query does not support multicountry
    • buildCaseFroMulticountry

      public static String buildCaseFroMulticountry(Map<String,Object> queryParams, String prefix)
      Builds a case statement for multicountry query. It can be used to add extra column into the results or to order results by catalog version.
      Parameters:
      queryParams - query parameters
      prefix - prefix for customization table
      Returns:
      case statement
    • buildCaseFroMulticountry

      public static String buildCaseFroMulticountry(List<CatalogVersionModel> catalogVersions, String prefix)
      Builds a case statement for multicountry query. It can be used to add extra column into the results or to order results by catalog version.
      Parameters:
      catalogVersions - list of catalog versions that will be in case statement
      Returns:
      case statement