Package com.amazonaws.services.dynamodbv2.model

Examples of com.amazonaws.services.dynamodbv2.model.PutItemRequest


        /*
         * Do a put or an update, according to the configuration. For a put (not
         * the default), we need to munge the data type.
         */
        if ( config.getSaveBehavior() == SaveBehavior.CLOBBER || forcePut ) {
            db.putItem(applyUserAgent(new PutItemRequest().withTableName(tableName)
                    .withItem(transformAttributes(clazz, convertToItem(updateValues)))
                    .withExpected(expectedValues)));
        } else {
            db.updateItem(applyUserAgent(new UpdateItemRequest().withTableName(tableName).withKey(key)
                    .withAttributeUpdates(transformAttributeUpdates(clazz, updateValues)).withExpected(expectedValues)));
View Full Code Here


                    Map<String, AttributeValue> attributeValues =
                            convertToItem(getAttributeValueUpdates());

                    attributeValues = transformAttributes(
                        toParameters(attributeValues, this.clazz, finalConfig));
                    PutItemRequest req = new PutItemRequest()
                        .withTableName(getTableName())
                        .withItem(attributeValues)
                        .withExpected(getExpectedAttributeValues())
                        .withRequestMetricCollector(
                            finalConfig.getRequestMetricCollector());
View Full Code Here

        //overlay any user provided expected values.
        if(userProvidedExpectedValues != null){
            expectedValues.putAll(userProvidedExpectedValues);
        }
        PutItemRequest req = new PutItemRequest().withTableName(tableName)
            .withItem(attributes).withExpected(expectedValues)
            .withRequestMetricCollector(config.getRequestMetricCollector());
        db.putItem(applyUserAgent(req));
   }
View Full Code Here

                    Map<String, AttributeValue> attributeValues =
                            convertToItem(getAttributeValueUpdates());

                    attributeValues = transformAttributes(
                        toParameters(attributeValues, this.clazz, finalConfig));
                    PutItemRequest req = new PutItemRequest()
                        .withTableName(getTableName())
                        .withItem(attributeValues)
                        .withExpected(getExpectedAttributeValues())
                        .withRequestMetricCollector(
                            finalConfig.getRequestMetricCollector());
View Full Code Here

        //overlay any user provided expected values.
        if(userProvidedExpectedValues != null){
            expectedValues.putAll(userProvidedExpectedValues);
        }
        PutItemRequest req = new PutItemRequest().withTableName(tableName)
            .withItem(attributes).withExpected(expectedValues)
            .withRequestMetricCollector(config.getRequestMetricCollector());
        db.putItem(applyUserAgent(req));
   }
View Full Code Here

        /*
         * Do a put or an update, according to the configuration. For a put (not
         * the default), we need to munge the data type.
         */
        if ( config.getSaveBehavior() == SaveBehavior.CLOBBER || forcePut ) {
            db.putItem(applyUserAgent(new PutItemRequest().withTableName(tableName)
                    .withItem(transformAttributes(clazz, convertToItem(updateValues)))
                    .withExpected(expectedValues)));
        } else {
            db.updateItem(applyUserAgent(new UpdateItemRequest().withTableName(tableName).withKey(key)
                    .withAttributeUpdates(transformAttributeUpdates(clazz, key, updateValues)).withExpected(expectedValues)));
View Full Code Here

            attributeValues = transformAttributes(
                    toParameters(attributeValues,
                                 this.clazz,
                                 saveConfig));
            PutItemRequest req = new PutItemRequest()
                    .withTableName(getTableName())
                    .withItem(attributeValues)
                    .withExpected(mergeExpectedAttributeValueConditions())
                    .withConditionalOperator(userProvidedConditionOperator)
                    .withRequestMetricCollector(saveConfig.getRequestMetricCollector());
View Full Code Here

                    Map<String, AttributeValue> attributeValues =
                            convertToItem(getAttributeValueUpdates());
                   
                    attributeValues = transformAttributes(
                        toParameters(attributeValues, this.clazz, finalConfig));
                    PutItemRequest req = new PutItemRequest()
                        .withTableName(getTableName())
                        .withItem(attributeValues)
                        .withExpected(getExpectedAttributeValues())
                        .withRequestMetricCollector(
                            finalConfig.getRequestMetricCollector());
View Full Code Here

        //overlay any user provided expected values.
        if(userProvidedExpectedValues != null){
            expectedValues.putAll(userProvidedExpectedValues);
        }
        PutItemRequest req = new PutItemRequest().withTableName(tableName)
            .withItem(attributes).withExpected(expectedValues)
            .withRequestMetricCollector(config.getRequestMetricCollector());
        db.putItem(applyUserAgent(req));
   }
View Full Code Here

            attributeValues = transformAttributes(
                    toParameters(attributeValues,
                                 this.clazz,
                                 saveConfig));
            PutItemRequest req = new PutItemRequest()
                    .withTableName(getTableName())
                    .withItem(attributeValues)
                    .withExpected(mergeExpectedAttributeValueConditions())
                    .withConditionalOperator(userProvidedConditionOperator)
                    .withRequestMetricCollector(saveConfig.getRequestMetricCollector());
View Full Code Here

TOP

Related Classes of com.amazonaws.services.dynamodbv2.model.PutItemRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.