Class PlatformDrilldownFilterService.DrillDownFieldFilterFormerUtils

java.lang.Object
org.cxbox.core.service.drilldown.filter.PlatformDrilldownFilterService.DrillDownFieldFilterFormerUtils
Enclosing class:
PlatformDrilldownFilterService

public static final class PlatformDrilldownFilterService.DrillDownFieldFilterFormerUtils extends Object
Utils class for generation filter as encoded url string
  • Method Details

    • singleValue

      public static <D, T> String singleValue(@NotNull @NotNull SearchOperation operation, @NotNull @NotNull DtoField<? super D,T> field, @NotNull T value)
      Creates a URL-encoded filter expression for a single field/value pair.
      Type Parameters:
      D - the DTO type to which the field belongs
      T - the type of the field’s value
      Parameters:
      operation - the search operation to apply; must not be null
      field - the descriptor of the field to filter on; must not be null
      value - the value to match against the field; must not be null
      Returns:
      the URL-encoded filter expression using UTF-8 encoding
    • singleValue

      public static <D, T> String singleValue(@NotNull @NotNull SearchOperation operation, boolean isJsonSerialization, @NotNull @NotNull DtoField<? super D,T> field, @NotNull T value)
      Creates a URL-encoded filter expression for a single field/value pair, optionally serializing the value to JSON.
      Type Parameters:
      D - the DTO type to which the field belongs
      T - the type of the field’s value
      Parameters:
      operation - the search operation to apply; must not be null
      isJsonSerialization - whether to serialize the value as JSON
      field - the descriptor of the field to filter on; must not be null
      value - the value to match against the field; must not be null
      Returns:
      the URL-encoded filter expression using UTF-8 encoding
    • arrayValue

      public static <D, T> String arrayValue(@NotNull @NotNull SearchOperation operation, @NotNull @NotNull DtoField<? super D,T> field, @NotNull @NotNull Collection<T> values)
      Creates a URL-encoded filter expression for a collection field/value pair.
      Type Parameters:
      D - the DTO type to which the field belongs
      T - the type of the field’s values
      Parameters:
      operation - the search operation to apply; must not be null
      field - the descriptor of the field to filter on; must not be null
      values - the collection of values to match; must not be null
      Returns:
      the URL-encoded filter expression using UTF-8 encoding
    • arrayValue

      public static <D, T> String arrayValue(@NotNull @NotNull SearchOperation operation, boolean isJsonSerialization, @NotNull @NotNull DtoField<? super D,T> field, @NotNull @NotNull Collection<T> values)
      Creates a URL-encoded filter expression for a collection field/value pair, optionally serializing each value to JSON.
      Type Parameters:
      D - the DTO type to which the field belongs
      T - the type of the field’s values
      Parameters:
      operation - the search operation to apply; must not be null
      isJsonSerialization - whether to serialize each value as JSON
      field - the descriptor of the field to filter on; must not be null
      values - the collection of values to match; must not be null
      Returns:
      the URL-encoded filter expression using UTF-8 encoding
    • multivalue

      public static <D, T extends MultivalueField> String multivalue(@NotNull @NotNull SearchOperation operation, @NotNull @NotNull DtoField<? super D,T> field, @NotNull T multivalue, @NotNull @NotNull Function<MultivalueFieldSingleValue,String> extractor)
      Creates a URL-encoded filter expression for a multivalue field.
      Type Parameters:
      D - the DTO type to which the field belongs
      T - the multivalue field type
      Parameters:
      operation - the search operation to apply; must not be null
      field - the descriptor of the field to filter on; must not be null
      multivalue - the multivalue field instance; must not be null
      extractor - function to extract string from each single value; must not be null
      Returns:
      the URL-encoded filter expression using UTF-8 encoding