Example usage for com.amazonaws.services.simpledb.model ReplaceableItem withAttributes

List of usage examples for com.amazonaws.services.simpledb.model ReplaceableItem withAttributes

Introduction

In this page you can find the example usage for com.amazonaws.services.simpledb.model ReplaceableItem withAttributes.

Prototype


public ReplaceableItem withAttributes(java.util.Collection<ReplaceableAttribute> attributes) 

Source Link

Document

The list of attributes for a replaceable item.

Usage

From source file:org.grails.datastore.mapping.simpledb.engine.SimpleDBNativeItem.java

License:Apache License

public ReplaceableItem createReplaceableItem() {
    ReplaceableItem replaceableItem = new ReplaceableItem();
    for (Map.Entry<String, String> entry : data.entrySet()) {
        //exclude id property because that will be specified as the item name
        String key = entry.getKey();
        if (!"id".equals(key)) {
            String value = entry.getValue();
            replaceableItem.withAttributes(new ReplaceableAttribute(key, value, true));
        }/* w ww  .j  a  va  2  s  .  c o m*/
    }
    return replaceableItem;
}