T
- The type of the modelled object.@ThreadSafe public final class ConditionCheck<T> extends Object implements TransactableWriteOperation<T>
DynamoDbEnhancedClient.transactGetItems(TransactGetItemsEnhancedRequest)
) to determine
if the other actions that are part of the same transaction should take effect.
A valid ConditionCheck object should contain a reference to the primary key of the table that finds items with a matching key,
together with a condition (of type Expression
) to evaluate the primary key.
Modifier and Type | Class and Description |
---|---|
static class |
ConditionCheck.Builder
A builder that is used to create a condition check with the desired parameters.
|
Modifier and Type | Method and Description |
---|---|
static ConditionCheck.Builder |
builder()
Creates a newly initialized builder for this object.
|
Expression |
conditionExpression()
Returns the condition
Expression set on this object, or null if it doesn't exist. |
boolean |
equals(Object o) |
TransactWriteItem |
generateTransactWriteItem(TableSchema<T> tableSchema,
OperationContext operationContext,
DynamoDbEnhancedClientExtension dynamoDbEnhancedClientExtension) |
int |
hashCode() |
Key |
key()
Returns the primary
Key that the condition is valid for, or null if it doesn't exist. |
ReturnValuesOnConditionCheckFailure |
returnValuesOnConditionCheckFailure()
Returns what values to return if the condition check fails.
|
String |
returnValuesOnConditionCheckFailureAsString()
Returns what values to return if the condition check fails.
|
ConditionCheck.Builder |
toBuilder()
Returns a builder initialized with all existing values on the object.
|
public static ConditionCheck.Builder builder()
public ConditionCheck.Builder toBuilder()
public Key key()
Key
that the condition is valid for, or null if it doesn't exist.public Expression conditionExpression()
Expression
set on this object, or null if it doesn't exist.public ReturnValuesOnConditionCheckFailure returnValuesOnConditionCheckFailure()
If the service returns an enum value that is not available in the current SDK version,
returnValuesOnConditionCheckFailure
will return
ReturnValuesOnConditionCheckFailure.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is
available from returnValuesOnConditionCheckFailureAsString()
.
public String returnValuesOnConditionCheckFailureAsString()
If the service returns an enum value that is not available in the current SDK version,
returnValuesOnConditionCheckFailure
will return
ReturnValuesOnConditionCheckFailure.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is
available from returnValuesOnConditionCheckFailureAsString()
.
public TransactWriteItem generateTransactWriteItem(TableSchema<T> tableSchema, OperationContext operationContext, DynamoDbEnhancedClientExtension dynamoDbEnhancedClientExtension)
generateTransactWriteItem
in interface TransactableWriteOperation<T>
Copyright © 2022. All rights reserved.