All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.products.queries.SuggestQuery Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.products.queries;

import io.sphere.sdk.client.SphereRequest;
import io.sphere.sdk.models.LocalizedStringEntry;
import io.sphere.sdk.products.SuggestionResult;

import java.util.List;

import static java.util.Collections.singletonList;


/**
 * Query search keywords to implement a basic auto-complete functionality.
 *
 * {@include.example io.sphere.sdk.products.queries.SuggestQueryTest#suggestionForMultipleLanguages()}
 */
public interface SuggestQuery extends SphereRequest {

    static SuggestQuery of(final List searchKeywords) {
        return new SuggestQueryImpl(searchKeywords);
    }

    static SuggestQuery of(final LocalizedStringEntry searchKeyword) {
        return of(singletonList(searchKeyword));
    }

    SuggestQuery withLimit(final Integer limit);

    SuggestQuery withStaged(final boolean staged);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy