com.amazonaws.mobileconnectors.dynamodbv2.dynamodbmapper
Class DynamoDBDeleteExpression

java.lang.Object
  extended by com.amazonaws.mobileconnectors.dynamodbv2.dynamodbmapper.DynamoDBDeleteExpression

public class DynamoDBDeleteExpression
extends java.lang.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:
DynamoDBMapper.delete(Object, DynamoDBDeleteExpression)

Constructor Summary
DynamoDBDeleteExpression()
           
 
Method Summary
 DynamoDBDeleteExpression addExpressionAttributeNamesEntry(java.lang.String key, java.lang.String value)
          One or more substitution variables for simplifying complex expressions.
 DynamoDBDeleteExpression addExpressionAttributeValuesEntry(java.lang.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.
 java.lang.String getConditionalOperator()
          Returns the logical operator on the expected attribute conditions of this delete operation.
 java.lang.String getConditionExpression()
          A condition that must be satisfied in order for a conditional DeleteItem to succeed.
 java.util.Map<java.lang.String,ExpectedAttributeValue> getExpected()
          Gets the map of attribute names to expected attribute values to check on delete.
 java.util.Map<java.lang.String,java.lang.String> getExpressionAttributeNames()
          One or more substitution variables for simplifying complex expressions.
 java.util.Map<java.lang.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(java.lang.String conditionalOperator)
          Sets the logical operator on the expected attribute conditions of this delete operation.
 void setConditionExpression(java.lang.String conditionExpression)
          A condition that must be satisfied in order for a conditional DeleteItem to succeed.
 void setExpected(java.util.Map<java.lang.String,ExpectedAttributeValue> expectedAttributes)
          Sets the expected condition to the map of attribute names to expected attribute values given.
 void setExpressionAttributeNames(java.util.Map<java.lang.String,java.lang.String> expressionAttributeNames)
          One or more substitution variables for simplifying complex expressions.
 void setExpressionAttributeValues(java.util.Map<java.lang.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(java.lang.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(java.lang.String conditionExpression)
          A condition that must be satisfied in order for a conditional DeleteItem to succeed.
 DynamoDBDeleteExpression withExpected(java.util.Map<java.lang.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(java.lang.String attributeName, ExpectedAttributeValue expected)
          Adds one entry to the expected conditions and returns a pointer to this object for method-chaining.
 DynamoDBDeleteExpression withExpressionAttributeNames(java.util.Map<java.lang.String,java.lang.String> expressionAttributeNames)
          One or more substitution variables for simplifying complex expressions.
 DynamoDBDeleteExpression withExpressionAttributeValues(java.util.Map<java.lang.String,AttributeValue> expressionAttributeValues)
          One or more values that can be substituted in an expression.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamoDBDeleteExpression

public DynamoDBDeleteExpression()
Method Detail

getExpected

public java.util.Map<java.lang.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(java.util.Map<java.lang.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(java.util.Map<java.lang.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(java.lang.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 java.lang.String getConditionalOperator()
Returns the logical operator on the expected attribute conditions of this delete operation.


setConditionalOperator

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


withConditionalOperator

public DynamoDBDeleteExpression withConditionalOperator(java.lang.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 java.lang.String getConditionExpression()
A condition that must be satisfied in order for a conditional DeleteItem to succeed.

See Also:
DeleteItemRequest.getConditionExpression()

setConditionExpression

public void setConditionExpression(java.lang.String conditionExpression)
A condition that must be satisfied in order for a conditional DeleteItem to succeed.

See Also:
DeleteItemRequest#setConditionExpression()

withConditionExpression

public DynamoDBDeleteExpression withConditionExpression(java.lang.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 java.util.Map<java.lang.String,java.lang.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(java.util.Map<java.lang.String,java.lang.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(java.util.Map<java.lang.String,java.lang.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(java.lang.String key,
                                                                 java.lang.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 java.util.Map<java.lang.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(java.util.Map<java.lang.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(java.util.Map<java.lang.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(java.lang.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.



Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.