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

io.sphere.sdk.customers.queries.CustomerQuery Maven / Gradle / Ivy

There is a newer version: 2.16.0
Show newest version
/*
This class has been generated by class io.sphere.sdk.annotations.processors.HasQueryEndpointAnnotationProcessor
induced by the annotation io.sphere.sdk.annotations.HasQueryEndpoint.
in the source class io.sphere.sdk.customers.Customer.
To render this class the handlebars template 'queries/resourceQueryInterface.hbs' has been used.
*/
package io.sphere.sdk.customers.queries;

import com.fasterxml.jackson.core.type.TypeReference;
import io.sphere.sdk.customers.Customer;
import io.sphere.sdk.customers.expansion.CustomerExpansionModel;
import io.sphere.sdk.expansion.ExpansionPathContainer;
import io.sphere.sdk.queries.PagedQueryResult;
import io.sphere.sdk.queries.MetaModelQueryDsl;
import io.sphere.sdk.queries.QueryPredicate;
import io.sphere.sdk.queries.QuerySort;



import java.util.List;
import java.util.Locale;
import java.util.function.Function;
import java.util.Optional;

/**
 * {@doc.gen summary customers
 */
public interface CustomerQuery extends MetaModelQueryDsl> {

    /**
     * Creates a container which contains the full Java type information to deserialize the query result (NOT this class) from JSON.
     *
     * @see io.sphere.sdk.json.SphereJsonUtils#readObject(byte[], TypeReference)
     * @see io.sphere.sdk.json.SphereJsonUtils#readObject(String, TypeReference)
     * @see io.sphere.sdk.json.SphereJsonUtils#readObject(com.fasterxml.jackson.databind.JsonNode, TypeReference)
     * @see io.sphere.sdk.json.SphereJsonUtils#readObjectFromResource(String, TypeReference)
     *
     * @return type reference
     */
    static TypeReference> resultTypeReference() {
        return new TypeReference>() {
            @Override
            public String toString() {
                return "TypeReference>";
            }
        };
    }

    static CustomerQuery of() {
        return new CustomerQueryImpl();
    }

    @Override
    CustomerQuery plusPredicates(final Function> m);

    @Override
    CustomerQuery plusPredicates(final QueryPredicate queryPredicate);

    @Override
    CustomerQuery plusPredicates(final List> queryPredicates);

    @Override
    CustomerQuery plusSort(final Function> m);

    @Override
    CustomerQuery plusSort(final List> sort);

    @Override
    CustomerQuery plusSort(final QuerySort sort);

    @Override
    CustomerQuery withPredicates(final Function> predicateFunction);

    @Override
    CustomerQuery withPredicates(final QueryPredicate queryPredicate);

    @Override
    CustomerQuery withPredicates(final List> queryPredicates);

    @Override
    CustomerQuery withSort(final Function> m);

    @Override
    CustomerQuery withSort(final List> sort);

    @Override
    CustomerQuery withSort(final QuerySort sort);

    @Override
    CustomerQuery withSortMulti(final Function>> m);

    @Override
    CustomerQuery plusExpansionPaths(final Function, ExpansionPathContainer> m);

    @Override
    CustomerQuery withExpansionPaths(final Function, ExpansionPathContainer> m);

    @Override
    CustomerQuery withFetchTotal(final boolean fetchTotal);

    @Override
    CustomerQuery withLimit(final Long limit);

    @Override
    CustomerQuery withOffset(final Long offset);

        default CustomerQuery byEmail(final String email) {
        return withPredicates(m -> m.lowercaseEmail().is(email.toLowerCase()));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy