Class ConditionCheck.Builder

  • Enclosing class:
    ConditionCheck<T>

    @NotThreadSafe
    public static final class ConditionCheck.Builder
    extends Object
    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 Detail

      • key

        public ConditionCheck.Builder key​(Key key)
        Sets the primary Key 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
      • conditionExpression

        public ConditionCheck.Builder conditionExpression​(Expression 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 an Expression
        Returns:
        a builder of this type
      • returnValuesOnConditionCheckFailure

        public ConditionCheck.Builder returnValuesOnConditionCheckFailure​(ReturnValuesOnConditionCheckFailure returnValuesOnConditionCheckFailure)
        Use ReturnValuesOnConditionCheckFailure to get the item attributes if the ConditionCheck condition fails. For ReturnValuesOnConditionCheckFailure, 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)
        Use ReturnValuesOnConditionCheckFailure to get the item attributes if the ConditionCheck condition fails. For ReturnValuesOnConditionCheckFailure, the valid values are: NONE and ALL_OLD.
        Parameters:
        returnValuesOnConditionCheckFailure - What values to return on condition check failure.
        Returns:
        a builder of this type