@NotThreadSafe public static final class ConditionCheck.Builder extends Object
A valid builder must define both a Key
and an Expression
.
Modifier and Type | Method and Description |
---|---|
<T> ConditionCheck<T> |
build() |
ConditionCheck.Builder |
conditionExpression(Expression conditionExpression)
Defines a logical expression on the attributes of table items that match the supplied primary key value(s).
|
ConditionCheck.Builder |
key(Consumer<Key.Builder> keyConsumer)
Sets the primary
Key that will be used together with the condition expression
on the builder by accepting a consumer of Key.Builder . |
ConditionCheck.Builder |
key(Key key)
Sets the primary
Key that will be used together with the condition expression. |
ConditionCheck.Builder |
returnValuesOnConditionCheckFailure(ReturnValuesOnConditionCheckFailure returnValuesOnConditionCheckFailure)
Use
ReturnValuesOnConditionCheckFailure to get the item attributes if the ConditionCheck
condition fails. |
ConditionCheck.Builder |
returnValuesOnConditionCheckFailure(String returnValuesOnConditionCheckFailure)
Use
ReturnValuesOnConditionCheckFailure to get the item attributes if the ConditionCheck
condition fails. |
public ConditionCheck.Builder key(Key key)
Key
that will be used together with the condition expression.key
- the primary key to use in the operation.public ConditionCheck.Builder key(Consumer<Key.Builder> keyConsumer)
Key
that will be used together with the condition expression
on the builder by accepting a consumer of Key.Builder
.public ConditionCheck.Builder conditionExpression(Expression conditionExpression)
See Expression
for condition syntax and examples.
conditionExpression
- a condition written as an Expression
public ConditionCheck.Builder returnValuesOnConditionCheckFailure(ReturnValuesOnConditionCheckFailure returnValuesOnConditionCheckFailure)
ReturnValuesOnConditionCheckFailure
to get the item attributes if the ConditionCheck
condition fails. For ReturnValuesOnConditionCheckFailure
, the valid values are: NONE and
ALL_OLD.returnValuesOnConditionCheckFailure
- What values to return on condition check failure.public ConditionCheck.Builder returnValuesOnConditionCheckFailure(String returnValuesOnConditionCheckFailure)
ReturnValuesOnConditionCheckFailure
to get the item attributes if the ConditionCheck
condition fails. For ReturnValuesOnConditionCheckFailure
, the valid values are: NONE and
ALL_OLD.returnValuesOnConditionCheckFailure
- What values to return on condition check failure.public <T> ConditionCheck<T> build()
Copyright © 2022. All rights reserved.