Class ResourceKeyIdGraphQlRequest
- java.lang.Object
 - 
- com.commercetools.sync.commons.helpers.GraphQlBaseRequestImpl<ResourceKeyIdGraphQlResult>
 - 
- com.commercetools.sync.commons.helpers.ResourceKeyIdGraphQlRequest
 
 
 
- 
- All Implemented Interfaces:
 GraphQlBaseRequest<ResourceKeyIdGraphQlResult>,io.sphere.sdk.client.SphereRequest<ResourceKeyIdGraphQlResult>
public class ResourceKeyIdGraphQlRequest extends GraphQlBaseRequestImpl<ResourceKeyIdGraphQlResult>
A SphereRequest implementation to allowSphereClientto execute graphQL queries on CTP. It provides a POST request to the CTP graphql API containing body to fetch a set of ids matching given keys of a resource defined in endpoint parameter. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<java.lang.String>keysToSearchprotected GraphQlQueryResourcesresource- 
Fields inherited from class com.commercetools.sync.commons.helpers.GraphQlBaseRequestImpl
limit, queryPredicate 
 - 
 
- 
Constructor Summary
Constructors Constructor Description ResourceKeyIdGraphQlRequest(java.util.Set<java.lang.String> keysToSearch, GraphQlQueryResources resource)TakeskeysToSearchand query resource nameGraphQlQueryResourcesto instantiate a newResourceKeyIdGraphQlRequestinstance, which is an implementation of theSphereRequest. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringbuildQueryString()This method builds a string matching the required format to query a set of ids matching given keys of a resource using the CTP graphql APIResourceKeyIdGraphQlResultdeserialize(io.sphere.sdk.http.HttpResponse httpResponse)- 
Methods inherited from class com.commercetools.sync.commons.helpers.GraphQlBaseRequestImpl
deserializeWithResourceName, httpRequestIntent, withLimit, withPredicate 
 - 
 
 - 
 
- 
- 
Field Detail
- 
keysToSearch
protected final java.util.Set<java.lang.String> keysToSearch
 
- 
resource
protected final GraphQlQueryResources resource
 
 - 
 
- 
Constructor Detail
- 
ResourceKeyIdGraphQlRequest
public ResourceKeyIdGraphQlRequest(@Nonnull java.util.Set<java.lang.String> keysToSearch, @Nonnull GraphQlQueryResources resource)TakeskeysToSearchand query resource nameGraphQlQueryResourcesto instantiate a newResourceKeyIdGraphQlRequestinstance, which is an implementation of theSphereRequest.- Parameters:
 keysToSearch- - a set of keys to fetch matching ids for.resource- - a string representing the name of the resource endpoint.
 
 - 
 
- 
Method Detail
- 
deserialize
@Nullable public ResourceKeyIdGraphQlResult deserialize(io.sphere.sdk.http.HttpResponse httpResponse)
 
- 
buildQueryString
@Nonnull protected java.lang.String buildQueryString()
This method builds a string matching the required format to query a set of ids matching given keys of a resource using the CTP graphql API- Specified by:
 buildQueryStringin classGraphQlBaseRequestImpl<ResourceKeyIdGraphQlResult>- Returns:
 - a string representing a graphql query
 
 
 - 
 
 -