Enum Class ETagSubmissionStrategy

java.lang.Object
java.lang.Enum<ETagSubmissionStrategy>
com.sap.cloud.sdk.datamodel.odata.client.request.ETagSubmissionStrategy
All Implemented Interfaces:
Serializable, Comparable<ETagSubmissionStrategy>, Constable

public enum ETagSubmissionStrategy extends Enum<ETagSubmissionStrategy>
Strategy options for sending IF-MATCH headers.
  • Enum Constant Details

    • SUBMIT_ETAG_FROM_ENTITY

      public static final ETagSubmissionStrategy SUBMIT_ETAG_FROM_ENTITY
      Send an IF-MATCH header, if and only if a version identifier is defined on an VdmEntity.
    • SUBMIT_NO_ETAG

      public static final ETagSubmissionStrategy SUBMIT_NO_ETAG
      Do not send any IF-MATCH header.
    • SUBMIT_ANY_MATCH_ETAG

      public static final ETagSubmissionStrategy SUBMIT_ANY_MATCH_ETAG
      Send a wildcard (*) in the IF-MATCH header matching all version identifiers. This is essentially a force overwrite.
  • Method Details

    • values

      public static ETagSubmissionStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ETagSubmissionStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getHeaderFromVersionIdentifier

      @Nullable public String getHeaderFromVersionIdentifier(@Nonnull io.vavr.control.Option<String> maybeVersionIdentifier)
      Returns the value of the IF-MATCH header to be sent based on the given maybeVersionIdentifier.
      Parameters:
      maybeVersionIdentifier - The version identifier to be sent in the IF-MATCH header.
      Returns:
      The value of the IF-MATCH header to be sent, or null if no header should be sent.