Example usage for com.amazonaws.services.simpledb.model PutAttributesRequest PutAttributesRequest

List of usage examples for com.amazonaws.services.simpledb.model PutAttributesRequest PutAttributesRequest

Introduction

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

Prototype

public PutAttributesRequest(String domainName, String itemName,
        java.util.List<ReplaceableAttribute> attributes) 

Source Link

Document

Constructs a new PutAttributesRequest object.

Usage

From source file:wwutil.jsoda.SimpleDBService.java

License:Mozilla Public License

public <T> void putObj(Class<T> modelClass, T dataObj, String expectedField, Object expectedValue,
        boolean expectedExists) throws Exception {
    String modelName = jsoda.getModelName(modelClass);
    String table = jsoda.getModelTable(modelName);
    String idValue = makeIdValue(modelName, dataObj);
    PutAttributesRequest req = expectedField == null
            ? new PutAttributesRequest(table, idValue, buildAttrs(dataObj, modelName))
            : new PutAttributesRequest(table, idValue, buildAttrs(dataObj, modelName),
                    buildExpectedValue(modelName, expectedField, expectedValue, expectedExists));
    sdbClient.putAttributes(req);/*from w  w w .  j  a va2 s . c o m*/
}