Class DynamoDBDeleteExpression
java.lang.Object
com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBDeleteExpression
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExpressionAttributeNamesEntry
(String key, String value) One or more substitution variables for simplifying complex expressions.addExpressionAttributeValuesEntry
(String key, AttributeValue value) One or more values that can be substituted in an expression.Removes all the entries added into ExpressionAttributeNames.Removes all the entries added into ExpressionAttributeValues.Returns the logical operator on the expected attribute conditions of this delete operation.A condition that must be satisfied in order for a conditional DeleteItem to succeed.Gets the map of attribute names to expected attribute values to check on delete.One or more substitution variables for simplifying complex expressions.One or more values that can be substituted in an expression.void
setConditionalOperator
(ConditionalOperator conditionalOperator) Sets the logical operator on the expected attribute conditions of this delete operation.void
setConditionalOperator
(String conditionalOperator) Sets the logical operator on the expected attribute conditions of this delete operation.void
setConditionExpression
(String conditionExpression) A condition that must be satisfied in order for a conditional DeleteItem to succeed.void
setExpected
(Map<String, ExpectedAttributeValue> expectedAttributes) Sets the expected condition to the map of attribute names to expected attribute values given.void
setExpressionAttributeNames
(Map<String, String> expressionAttributeNames) One or more substitution variables for simplifying complex expressions.void
setExpressionAttributeValues
(Map<String, AttributeValue> expressionAttributeValues) One or more values that can be substituted in an expression.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.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.withConditionExpression
(String conditionExpression) A condition that must be satisfied in order for a conditional DeleteItem to succeed.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.withExpectedEntry
(String attributeName, ExpectedAttributeValue expected) Adds one entry to the expected conditions and returns a pointer to this object for method-chaining.withExpressionAttributeNames
(Map<String, String> expressionAttributeNames) One or more substitution variables for simplifying complex expressions.withExpressionAttributeValues
(Map<String, AttributeValue> expressionAttributeValues) One or more values that can be substituted in an expression.
-
Constructor Details
-
DynamoDBDeleteExpression
public DynamoDBDeleteExpression()
-
-
Method Details
-
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
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
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
Returns the logical operator on the expected attribute conditions of this delete operation. -
setConditionalOperator
Sets the logical operator on the expected attribute conditions of this delete operation. -
withConditionalOperator
Sets the logical operator on the expected attribute conditions of this delete operation and returns a pointer to this object for method-chaining. -
setConditionalOperator
Sets the logical operator on the expected attribute conditions of this delete operation. -
withConditionalOperator
Sets the logical operator on the expected attribute conditions of this delete operation and returns a pointer to this object for method-chaining. -
getConditionExpression
A condition that must be satisfied in order for a conditional DeleteItem to succeed.- See Also:
-
setConditionExpression
A condition that must be satisfied in order for a conditional DeleteItem to succeed.- See Also:
-
withConditionExpression
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
One or more substitution variables for simplifying complex expressions.- Returns:
- One or more substitution variables for simplifying complex expressions.
- See Also:
-
setExpressionAttributeNames
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
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
Removes all the entries added into ExpressionAttributeNames.Returns a reference to this object so that method calls can be chained together.
-
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
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
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
Removes all the entries added into ExpressionAttributeValues.Returns a reference to this object so that method calls can be chained together.
-