Class GraphQlBaseRequestImpl<T extends GraphQlBaseResult<? extends GraphQlBaseResource>>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected long limit  
      protected java.lang.String queryPredicate  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.sphere.sdk.client.SphereRequest

        canDeserialize, deserialize
    • Field Detail

      • queryPredicate

        protected java.lang.String queryPredicate
      • limit

        protected long limit
    • Constructor Detail

      • GraphQlBaseRequestImpl

        public GraphQlBaseRequestImpl()
    • Method Detail

      • httpRequestIntent

        public io.sphere.sdk.client.HttpRequestIntent httpRequestIntent()
        Specified by:
        httpRequestIntent in interface io.sphere.sdk.client.SphereRequest<T extends GraphQlBaseResult<? extends GraphQlBaseResource>>
      • deserializeWithResourceName

        @Nullable
        public T deserializeWithResourceName​(@Nonnull
                                             io.sphere.sdk.http.HttpResponse httpResponse,
                                             @Nonnull
                                             java.lang.String resourceName,
                                             @Nonnull
                                             java.lang.Class<T> clazz)
        Deserialize the body of httpResponse.
        Parameters:
        httpResponse - httpResponse of the request.
        resourceName - resource type in the query (i.e "customers", "products", "customObjects")
        clazz - the type of the class to deserialize.
        Returns:
        the deserialized body of the graphql request.
      • buildQueryString

        protected abstract java.lang.String buildQueryString()
        This method builds a string matching the required format needed in the CTP graphql API.
        Returns:
        a string representing a graphql query