Class ConditionCheck.Builder
java.lang.Object
software.amazon.awssdk.enhanced.dynamodb.model.ConditionCheck.Builder
- Enclosing class:
ConditionCheck<T>
A builder that is used to create a condition check with the desired parameters.
A valid builder must define both a Key
and an Expression
.
-
Method Summary
Modifier and TypeMethodDescription<T> ConditionCheck
<T> build()
conditionExpression
(Expression conditionExpression) Defines a logical expression on the attributes of table items that match the supplied primary key value(s).key
(Consumer<Key.Builder> keyConsumer) Sets the primaryKey
that will be used together with the condition expression on the builder by accepting a consumer ofKey.Builder
.Sets the primaryKey
that will be used together with the condition expression.returnValuesOnConditionCheckFailure
(String returnValuesOnConditionCheckFailure) UseReturnValuesOnConditionCheckFailure
to get the item attributes if theConditionCheck
condition fails.returnValuesOnConditionCheckFailure
(ReturnValuesOnConditionCheckFailure returnValuesOnConditionCheckFailure) UseReturnValuesOnConditionCheckFailure
to get the item attributes if theConditionCheck
condition fails.
-
Method Details
-
key
Sets the primaryKey
that will be used together with the condition expression.- Parameters:
key
- the primary key to use in the operation.- Returns:
- a builder of this type
-
key
Sets the primaryKey
that will be used together with the condition expression on the builder by accepting a consumer ofKey.Builder
. -
conditionExpression
Defines a logical expression on the attributes of table items that match the supplied primary key value(s). If the expression evaluates to true, the transaction operation succeeds. If the expression evaluates to false, the transaction will not succeed.See
Expression
for condition syntax and examples.- Parameters:
conditionExpression
- a condition written as anExpression
- Returns:
- a builder of this type
-
returnValuesOnConditionCheckFailure
public ConditionCheck.Builder returnValuesOnConditionCheckFailure(ReturnValuesOnConditionCheckFailure returnValuesOnConditionCheckFailure) UseReturnValuesOnConditionCheckFailure
to get the item attributes if theConditionCheck
condition fails. ForReturnValuesOnConditionCheckFailure
, the valid values are: NONE and ALL_OLD.- Parameters:
returnValuesOnConditionCheckFailure
- What values to return on condition check failure.- Returns:
- a builder of this type
-
returnValuesOnConditionCheckFailure
public ConditionCheck.Builder returnValuesOnConditionCheckFailure(String returnValuesOnConditionCheckFailure) UseReturnValuesOnConditionCheckFailure
to get the item attributes if theConditionCheck
condition fails. ForReturnValuesOnConditionCheckFailure
, the valid values are: NONE and ALL_OLD.- Parameters:
returnValuesOnConditionCheckFailure
- What values to return on condition check failure.- Returns:
- a builder of this type
-
build
-