com.baidubce.services.moladb.model
Class PutRequest

java.lang.Object
  extended by com.baidubce.services.moladb.model.PutRequest
All Implemented Interfaces:
WriteRequest

public class PutRequest
extends Object
implements WriteRequest

Represents the input to perform a PutItem operation on an item.


Constructor Summary
PutRequest()
          Constructs a new PutRequest object.
 
Method Summary
 Map<String,AttributeValue> getItem()
          Get an item from this request.
protected  Map<String,Object> marshaller(Map<String,AttributeValue> item)
           
 void setItem(Map<String,AttributeValue> item)
          Set an item information with a put item request.
protected  Map<String,Object> toJsonObj()
           
 String toString()
          Return a string representation of the object.
 PutRequest withItem(Map<String,AttributeValue> item)
          Set an item information with a put item request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PutRequest

public PutRequest()
Constructs a new PutRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Method Detail

getItem

public Map<String,AttributeValue> getItem()
Get an item from this request.

Returns:
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.

Parameters:
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.

Parameters:
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:
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.

Specified by:
toString in interface WriteRequest
Overrides:
toString in class Object
Returns:
A string representation of the object.

toJsonObj

protected Map<String,Object> toJsonObj()

marshaller

protected Map<String,Object> marshaller(Map<String,AttributeValue> item)


Copyright © 2018. All rights reserved.