Class ODataRequestUpdate

java.lang.Object
com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestGeneric
com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestUpdate
All Implemented Interfaces:
ODataRequestExecutable

public class ODataRequestUpdate extends ODataRequestGeneric
The executable OData patch update request.
  • Constructor Details

    • ODataRequestUpdate

      public ODataRequestUpdate(@Nonnull String servicePath, @Nonnull String entityName, @Nonnull ODataEntityKey entityKey, @Nonnull String serializedEntity, @Nonnull UpdateStrategy updateStrategy, @Nullable String versionIdentifier, @Nonnull ODataProtocol protocol)
      Convenience constructor for OData update requests on entity collections directly. For operations on nested entities use ODataRequestUpdate(String, ODataResourcePath, String, UpdateStrategy, String, ODataProtocol).
      Parameters:
      servicePath - The OData service path.
      entityName - The OData entity name.
      entityKey - The OData entity key.
      serializedEntity - The serialized OData entity.
      updateStrategy - The update strategy.
      versionIdentifier - The entity version identifier.
      protocol - The OData protocol to use.
    • ODataRequestUpdate

      public ODataRequestUpdate(@Nonnull String servicePath, @Nonnull ODataResourcePath entityPath, @Nonnull String serializedEntity, @Nonnull UpdateStrategy updateStrategy, @Nullable String versionIdentifier, @Nonnull ODataProtocol protocol)
      Default constructor for OData Update requests.
      Parameters:
      servicePath - The OData service path.
      entityPath - The ODataResourcePath that identifies the entity to update.
      serializedEntity - The serialized OData entity.
      updateStrategy - The update strategy.
      versionIdentifier - The entity version identifier.
      protocol - The OData protocol to use.
    • ODataRequestUpdate

      public ODataRequestUpdate(@Nonnull String servicePath, @Nonnull ODataResourcePath entityPath, @Nonnull org.apache.http.HttpEntity httpEntity, @Nonnull UpdateStrategy updateStrategy, @Nullable String versionIdentifier, @Nonnull ODataProtocol protocol)
      Default constructor for OData Update requests.
      Parameters:
      servicePath - The OData service path.
      entityPath - The ODataResourcePath that identifies the entity to update.
      httpEntity - The Http entity.
      updateStrategy - The update strategy.
      versionIdentifier - The entity version identifier.
      protocol - The OData protocol to use.
  • Method Details

    • getRelativeUri

      @Nonnull public URI getRelativeUri(@Nonnull UriEncodingStrategy strategy)
      Description copied from class: ODataRequestGeneric
      Get the static request URI of the OData resource.
      Specified by:
      getRelativeUri in class ODataRequestGeneric
      Parameters:
      strategy - URI encoding strategy.
      Returns:
      The String representation of the request URI.
    • execute

      @Nonnull public ODataRequestResultGeneric execute(@Nonnull org.apache.http.client.HttpClient httpClient)
      Description copied from interface: ODataRequestExecutable
      Execute the OData request with the provided HttpClient reference.
      Parameters:
      httpClient - The HttpClient.
      Returns:
      An OData request result.
    • getSerializedEntity

      @Nonnull public String getSerializedEntity()
      Get the String representation of the update payload.
      Returns:
      The serialized entity.
    • getUpdateStrategy

      @Nonnull public UpdateStrategy getUpdateStrategy()
      The UpdateStrategy determines if the entity will be changed or replaced.
    • getVersionIdentifier

      @Nullable public String getVersionIdentifier()
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class ODataRequestGeneric
    • canEqual

      protected boolean canEqual(@Nullable Object other)
      Overrides:
      canEqual in class ODataRequestGeneric
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ODataRequestGeneric
    • setUpdateStrategy

      public void setUpdateStrategy(@Nonnull UpdateStrategy updateStrategy)
      The UpdateStrategy determines if the entity will be changed or replaced.