Example usage for com.amazonaws.services.dynamodbv2.datamodeling DynamoDBMarshaller marshall

List of usage examples for com.amazonaws.services.dynamodbv2.datamodeling DynamoDBMarshaller marshall

Introduction

In this page you can find the example usage for com.amazonaws.services.dynamodbv2.datamodeling DynamoDBMarshaller marshall.

Prototype

public String marshall(T getterReturnResult);

Source Link

Document

Turns an object of type T into its String representation.

Usage

From source file:org.socialsignin.spring.data.dynamodb.repository.query.AbstractDynamoDBQueryCriteria.java

License:Apache License

@SuppressWarnings("unchecked")
protected <V> Object getPropertyAttributeValue(String propertyName, Object value) {
    DynamoDBMarshaller<V> marshaller = (DynamoDBMarshaller<V>) entityInformation
            .getMarshallerForProperty(propertyName);

    if (marshaller != null) {
        return marshaller.marshall((V) value);
    } else {//  ww  w.  ja v a2s  .co m
        return value;
    }
}

From source file:org.socialsignin.spring.data.dynamodb.repository.query.AbstractDynamoDBQueryCriteria.java

License:Apache License

private List<String> getDateListAsStringList(List<Date> dateList) {
    DynamoDBMarshaller<Date> marshaller = new Date2IsoDynamoDBMarshaller();
    List<String> list = new ArrayList<String>();
    for (Date date : dateList) {
        if (date != null) {
            list.add(marshaller.marshall(date));
        } else {//from ww w. j a v  a 2 s  .  co m
            list.add(null);
        }
    }
    return list;
}

From source file:org.socialsignin.spring.data.dynamodb.repository.query.AbstractDynamoDBQueryCriteria.java

License:Apache License

private List<String> getInstantListAsStringList(List<Instant> dateList) {
    DynamoDBMarshaller<Instant> marshaller = new Instant2IsoDynamoDBMarshaller();
    List<String> list = new ArrayList<String>();
    for (Instant date : dateList) {
        if (date != null) {
            list.add(marshaller.marshall(date));
        } else {/* w  w  w .j a v a  2s  .  c  o m*/
            list.add(null);
        }
    }
    return list;
}