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
Strategy options for sending IF-MATCH headers.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSend a wildcard (*
) in the IF-MATCH header matching all version identifiers.Send an IF-MATCH header, if and only if a version identifier is defined on anVdmEntity
.Do not send any IF-MATCH header. -
Method Summary
Modifier and TypeMethodDescriptiongetHeaderFromVersionIdentifier
(io.vavr.control.Option<String> maybeVersionIdentifier) Returns the value of the IF-MATCH header to be sent based on the givenmaybeVersionIdentifier
.static ETagSubmissionStrategy
Returns the enum constant of this class with the specified name.static ETagSubmissionStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUBMIT_ETAG_FROM_ENTITY
Send an IF-MATCH header, if and only if a version identifier is defined on anVdmEntity
. -
SUBMIT_NO_ETAG
Do not send any IF-MATCH header. -
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
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
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 nameNullPointerException
- 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 givenmaybeVersionIdentifier
.- 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.
-