io.sphere.sdk.products.search.ProductProjectionSearch Maven / Gradle / Ivy
package io.sphere.sdk.products.search;
import com.fasterxml.jackson.core.type.TypeReference;
import io.sphere.sdk.expansion.ExpansionPath;
import io.sphere.sdk.models.LocalizedStringEntry;
import io.sphere.sdk.products.ProductProjection;
import io.sphere.sdk.products.ProductProjectionType;
import io.sphere.sdk.products.expansion.ProductProjectionExpansionModel;
import io.sphere.sdk.search.*;
import java.util.List;
import java.util.Locale;
import java.util.function.Function;
/**
* Searches for products.
*
* Consult the documentation for Product Search API for more information.
*/
public interface ProductProjectionSearch extends MetaModelSearchDsl> {
static TypeReference> resultTypeReference() {
return new TypeReference>(){
@Override
public String toString() {
return "TypeReference>";
}
};
}
/**
* Creates a search request object for the staged data of a product.
* @return search request for staged data
*/
static ProductProjectionSearch ofStaged() {
return of(ProductProjectionType.STAGED);
}
/**
* Creates a search request object for the current data of a product.
* @return search request for current data
*/
static ProductProjectionSearch ofCurrent() {
return of(ProductProjectionType.CURRENT);
}
/**
* Creates a search request object with the product projection type specified by {@code productProjectionType}.
* @param productProjectionType the desired projection type for the search results
* @see #ofStaged()
* @see #ofCurrent()
* @return search request for current data
*/
static ProductProjectionSearch of(final ProductProjectionType productProjectionType) {
return new ProductProjectionSearchImpl(productProjectionType);
}
@Override
ProductProjectionSearch withText(final LocalizedStringEntry text);
@Override
ProductProjectionSearch withText(final Locale locale, final String text);
@Override
ProductProjectionSearch withFuzzy(final Boolean fuzzy);
@Override
ProductProjectionSearch withFacets(final List> facets);
@Override
ProductProjectionSearch plusFacets(final Function> m);
@Override
ProductProjectionSearch plusResultFilters(final List> filterExpressions);
@Override
ProductProjectionSearch plusResultFilters(final Function>> m);
@Override
ProductProjectionSearch plusQueryFilters(final List> filterExpressions);
@Override
ProductProjectionSearch plusQueryFilters(final Function>> m);
@Override
ProductProjectionSearch plusFacetFilters(final List> filterExpressions);
@Override
ProductProjectionSearch plusFacetFilters(final Function>> m);
@Override
ProductProjectionSearch plusSort(final List> sortExpressions);
@Override
ProductProjectionSearch plusSort(final SortExpression sortExpression);
@Override
ProductProjectionSearch plusSort(final Function> m);
@Override
ProductProjectionSearch withLimit(final long limit);
@Override
ProductProjectionSearch withOffset(final long offset);
@Override
ProductProjectionSearch plusExpansionPaths(final List> expansionPaths);
@Override
ProductProjectionSearch plusExpansionPaths(final ExpansionPath expansionPath);
@Override
ProductProjectionSearch plusExpansionPaths(final Function, ExpansionPath> m);
}