public abstract class GraphQlBaseRequestImpl<T extends GraphQlBaseResult<? extends GraphQlBaseResource>> extends java.lang.Object implements GraphQlBaseRequest<T>
| Modifier and Type | Field and Description |
|---|---|
protected long |
limit |
protected java.lang.String |
queryPredicate |
| Constructor and Description |
|---|
GraphQlBaseRequestImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.lang.String |
buildQueryString()
This method builds a string matching the required format needed in the CTP graphql API.
|
T |
deserializeWithResourceName(io.sphere.sdk.http.HttpResponse httpResponse,
java.lang.String resourceName,
java.lang.Class<T> clazz)
Deserialize the body of
httpResponse. |
io.sphere.sdk.client.HttpRequestIntent |
httpRequestIntent() |
GraphQlBaseRequest<T> |
withLimit(long limit)
This method adds a limit to the request.
|
GraphQlBaseRequest<T> |
withPredicate(java.lang.String predicate)
This method adds a predicate string to the request.
|
@Nonnull public GraphQlBaseRequest<T> withPredicate(java.lang.String predicate)
withPredicate in interface GraphQlBaseRequest<T extends GraphQlBaseResult<? extends GraphQlBaseResource>>predicate - - a string representing a query predicate.@Nonnull public GraphQlBaseRequest<T> withLimit(long limit)
withLimit in interface GraphQlBaseRequest<T extends GraphQlBaseResult<? extends GraphQlBaseResource>>limit - - a number representing the query limit parameterpublic io.sphere.sdk.client.HttpRequestIntent httpRequestIntent()
httpRequestIntent in interface io.sphere.sdk.client.SphereRequest<T extends GraphQlBaseResult<? extends GraphQlBaseResource>>@Nullable public T deserializeWithResourceName(@Nonnull io.sphere.sdk.http.HttpResponse httpResponse, @Nonnull java.lang.String resourceName, @Nonnull java.lang.Class<T> clazz)
httpResponse.httpResponse - httpResponse of the request.resourceName - resource type in the query (i.e "customers", "products", "customObjects")clazz - the type of the class to deserialize.protected abstract java.lang.String buildQueryString()