Class DeleteRequest
- java.lang.Object
-
- com.amazonaws.services.dynamodbv2.model.DeleteRequest
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class DeleteRequest extends Object implements Serializable, Cloneable
Represents a request to perform a DeleteItem operation on an item.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DeleteRequest()
Default constructor for DeleteRequest object.DeleteRequest(Map<String,AttributeValue> key)
Constructs a new DeleteRequest object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeleteRequest
addKeyEntry(String key, AttributeValue value)
DeleteRequest
clearKeyEntries()
Removes all the entries added into Key.DeleteRequest
clone()
boolean
equals(Object obj)
Map<String,AttributeValue>
getKey()
A map of attribute name to attribute values, representing the primary key of the item to delete.int
hashCode()
void
setKey(Map.Entry<String,AttributeValue> hashKey, Map.Entry<String,AttributeValue> rangeKey)
Set the hash and range key attributes of the item.void
setKey(Map<String,AttributeValue> key)
A map of attribute name to attribute values, representing the primary key of the item to delete.String
toString()
Returns a string representation of this object; useful for testing and debugging.DeleteRequest
withKey(Map.Entry<String,AttributeValue> hashKey, Map.Entry<String,AttributeValue> rangeKey)
Set the hash and range key attributes of the item.DeleteRequest
withKey(Map<String,AttributeValue> key)
A map of attribute name to attribute values, representing the primary key of the item to delete.
-
-
-
Constructor Detail
-
DeleteRequest
public DeleteRequest()
Default constructor for DeleteRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
-
DeleteRequest
public DeleteRequest(Map<String,AttributeValue> key)
Constructs a new DeleteRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
key
- A map of attribute name to attribute values, representing the primary key of the item to delete. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema.
-
-
Method Detail
-
getKey
public Map<String,AttributeValue> getKey()
A map of attribute name to attribute values, representing the primary key of the item to delete. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema.
- Returns:
- A map of attribute name to attribute values, representing the primary key of the item to delete. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema.
-
setKey
public void setKey(Map<String,AttributeValue> key)
A map of attribute name to attribute values, representing the primary key of the item to delete. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema.
- Parameters:
key
- A map of attribute name to attribute values, representing the primary key of the item to delete. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema.
-
withKey
public DeleteRequest withKey(Map<String,AttributeValue> key)
A map of attribute name to attribute values, representing the primary key of the item to delete. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema.
- Parameters:
key
- A map of attribute name to attribute values, representing the primary key of the item to delete. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
addKeyEntry
public DeleteRequest addKeyEntry(String key, AttributeValue value)
-
clearKeyEntries
public DeleteRequest clearKeyEntries()
Removes all the entries added into Key. <p> Returns a reference to this object so that method calls can be chained together.
-
setKey
public void setKey(Map.Entry<String,AttributeValue> hashKey, Map.Entry<String,AttributeValue> rangeKey) throws IllegalArgumentException
Set the hash and range key attributes of the item.For a hash-only table, you only need to provide the hash attribute. For a hash-and-range table, you must provide both.
- Parameters:
hashKey
- a map entry including the name and value of the primary hash key.rangeKey
- a map entry including the name and value of the primary range key, or null if it is a hash-only table.- Throws:
IllegalArgumentException
-
withKey
public DeleteRequest withKey(Map.Entry<String,AttributeValue> hashKey, Map.Entry<String,AttributeValue> rangeKey) throws IllegalArgumentException
Set the hash and range key attributes of the item.For a hash-only table, you only need to provide the hash attribute. For a hash-and-range table, you must provide both.
Returns a reference to this object so that method calls can be chained together.
- Parameters:
hashKey
- a map entry including the name and value of the primary hash key.rangeKey
- a map entry including the name and value of the primary range key, or null if it is a hash-only table.- Throws:
IllegalArgumentException
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public DeleteRequest clone()
-
-