com.amazonaws.mobileconnectors.dynamodbv2.dynamodbmapper.unmarshallers
Class BooleanUnmarshaller

java.lang.Object
  extended by com.amazonaws.mobileconnectors.dynamodbv2.dynamodbmapper.unmarshallers.BooleanUnmarshaller
All Implemented Interfaces:
ArgumentUnmarshaller

public class BooleanUnmarshaller
extends java.lang.Object
implements ArgumentUnmarshaller

An unmarshaller that unmarshals DynamoDB Bools (or Numbers) into Java Booleans. Numbers are handled for backwards compatibility with versions of the mapper written before the DynamoDB native Boolean type was added, which stored Java Booleans as either the Number 0 (false) or 1 (true).


Method Summary
static BooleanUnmarshaller instance()
           
 void typeCheck(AttributeValue value, java.lang.reflect.Method setter)
          Asserts that the value given can be processed using the setter given.
 java.lang.Object unmarshall(AttributeValue value)
          Unmarshalls the AttributeValue given into an instance of the appropriate type, as determined by DynamoDBReflector and DynamoDBMapper
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static BooleanUnmarshaller instance()

typeCheck

public void typeCheck(AttributeValue value,
                      java.lang.reflect.Method setter)
Description copied from interface: ArgumentUnmarshaller
Asserts that the value given can be processed using the setter given.

Specified by:
typeCheck in interface ArgumentUnmarshaller

unmarshall

public java.lang.Object unmarshall(AttributeValue value)
Description copied from interface: ArgumentUnmarshaller
Unmarshalls the AttributeValue given into an instance of the appropriate type, as determined by DynamoDBReflector and DynamoDBMapper

Specified by:
unmarshall in interface ArgumentUnmarshaller


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