Class ConditionCheck<T>
- Type Parameters:
T
- The type of the modelled object.
- All Implemented Interfaces:
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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A builder that is used to create a condition check with the desired parameters. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConditionCheck.Builder
builder()
Creates a newly initialized builder for this object.Returns the conditionExpression
set on this object, or null if it doesn't exist.boolean
generateTransactWriteItem
(TableSchema<T> tableSchema, OperationContext operationContext, DynamoDbEnhancedClientExtension dynamoDbEnhancedClientExtension) int
hashCode()
key()
Returns the primaryKey
that the condition is valid for, or null if it doesn't exist.Returns what values to return if the condition check fails.Returns what values to return if the condition check fails.Returns a builder initialized with all existing values on the object.
-
Method Details
-
builder
Creates a newly initialized builder for this object. -
toBuilder
Returns a builder initialized with all existing values on the object. -
equals
-
hashCode
public int hashCode() -
key
Returns the primaryKey
that the condition is valid for, or null if it doesn't exist. -
conditionExpression
Returns the conditionExpression
set on this object, or null if it doesn't exist. -
returnValuesOnConditionCheckFailure
Returns what values to return if the condition check fails.If the service returns an enum value that is not available in the current SDK version,
returnValuesOnConditionCheckFailure
will returnReturnValuesOnConditionCheckFailure.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromreturnValuesOnConditionCheckFailureAsString()
.- Returns:
- What values to return on condition check failure.
-
returnValuesOnConditionCheckFailureAsString
Returns what values to return if the condition check fails.If the service returns an enum value that is not available in the current SDK version,
returnValuesOnConditionCheckFailure
will returnReturnValuesOnConditionCheckFailure.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromreturnValuesOnConditionCheckFailureAsString()
.- Returns:
- What values to return on condition check failure.
-
generateTransactWriteItem
public TransactWriteItem generateTransactWriteItem(TableSchema<T> tableSchema, OperationContext operationContext, DynamoDbEnhancedClientExtension dynamoDbEnhancedClientExtension) - Specified by:
generateTransactWriteItem
in interfaceTransactableWriteOperation<T>
-