Class Items

java.lang.Object
com.codename1.backend.dynamo.Items

public final class Items extends Object

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 Details

    • toAttributes

      public static Map toAttributes(Map item)
      The attribute map of an item made of plain values.
    • toAttribute

      public static Map toAttribute(Object value)
      One plain value as an attribute value.
    • fromAttributes

      public static Map fromAttributes(Map attributes)
      The plain values of an attribute map; null for null.
    • fromAttribute

      public static Object fromAttribute(Map av)
      One attribute value as a plain value.