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:
  • 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

      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 Details

    • 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

      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 class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public DeleteRequest clone()
      Overrides:
      clone in class Object