io.sphere.sdk.search.model.RangeTermFacetSearchModel Maven / Gradle / Ivy
package io.sphere.sdk.search.model;
import io.sphere.sdk.search.*;
import java.util.function.Function;
/**
* Model to build range and term facets.
* @param type of the resource
* @param type of the value
*/
public class RangeTermFacetSearchModel> extends RangeTermFacetBaseSearchModel {
RangeTermFacetSearchModel(final SearchModel searchModel, final Function typeSerializer, final String alias) {
super(searchModel, typeSerializer, alias);
}
RangeTermFacetSearchModel(final SearchModel searchModel, final Function typeSerializer) {
super(searchModel, typeSerializer);
}
@Override
public RangeTermFacetSearchModel withAlias(final String alias) {
return new RangeTermFacetSearchModel<>(searchModel, typeSerializer, alias);
}
@Override
public TermFacetExpression allTerms() {
return super.allTerms();
}
@Override
public RangeFacetExpression allRanges() {
return super.allRanges();
}
@Override
public FilteredFacetExpression onlyTerm(final V value) {
return super.onlyTerm(value);
}
@Override
public FilteredFacetExpression onlyTerm(final Iterable values) {
return super.onlyTerm(values);
}
@Override
public RangeFacetExpression onlyRange(final FacetRange range) {
return super.onlyRange(range);
}
@Override
public RangeFacetExpression onlyRange(final Iterable> facetRanges) {
return super.onlyRange(facetRanges);
}
@Override
public RangeFacetExpression onlyRange(final V lowerEndpoint, final V upperEndpoint) {
return super.onlyRange(lowerEndpoint, upperEndpoint);
}
@Override
public RangeFacetExpression onlyGreaterThanOrEqualTo(final V value) {
return super.onlyGreaterThanOrEqualTo(value);
}
@Override
public RangeFacetExpression onlyLessThan(final V value) {
return super.onlyLessThan(value);
}
/**
* Creates an instance of the search model to generate range and term facet expressions.
* @param attributePath the path of the attribute as expected by Commercetools Platform (e.g. "variants.attributes.color.key")
* @param typeSerializer the function to convert the provided value to a string accepted by Commercetools Platform
* @param type of the resource
* @param type of the value
* @return new instance of RangeTermFacetSearchModel
*/
public static > RangeTermFacetSearchModel of(final String attributePath, final Function typeSerializer) {
return new RangeTermFacetSearchModel<>(new SearchModelImpl<>(attributePath), typeSerializer);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy