Class DeleteRequest

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

        public int hashCode()
        Overrides:
        hashCode in class Object