Class ConditionCheck<T>
- java.lang.Object
-
- software.amazon.awssdk.enhanced.dynamodb.model.ConditionCheck<T>
-
- Type Parameters:
T- The type of the modelled object.
- All Implemented Interfaces:
TransactableWriteOperation<T>
@ThreadSafe public final class ConditionCheck<T> extends Object implements TransactableWriteOperation<T>
Use ConditionCheck as a part of the composite operation transactGetItems (for exampleDynamoDbEnhancedClient.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
Nested Classes Modifier and Type Class Description static classConditionCheck.BuilderA builder that is used to create a condition check with the desired parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConditionCheck.Builderbuilder()Creates a newly initialized builder for this object.ExpressionconditionExpression()Returns the conditionExpressionset on this object, or null if it doesn't exist.booleanequals(Object o)TransactWriteItemgenerateTransactWriteItem(TableSchema<T> tableSchema, OperationContext operationContext, DynamoDbEnhancedClientExtension dynamoDbEnhancedClientExtension)inthashCode()Keykey()Returns the primaryKeythat the condition is valid for, or null if it doesn't exist.ReturnValuesOnConditionCheckFailurereturnValuesOnConditionCheckFailure()Returns what values to return if the condition check fails.StringreturnValuesOnConditionCheckFailureAsString()Returns what values to return if the condition check fails.ConditionCheck.BuildertoBuilder()Returns a builder initialized with all existing values on the object.
-
-
-
Method Detail
-
builder
public static ConditionCheck.Builder builder()
Creates a newly initialized builder for this object.
-
toBuilder
public ConditionCheck.Builder toBuilder()
Returns a builder initialized with all existing values on the object.
-
key
public Key key()
Returns the primaryKeythat the condition is valid for, or null if it doesn't exist.
-
conditionExpression
public Expression conditionExpression()
Returns the conditionExpressionset on this object, or null if it doesn't exist.
-
returnValuesOnConditionCheckFailure
public ReturnValuesOnConditionCheckFailure 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,
returnValuesOnConditionCheckFailurewill 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
public String 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,
returnValuesOnConditionCheckFailurewill 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:
generateTransactWriteItemin interfaceTransactableWriteOperation<T>
-
-