com.amazonaws.services.dynamodbv2.model
Class PutRequest

java.lang.Object
  extended by com.amazonaws.services.dynamodbv2.model.PutRequest
All Implemented Interfaces:
java.io.Serializable

public class PutRequest
extends java.lang.Object
implements java.io.Serializable

Represents a request to perform a PutItem operation on an item.

See Also:
Serialized Form

Constructor Summary
PutRequest()
          Default constructor for a new PutRequest object.
PutRequest(java.util.Map<java.lang.String,AttributeValue> item)
          Constructs a new PutRequest object.
 
Method Summary
 PutRequest addItemEntry(java.lang.String key, AttributeValue value)
          A map of attribute name to attribute values, representing the primary key of an item to be processed by PutItem.
 PutRequest clearItemEntries()
          Removes all the entries added into Item.
 boolean equals(java.lang.Object obj)
           
 java.util.Map<java.lang.String,AttributeValue> getItem()
          A map of attribute name to attribute values, representing the primary key of an item to be processed by PutItem.
 int hashCode()
           
 void setItem(java.util.Map<java.lang.String,AttributeValue> item)
          A map of attribute name to attribute values, representing the primary key of an item to be processed by PutItem.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 PutRequest withItem(java.util.Map<java.lang.String,AttributeValue> item)
          A map of attribute name to attribute values, representing the primary key of an item to be processed by PutItem.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PutRequest

public PutRequest()
Default constructor for a new PutRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


PutRequest

public PutRequest(java.util.Map<java.lang.String,AttributeValue> item)
Constructs a new PutRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
item - A map of attribute name to attribute values, representing the primary key of an item to be processed by PutItem. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item which are part of an index key schema for the table, their types must match the index key schema.
Method Detail

getItem

public java.util.Map<java.lang.String,AttributeValue> getItem()
A map of attribute name to attribute values, representing the primary key of an item to be processed by PutItem. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item which are part of an index key schema for the table, their types must match the index key schema.

Returns:
A map of attribute name to attribute values, representing the primary key of an item to be processed by PutItem. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item which are part of an index key schema for the table, their types must match the index key schema.

setItem

public void setItem(java.util.Map<java.lang.String,AttributeValue> item)
A map of attribute name to attribute values, representing the primary key of an item to be processed by PutItem. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item which are part of an index key schema for the table, their types must match the index key schema.

Parameters:
item - A map of attribute name to attribute values, representing the primary key of an item to be processed by PutItem. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item which are part of an index key schema for the table, their types must match the index key schema.

withItem

public PutRequest withItem(java.util.Map<java.lang.String,AttributeValue> item)
A map of attribute name to attribute values, representing the primary key of an item to be processed by PutItem. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item which are part of an index key schema for the table, their types must match the index key schema.

Returns a reference to this object so that method calls can be chained together.

Parameters:
item - A map of attribute name to attribute values, representing the primary key of an item to be processed by PutItem. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item which are part of an index key schema for the table, their types must match the index key schema.
Returns:
A reference to this updated object so that method calls can be chained together.

addItemEntry

public PutRequest addItemEntry(java.lang.String key,
                               AttributeValue value)
A map of attribute name to attribute values, representing the primary key of an item to be processed by PutItem. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item which are part of an index key schema for the table, their types must match the index key schema.

The method adds a new key-value pair into Item parameter, and returns a reference to this object so that method calls can be chained together.

Parameters:
key - The key of the entry to be added into Item.
value - The corresponding value of the entry to be added into Item.

clearItemEntries

public PutRequest clearItemEntries()
Removes all the entries added into Item.

Returns a reference to this object so that method calls can be chained together.


toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.