类 PutRequest

  • 所有已实现的接口:
    WriteRequest

    public class PutRequest
    extends Object
    implements WriteRequest
    Represents the input to perform a PutItem operation on an item.
    • 构造器详细资料

      • PutRequest

        public PutRequest()
        Constructs a new PutRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
    • 方法详细资料

      • getItem

        public Map<String,​AttributeValue> getItem()
        Get an item from this request.
        返回:
        A map container of attribute name/value pairs.
      • setItem

        public void setItem​(Map<String,​AttributeValue> item)
        Set an item information with a put item request.
        参数:
        item - An container of attribute name/value pairs. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item.

        You must provide all of the attributes for the primary key. For example, with a hash type primary key, you only need to provide the hash attribute. For a hash-and-range type primary key, you must provide both the hash attribute and the range attribute.

        If you specify any attributes that are part of an key, then the data types for those attributes must match those of the schema in the table's attribute definition.

      • withItem

        public PutRequest withItem​(Map<String,​AttributeValue> item)
        Set an item information with a put item request.
        参数:
        item - An container of attribute name/value pairs. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item.

        You must provide all of the attributes for the primary key. For example, with a hash type primary key, you only need to provide the hash attribute. For a hash-and-range type primary key, you must provide both the hash attribute and the range attribute.

        If you specify any attributes that are part of an key, then the data types for those attributes must match those of the schema in the table's attribute definition.

        返回:
        Returns a reference to this object so that method calls can be chained together.
      • toString

        public String toString()
        Return a string representation of the object.
        指定者:
        toString 在接口中 WriteRequest
        覆盖:
        toString 在类中 Object
        返回:
        A string representation of the object.