public final class CtpQueryUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T,C extends io.sphere.sdk.queries.QueryDsl<T,C>> |
queryAll(io.sphere.sdk.client.SphereClient client,
io.sphere.sdk.queries.QueryDsl<T,C> query,
java.util.function.Consumer<java.util.List<T>> consumer)
Queries all elements matching a query by using an offset based pagination with page size 500.
|
static <T,C extends io.sphere.sdk.queries.QueryDsl<T,C>> |
queryAll(io.sphere.sdk.client.SphereClient client,
io.sphere.sdk.queries.QueryDsl<T,C> query,
java.util.function.Consumer<java.util.List<T>> consumer,
int pageSize)
Queries all elements matching a query by using an offset based pagination.
|
static <T,C extends io.sphere.sdk.queries.QueryDsl<T,C>,S> |
queryAll(io.sphere.sdk.client.SphereClient client,
io.sphere.sdk.queries.QueryDsl<T,C> query,
java.util.function.Function<java.util.List<T>,S> callBack)
Queries all elements matching a query by using an offset based pagination with page size 500.
|
static <T,C extends io.sphere.sdk.queries.QueryDsl<T,C>,S> |
queryAll(io.sphere.sdk.client.SphereClient client,
io.sphere.sdk.queries.QueryDsl<T,C> query,
java.util.function.Function<java.util.List<T>,S> callback,
int pageSize)
Queries all elements matching a query by using an offset based pagination.
|
@Nonnull
public static <T,C extends io.sphere.sdk.queries.QueryDsl<T,C>,S> java.util.concurrent.CompletionStage<java.util.List<S>> queryAll(@Nonnull
io.sphere.sdk.client.SphereClient client,
@Nonnull
io.sphere.sdk.queries.QueryDsl<T,C> query,
@Nonnull
java.util.function.Function<java.util.List<T>,S> callBack)
Function that returns a result of type <S> that is returned on every
page of elements queried. Eventually, the method returns a CompletionStage that contains a list of all
the results of the callbacks returned from every page.T - type of one query result elementC - type of the queryS - type of the returned result of the callback function on every page.client - commercetools clientquery - query containing predicates and expansion pathscallBack - callback function that is called on every page queried.@Nonnull
public static <T,C extends io.sphere.sdk.queries.QueryDsl<T,C>> java.util.concurrent.CompletionStage<java.lang.Void> queryAll(@Nonnull
io.sphere.sdk.client.SphereClient client,
@Nonnull
io.sphere.sdk.queries.QueryDsl<T,C> query,
@Nonnull
java.util.function.Consumer<java.util.List<T>> consumer)
Consumer that is applied on on every page of elements queried.T - type of one query result elementC - type of the queryclient - commercetools clientquery - query containing predicates and expansion pathsconsumer - that is applied on every page queried.@Nonnull
public static <T,C extends io.sphere.sdk.queries.QueryDsl<T,C>,S> java.util.concurrent.CompletionStage<java.util.List<S>> queryAll(@Nonnull
io.sphere.sdk.client.SphereClient client,
@Nonnull
io.sphere.sdk.queries.QueryDsl<T,C> query,
@Nonnull
java.util.function.Function<java.util.List<T>,S> callback,
int pageSize)
Function that returns a result of type <S> that is returned on every page of elements queried.
Eventually, the method returns a CompletionStage that contains a list of all the results of the
callbacks returned from every page.T - type of one query result elementC - type of the queryS - type of the returned result of the callback function on every page.client - commercetools clientquery - query containing predicates and expansion pathscallback - callback function that is called on every page queried.pageSize - the page size.@Nonnull
public static <T,C extends io.sphere.sdk.queries.QueryDsl<T,C>> java.util.concurrent.CompletionStage<java.lang.Void> queryAll(@Nonnull
io.sphere.sdk.client.SphereClient client,
@Nonnull
io.sphere.sdk.queries.QueryDsl<T,C> query,
@Nonnull
java.util.function.Consumer<java.util.List<T>> consumer,
int pageSize)
Consumer that is applied on on every page of elements queried.T - type of one query result elementC - type of the queryclient - commercetools clientquery - query containing predicates and expansion pathsconsumer - that is applied on every page queried.pageSize - the page size.