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 Summary
Modifier and TypeMethodDescriptionstatic <D,T> String arrayValue(@NotNull SearchOperation operation, boolean isJsonSerialization, @NotNull DtoField<? super D, T> field, @NotNull Collection<T> values) Creates a URL-encoded filter expression for a collection field/value pair, optionally serializing each value to JSON.static <D,T> String arrayValue(@NotNull SearchOperation operation, @NotNull DtoField<? super D, T> field, @NotNull Collection<T> values) Creates a URL-encoded filter expression for a collection field/value pair.static <D,T extends MultivalueField>
Stringmultivalue(@NotNull SearchOperation operation, @NotNull DtoField<? super D, T> field, T multivalue, @NotNull Function<MultivalueFieldSingleValue, String> extractor) Creates a URL-encoded filter expression for a multivalue field.static <D,T> String singleValue(@NotNull SearchOperation operation, boolean isJsonSerialization, @NotNull DtoField<? super D, T> field, T value) Creates a URL-encoded filter expression for a single field/value pair, optionally serializing the value to JSON.static <D,T> String singleValue(@NotNull SearchOperation operation, @NotNull DtoField<? super D, T> field, T value) Creates a URL-encoded filter expression for a single field/value pair.
-
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 belongsT- the type of the field’s value- Parameters:
operation- the search operation to apply; must not be nullfield- the descriptor of the field to filter on; must not be nullvalue- 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 belongsT- the type of the field’s value- Parameters:
operation- the search operation to apply; must not be nullisJsonSerialization- whether to serialize the value as JSONfield- the descriptor of the field to filter on; must not be nullvalue- 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 belongsT- the type of the field’s values- Parameters:
operation- the search operation to apply; must not be nullfield- the descriptor of the field to filter on; must not be nullvalues- 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 belongsT- the type of the field’s values- Parameters:
operation- the search operation to apply; must not be nullisJsonSerialization- whether to serialize each value as JSONfield- the descriptor of the field to filter on; must not be nullvalues- 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 belongsT- the multivalue field type- Parameters:
operation- the search operation to apply; must not be nullfield- the descriptor of the field to filter on; must not be nullmultivalue- the multivalue field instance; must not be nullextractor- function to extract string from each single value; must not be null- Returns:
- the URL-encoded filter expression using UTF-8 encoding
-