Class SolrValueFormatUtils

java.lang.Object
de.hybris.platform.solrfacetsearch.solr.impl.SolrValueFormatUtils

public final class SolrValueFormatUtils extends Object
Provides methods for Solr value formatting.
  • Method Details

    • generateKey

      protected static String generateKey(Class<?> valueClass)
    • format

      public static String format(String value, Class<?> valueClass)
      Format a value according to the given value class.
      Parameters:
      value - - the value
      valueClass - - the value class
      Returns:
      the formatted value
    • formatString

      public static String formatString(String value)
      Formats the value using String as value type.
      Parameters:
      value - - the value to format
      Returns:
      the formatted value
    • formatBoolean

      public static String formatBoolean(String value)
      Formats the value using Boolean as value type.
      Parameters:
      value - - the value to format
      Returns:
      the formatted value
    • formatShort

      public static String formatShort(String value)
      Formats the value using Short as value type.
      Parameters:
      value - - the value to format
      Returns:
      the formatted value
    • formatInteger

      public static String formatInteger(String value)
      Formats the value using Integer as value type.
      Parameters:
      value - - the value to format
      Returns:
      the formatted value
    • formatLong

      public static String formatLong(String value)
      Formats the value using Long as value type.
      Parameters:
      value - - the value to format
      Returns:
      the formatted value
    • formatFloat

      public static String formatFloat(String value)
      Formats the value using Float as value type.
      Parameters:
      value - - the value to format
      Returns:
      the formatted value
    • formatDouble

      public static String formatDouble(String value)
      Formats the value using Double as value type.
      Parameters:
      value - - the value to format
      Returns:
      the formatted value
    • formatBigInteger

      public static String formatBigInteger(String value)
      Formats the value using BigInteger as value type.
      Parameters:
      value - - the value to format
      Returns:
      the formatted value
    • formatBigDecimal

      public static String formatBigDecimal(String value)
      Formats the value using BigDecimal as value type.
      Parameters:
      value - - the value to format
      Returns:
      the formatted value
    • formatDate

      public static String formatDate(String value)
      Formats the value using Date as value type.
      Parameters:
      value - - the value to format
      Returns:
      the formatted value