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.
-
-
Constructor Summary
Constructors Constructor Description DynamoDBDeleteExpression()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamoDBDeleteExpression
addExpressionAttributeNamesEntry(String key, String value)
One or more substitution variables for simplifying complex expressions.DynamoDBDeleteExpression
addExpressionAttributeValuesEntry(String key, AttributeValue value)
One or more values that can be substituted in an expression.DynamoDBDeleteExpression
clearExpressionAttributeNamesEntries()
Removes all the entries added into ExpressionAttributeNames.DynamoDBDeleteExpression
clearExpressionAttributeValuesEntries()
Removes all the entries added into ExpressionAttributeValues.String
getConditionalOperator()
Returns the logical operator on the expected attribute conditions of this delete operation.String
getConditionExpression()
A condition that must be satisfied in order for a conditional DeleteItem to succeed.Map<String,ExpectedAttributeValue>
getExpected()
Gets the map of attribute names to expected attribute values to check on delete.Map<String,String>
getExpressionAttributeNames()
One or more substitution variables for simplifying complex expressions.Map<String,AttributeValue>
getExpressionAttributeValues()
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.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.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.DynamoDBDeleteExpression
withConditionExpression(String conditionExpression)
A condition that must be satisfied in order for a conditional DeleteItem to succeed.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.DynamoDBDeleteExpression
withExpectedEntry(String attributeName, ExpectedAttributeValue expected)
Adds one entry to the expected conditions and returns a pointer to this object for method-chaining.DynamoDBDeleteExpression
withExpressionAttributeNames(Map<String,String> expressionAttributeNames)
One or more substitution variables for simplifying complex expressions.DynamoDBDeleteExpression
withExpressionAttributeValues(Map<String,AttributeValue> expressionAttributeValues)
One or more values that can be substituted in an expression.
-
-
-
Method Detail
-
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.
-
setConditionExpression
public void setConditionExpression(String conditionExpression)
A condition that must be satisfied in order for a conditional DeleteItem to succeed.- See Also:
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:
DeleteItemRequest.withConditionExpression(String)
-
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:
DeleteItemRequest.getExpressionAttributeNames()
-
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:
DeleteItemRequest.setExpressionAttributeNames(Map)
-
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:
DeleteItemRequest.withExpressionAttributeNames(Map)
-
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:
DeleteItemRequest.addExpressionAttributeNamesEntry(String, String)
-
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:
DeleteItemRequest.getExpressionAttributeValues()
-
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:
DeleteItemRequest.setExpressionAttributeValues(Map)
-
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:
DeleteItemRequest.withExpressionAttributeValues(Map)
-
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:
DeleteItemRequest.addExpressionAttributeValuesEntry(String, AttributeValue)
-
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.
-
-