Class DeleteRequest
- All Implemented Interfaces:
Serializable
,Cloneable
Represents a request to perform a DeleteItem operation on an item.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for DeleteRequest object.DeleteRequest
(Map<String, AttributeValue> key) Constructs a new DeleteRequest object. -
Method Summary
Modifier and TypeMethodDescriptionaddKeyEntry
(String key, AttributeValue value) Removes all the entries added into Key.clone()
boolean
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.toString()
Returns a string representation of this object; useful for testing and debugging.withKey
(Map.Entry<String, AttributeValue> hashKey, Map.Entry<String, AttributeValue> rangeKey) Set the hash and range key attributes of the item.withKey
(Map<String, AttributeValue> key) A map of attribute name to attribute values, representing the primary key of the item to delete.
-
Constructor Details
-
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
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 Details
-
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
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
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
-
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, throws IllegalArgumentExceptionAttributeValue> rangeKey) 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, throws IllegalArgumentExceptionAttributeValue> rangeKey) 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
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-