Class FluentHelperCount

java.lang.Object
com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCount

public class FluentHelperCount extends Object
Representation of an OData query for count, as a fluent interface for further configuring the request and executing it.
  • Method Details

    • executeRequest

      public long executeRequest(@Nonnull Destination destination)
      Executes the underlying query for count, using the stored values, plus any query modifiers that were previously called.
      Parameters:
      destination - The target system this request should be issued against.
      Returns:
      The number of tuples that match the criteria specified in the query.
      Throws:
      DestinationAccessException - If there is an issue accessing the HttpDestination.
      HttpClientInstantiationException - If there is an issue creating the HttpClient.
      ODataException - If the OData request execution failed. Please find the documentation for ODataException possible sub-types and error scenarios they can occur in.
    • toRequest

      @Nonnull public ODataRequestCount toRequest()
      Creates an instance of ODataRequestCount.

      The following settings are used:

      • the endpoint URL
      • the entity collection name
      • the OData query
      Returns:
      A new count request with the given configuraiton.
    • withCsrfToken

      @Nonnull public FluentHelperCount withCsrfToken()
      Activates the CSRF token retrieval for this OData request. This is useful if the server does require CSRF tokens as part of the request.
      Returns:
      The same builder