Class DynamoDBDeleteExpression

java.lang.Object
com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBDeleteExpression

public class DynamoDBDeleteExpression extends Object
Enables adding options to a delete operation. For example, you may want to delete only if an attribute has a particular value.
See Also:
  • Constructor Details

    • DynamoDBDeleteExpression

      public DynamoDBDeleteExpression()
  • Method Details

    • getExpected

      public Map<String,ExpectedAttributeValue> getExpected()
      Gets the map of attribute names to expected attribute values to check on delete.
      Returns:
      The map of attribute names to expected attribute value conditions to check on delete
    • setExpected

      public void setExpected(Map<String,ExpectedAttributeValue> expectedAttributes)
      Sets the expected condition to the map of attribute names to expected attribute values given.
      Parameters:
      expectedAttributes - The map of attribute names to expected attribute value conditions to check on delete
    • withExpected

      public DynamoDBDeleteExpression withExpected(Map<String,ExpectedAttributeValue> expectedAttributes)
      Sets the expected condition to the map of attribute names to expected attribute values given and returns a pointer to this object for method-chaining.
      Parameters:
      expectedAttributes - The map of attribute names to expected attribute value conditions to check on delete
    • withExpectedEntry

      public DynamoDBDeleteExpression withExpectedEntry(String attributeName, ExpectedAttributeValue expected)
      Adds one entry to the expected conditions and returns a pointer to this object for method-chaining.
      Parameters:
      attributeName - The name of the attribute.
      expected - The expected attribute value.
    • getConditionalOperator

      public String getConditionalOperator()
      Returns the logical operator on the expected attribute conditions of this delete operation.
    • setConditionalOperator

      public void setConditionalOperator(String conditionalOperator)
      Sets the logical operator on the expected attribute conditions of this delete operation.
    • withConditionalOperator

      public DynamoDBDeleteExpression withConditionalOperator(String conditionalOperator)
      Sets the logical operator on the expected attribute conditions of this delete operation and returns a pointer to this object for method-chaining.
    • setConditionalOperator

      public void setConditionalOperator(ConditionalOperator conditionalOperator)
      Sets the logical operator on the expected attribute conditions of this delete operation.
    • withConditionalOperator

      public DynamoDBDeleteExpression withConditionalOperator(ConditionalOperator conditionalOperator)
      Sets the logical operator on the expected attribute conditions of this delete operation and returns a pointer to this object for method-chaining.
    • getConditionExpression

      public String getConditionExpression()
      A condition that must be satisfied in order for a conditional DeleteItem to succeed.
      See Also:
    • setConditionExpression

      public void setConditionExpression(String conditionExpression)
      A condition that must be satisfied in order for a conditional DeleteItem to succeed.
      See Also:
      • invalid reference
        DeleteItemRequest#setConditionExpression()
    • withConditionExpression

      public DynamoDBDeleteExpression withConditionExpression(String conditionExpression)
      A condition that must be satisfied in order for a conditional DeleteItem to succeed.
      Returns:
      A reference to this updated object so that method calls can be chained together.
      See Also:
    • getExpressionAttributeNames

      public Map<String,String> getExpressionAttributeNames()
      One or more substitution variables for simplifying complex expressions.
      Returns:
      One or more substitution variables for simplifying complex expressions.
      See Also:
    • setExpressionAttributeNames

      public void setExpressionAttributeNames(Map<String,String> expressionAttributeNames)
      One or more substitution variables for simplifying complex expressions.
      Parameters:
      expressionAttributeNames - One or more substitution variables for simplifying complex expressions.
      See Also:
    • withExpressionAttributeNames

      public DynamoDBDeleteExpression withExpressionAttributeNames(Map<String,String> expressionAttributeNames)
      One or more substitution variables for simplifying complex expressions.
      Parameters:
      expressionAttributeNames - One or more substitution variables for simplifying complex expressions.
      Returns:
      A reference to this updated object so that method calls can be chained together.
      See Also:
    • addExpressionAttributeNamesEntry

      public DynamoDBDeleteExpression addExpressionAttributeNamesEntry(String key, String value)
      One or more substitution variables for simplifying complex expressions. The method adds a new key-value pair into ExpressionAttributeNames parameter, and returns a reference to this object so that method calls can be chained together.
      Parameters:
      key - The key of the entry to be added into ExpressionAttributeNames.
      value - The corresponding value of the entry to be added into ExpressionAttributeNames.
      See Also:
    • clearExpressionAttributeNamesEntries

      public DynamoDBDeleteExpression clearExpressionAttributeNamesEntries()
      Removes all the entries added into ExpressionAttributeNames.

      Returns a reference to this object so that method calls can be chained together.

    • getExpressionAttributeValues

      public Map<String,AttributeValue> getExpressionAttributeValues()
      One or more values that can be substituted in an expression.
      Returns:
      One or more values that can be substituted in an expression.
      See Also:
    • setExpressionAttributeValues

      public void setExpressionAttributeValues(Map<String,AttributeValue> expressionAttributeValues)
      One or more values that can be substituted in an expression.
      Parameters:
      expressionAttributeValues - One or more values that can be substituted in an expression.
      See Also:
    • withExpressionAttributeValues

      public DynamoDBDeleteExpression withExpressionAttributeValues(Map<String,AttributeValue> expressionAttributeValues)
      One or more values that can be substituted in an expression.
      Parameters:
      expressionAttributeValues - One or more values that can be substituted in an expression.
      Returns:
      A reference to this updated object so that method calls can be chained together.
      See Also:
    • addExpressionAttributeValuesEntry

      public DynamoDBDeleteExpression addExpressionAttributeValuesEntry(String key, AttributeValue value)
      One or more values that can be substituted in an expression. The method adds a new key-value pair into ExpressionAttributeValues parameter, and returns a reference to this object so that method calls can be chained together.
      Parameters:
      key - The key of the entry to be added into ExpressionAttributeValues.
      value - The corresponding value of the entry to be added into ExpressionAttributeValues.
      See Also:
    • clearExpressionAttributeValuesEntries

      public DynamoDBDeleteExpression clearExpressionAttributeValuesEntries()
      Removes all the entries added into ExpressionAttributeValues.

      Returns a reference to this object so that method calls can be chained together.