Class Items
java.lang.Object
com.codename1.backend.dynamo.Items
Converts between DynamoDB attribute values and plain Java values.
| Java | DynamoDB |
|---|---|
null |
NULL |
String |
S |
Number |
N |
Boolean |
BOOL |
byte[] |
B |
List |
L |
Map with string keys |
M |
Sets are read as lists (SS, NS and BS all decode to a List). A number
is read back as a Long when it is integral and fits, and as a Double
otherwise: a DynamoDB number has 38 digits of precision and this runtime has
no BigDecimal, so a caller that needs more than a double holds reads the
raw attribute map instead.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectfromAttribute(Map av) One attribute value as a plain value.static MapfromAttributes(Map attributes) The plain values of an attribute map; null for null.static MaptoAttribute(Object value) One plain value as an attribute value.static MaptoAttributes(Map item) The attribute map of an item made of plain values.
-
Method Details
-
toAttributes
-
toAttribute
-
fromAttributes
-
fromAttribute
-