类 PutItemRequest
- java.lang.Object
-
- com.baidubce.model.AbstractBceRequest
-
- com.baidubce.services.moladb.model.PutItemRequest
-
public class PutItemRequest extends AbstractBceRequest
Represents the input of a PutItem operation.
-
-
构造器概要
构造器 构造器 说明 PutItemRequest()Constructs a new PutItemRequest object.PutItemRequest(String name)Constructs a new PutItemRequest object.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Map<String,AttributeValue>getItem()Get the Item objects to be put in in table.StringgetTableName()Get the name of the table to contain the item.protected Map<String,Object>marshallerItem(Map<String,AttributeValue> item)voidsetItem(Map<String,AttributeValue> item)Set the Item object to be put in in table.voidsetTableName(String tableName)Set the name of the table to contain the item.StringtoString()Return a string representation of request information.PutItemRequestwithItem(Map<String,AttributeValue> item)Set the Item object to be put in in table.PutItemRequestwithRequestCredentials(BceCredentials credentials)PutItemRequestwithTableName(String tableName)Set the name of the table to contain the item.-
从类继承的方法 com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
-
-
-
-
构造器详细资料
-
PutItemRequest
public PutItemRequest()
Constructs a new PutItemRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
-
PutItemRequest
public PutItemRequest(String name)
Constructs a new PutItemRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- 参数:
name- The name of the table to contain the item.
-
-
方法详细资料
-
getTableName
public String getTableName()
Get the name of the table to contain the item.Constraints:
Length: 3 - 32
Pattern: [a-zA-Z0-9_.-]+- 返回:
- The name of the table to contain the item.
-
setTableName
public void setTableName(String tableName)
Set the name of the table to contain the item.Constraints:
Length: 3 - 32
Pattern: [a-zA-Z0-9_.-]+- 参数:
tableName- The name of the table to contain the item.
-
withTableName
public PutItemRequest withTableName(String tableName)
Set the name of the table to contain the item.Constraints:
Length: 3 - 32
Pattern: [a-zA-Z0-9_.-]+- 参数:
tableName- The name of the table to contain the item.- 返回:
- Returns a reference to the object so that method calls can be chained together.
-
withItem
public PutItemRequest withItem(Map<String,AttributeValue> item)
Set the Item object to be put in in table. Returns a reference to this object so that method calls can be chained together.- 参数:
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.
- 返回:
- A reference to this updated object so that method calls can be chained together.
-
setItem
public void setItem(Map<String,AttributeValue> item)
Set the Item object to be put in in table.- 参数:
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.
-
getItem
public Map<String,AttributeValue> getItem()
Get the Item objects to be put in in table.- 返回:
- An map container of attribute name/value pairs.
-
toString
public String toString()
Return a string representation of request information.
-
withRequestCredentials
public PutItemRequest withRequestCredentials(BceCredentials credentials)
- 指定者:
withRequestCredentials在类中AbstractBceRequest
-
-