Class ODataRequestRead

java.lang.Object
com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestGeneric
com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestRead
All Implemented Interfaces:
ODataRequestExecutable
Direct Known Subclasses:
ODataRequestCount

public class ODataRequestRead extends ODataRequestGeneric
The result type of the OData Read request.
  • Constructor Details

    • ODataRequestRead

      public ODataRequestRead(@Nonnull String servicePath, @Nonnull String entityName, @Nullable String encodedQuery, @Nonnull ODataProtocol protocol)
      Convenience constructor for OData read requests on entity collections directly. For operations on nested entity collections use ODataRequestRead(String, ODataResourcePath, String, ODataProtocol).
      Parameters:
      servicePath - The OData service path.
      entityName - The OData entity name.
      encodedQuery - Optional: The encoded HTTP query, if any.
      protocol - The OData protocol to use.
    • ODataRequestRead

      public ODataRequestRead(@Nonnull String servicePath, @Nonnull ODataResourcePath entityPath, @Nullable String encodedQuery, @Nonnull ODataProtocol protocol)
      Default constructor for OData Read request.

      Note: The query string queryString must not contain characters that are forbidden in URLs, like spaces. If forbidden characters are present, an IllegalArgumentException is thrown.

      Build an instance of StructuredQuery and pass the value of StructuredQuery.getEncodedQueryString() as queryString to this method.

      Alternatively, use UrlEscapers.urlFragmentEscaper() from the Guava library to escape the query string before passing it here.

      Parameters:
      servicePath - The OData service path.
      entityPath - The ODataResourcePath that identifies the collection of entities or properties to read.
      encodedQuery - Optional: The encoded HTTP query, if any.
      protocol - The OData protocol to use.
    • ODataRequestRead

      public ODataRequestRead(@Nonnull String servicePath, @Nonnull ODataResourcePath entityPath, @Nonnull StructuredQuery query)
      Constructor with StructuredQuery for OData read requests on entity collections directly. For operations on nested entity collections use ODataRequestRead(String, ODataResourcePath, String, ODataProtocol).
      Parameters:
      servicePath - The OData service path.
      entityPath - The ODataResourcePath that identifies the collection of entities or properties to read.
      query - The structured query.
  • Method Details