类 PutRequest
- java.lang.Object
-
- com.baidubce.services.moladb.model.PutRequest
-
- 所有已实现的接口:
WriteRequest
public class PutRequest extends Object implements WriteRequest
Represents the input to perform a PutItem operation on an item.
-
-
构造器概要
构造器 构造器 说明 PutRequest()Constructs a new PutRequest object.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Map<String,AttributeValue>getItem()Get an item from this request.protected Map<String,Object>marshaller(Map<String,AttributeValue> item)voidsetItem(Map<String,AttributeValue> item)Set an item information with a put item request.protected Map<String,Object>toJsonObj()StringtoString()Return a string representation of the object.PutRequestwithItem(Map<String,AttributeValue> item)Set an item information with a put item request.
-
-
-
方法详细资料
-
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.
-
-