Example usage for Java com.amazonaws.services.dynamodbv2.document Item fields, constructors, methods, implement or subclass
The text is from its open source code.
Map | attributes |
Map | asMap() Returns all attributes of the current item as a map. |
Item | fromJSON(String json) Convenient factory method - instantiates an Item from the given JSON string. |
Item | fromMap(Map Convenient factory method - instantiates an Item from the given map. |
Object | get(String attrName) Returns the value of the specified attribute in the current item as an object; or null if the attribute either doesn't exist or the attribute value is null. |
byte[] | getBinary(String attrName) Returns the value of the specified attribute in the current item as a byte array; or null if the attribute either doesn't exist or the attribute value is null. |
boolean | getBoolean(String attrName) Returns the value of the specified attribute in the current item as a primitive boolean. |
int | getInt(String attrName) Returns the value of the specified attribute in the current item as an int . |
String | getJSON(String attrName) Returns the value of the specified attribute in the current item as a JSON string; or null if the attribute either doesn't exist or the attribute value is null. |
List | getList(String attrName) Returns the value of the specified attribute in the current item as a set of T 's.; or null if the attribute either doesn't exist or the attribute value is null. |
long | getLong(String attrName) Returns the value of the specified attribute in the current item as an long . |
Map | getMap(String attrName) Returns the value of the specified attribute in the current item as a map of string-to- T 's; or null if the attribute either doesn't exist or the attribute value is null. |
BigDecimal | getNumber(String attrName) Returns the value of the specified attribute in the current item as a BigDecimal ; or null if the attribute either doesn't exist or the attribute value is null. |
Map | getRawMap(String attrName) Convenient method to return the value of the specified attribute in the current item as a map of string-to- Object 's; or null if the attribute either doesn't exist or the attribute value is null. |
String | getString(String attrName) Returns the value of the specified attribute in the current item as a string; or null if the attribute either doesn't exist or the attribute value is null. |
Set | getStringSet(String attrName) Returns the value of the specified attribute in the current item as a set of strings; or null if the attribute either doesn't exist or the attribute value is null. |
boolean | hasAttribute(String attrName) Returns true if this item has the specified attribute; false otherwise. |
boolean | isNull(String attrName) Returns true if the specified attribute exists with a null value; false otherwise. |
boolean | isPresent(String attrName) Returns true if this item contains the specified attribute; false otherwise. |
String | toJSON() Returns this item as a JSON string. |
String | toJSONPretty() Returns this item as a pretty JSON string. |
Item | withBinary(String attrName, byte[] val) Sets the value of the specified attribute in the current item to the given value. |
Item | withBinary(String attrName, ByteBuffer val) Sets the value of the specified attribute in the current item to the given value. |
Item | withInt(String attrName, int val) Sets the value of the specified attribute in the current item to the given value. |
Item | withJSON(String attrName, String json) Sets the value of the specified attribute in the current item to the given JSON document in the form of a string. |
Item | withLong(String attrName, long val) Sets the value of the specified attribute in the current item to the given value. |
Item | withMap(String attrName, Map Sets the value of the specified attribute in the current item to the given value. |
Item | withPrimaryKey(String hashKeyName, Object hashKeyValue) Convenient method to set the attributes of this item from the given hash-only primary key name and value. |
Item | withString(String attrName, String val) Sets the value of the specified attribute in the current item to the given string value. |