com.amazonaws.mobileconnectors.dynamodbv2.dynamodbmapper
Class ConversionSchemas

java.lang.Object
  extended by com.amazonaws.mobileconnectors.dynamodbv2.dynamodbmapper.ConversionSchemas

public final class ConversionSchemas
extends java.lang.Object

Pre-defined strategies for mapping between Java types and DynamoDB types.


Field Summary
static ConversionSchema V1
          The V1 schema mapping, which retains strict backwards compatibility with the original DynamoDB data model.
static ConversionSchema V2
          The native V2 conversion schema.
static ConversionSchema V2_COMPATIBLE
          A V2 conversion schema which retains backwards compatibility with the V1 conversion schema for existing DynamoDB types, but adds the ability to marshall recursive structures using the new List and Map types.
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

V1

public static final ConversionSchema V1
The V1 schema mapping, which retains strict backwards compatibility with the original DynamoDB data model. In particular, it marshals Java Booleans as DynamoDB Numbers rather than the newer Boolean type, and does not support marshaling Lists or Maps. It can unmarshal values written in newer formats to ease migration.

Use me if you have other code still using an old version of the SDK that does not understand the new List and Map types and want to ensure that you don't accidentally start writing values using these types.


V2_COMPATIBLE

public static final ConversionSchema V2_COMPATIBLE
A V2 conversion schema which retains backwards compatibility with the V1 conversion schema for existing DynamoDB types, but adds the ability to marshall recursive structures using the new List and Map types. This is currently the default conversion schema.


V2

public static final ConversionSchema V2
The native V2 conversion schema. This schema breaks compatibility with older versions of the mapper that only support the V1 schema by storing booleans as native DynamoDB Booleans rather than as a 1 or 0 in a DynamoDB Number. Switching to the V2 schema will prevent older versions of the mapper from reading items you write that contain booleans.



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