Package com.amazonaws.services.dynamodb.model

Examples of com.amazonaws.services.dynamodb.model.UpdateItemRequest


            db.putItem(applyUserAgent(new PutItemRequest().withTableName(tableName).withItem(convertToItem(updateValues))
                    .withExpected(expectedValues)));
        } else if ( !nonKeyAttributePresent ) {
            keyOnlyPut(tableName, objectKey, hashKeyGetter, rangeKeyGetter);
        } else {
            db.updateItem(applyUserAgent(new UpdateItemRequest().withTableName(tableName).withKey(objectKey)
                    .withAttributeUpdates(updateValues).withExpected(expectedValues)));
        }

        /*
         * Finally, after the service call has succeeded, update the in-memory
View Full Code Here


        super(ddbClient, configuration, exchange);
    }

    @Override
    public void execute() {
        UpdateItemResult result = ddbClient.updateItem(new UpdateItemRequest()
                .withTableName(determineTableName())
                .withKey(determineKey())
                .withAttributeUpdates(determineUpdateValues())
                .withExpected(determineUpdateCondition())
                .withReturnValues(determineReturnValues()));
View Full Code Here

            db.putItem(applyUserAgent(new PutItemRequest().withTableName(tableName).withItem(convertToItem(updateValues))
                    .withExpected(expectedValues)));
        } else if ( !nonKeyAttributePresent ) {
            keyOnlyPut(tableName, objectKey, hashKeyGetter, rangeKeyGetter);
        } else {
            db.updateItem(applyUserAgent(new UpdateItemRequest().withTableName(tableName).withKey(objectKey)
                    .withAttributeUpdates(updateValues).withExpected(expectedValues)));
        }

        /*
         * Finally, after the service call has succeeded, update the in-memory
View Full Code Here

            db.putItem(applyUserAgent(new PutItemRequest().withTableName(tableName).withItem(convertToItem(updateValues))
                    .withExpected(expectedValues)));
        } else if ( !nonKeyAttributePresent ) {
            keyOnlyPut(tableName, objectKey, hashKeyGetter, rangeKeyGetter);
        } else {
            db.updateItem(applyUserAgent(new UpdateItemRequest().withTableName(tableName).withKey(objectKey)
                    .withAttributeUpdates(updateValues).withExpected(expectedValues)));
        }

        /*
         * Finally, after the service call has succeeded, update the in-memory
View Full Code Here

            db.putItem(applyUserAgent(new PutItemRequest().withTableName(tableName).withItem(convertToItem(updateValues))
                    .withExpected(expectedValues)));
        } else if ( !nonKeyAttributePresent ) {
            keyOnlyPut(tableName, objectKey, hashKeyGetter, rangeKeyGetter);
        } else {
            db.updateItem(applyUserAgent(new UpdateItemRequest().withTableName(tableName).withKey(objectKey)
                    .withAttributeUpdates(updateValues).withExpected(expectedValues)));
        }

        /*
         * Finally, after the service call has succeeded, update the in-memory
View Full Code Here

         */
        if ( config.getSaveBehavior() == SaveBehavior.CLOBBER || forcePut ) {
            db.putItem(new PutItemRequest().withTableName(tableName).withItem(convertToItem(updateValues))
                    .withExpected(expectedValues));
        } else {
            db.updateItem(new UpdateItemRequest().withTableName(tableName).withKey(objectKey)
                    .withAttributeUpdates(updateValues).withExpected(expectedValues));
        }

        /*
         * Finally, after the service call has succeeded, update the in-memory
View Full Code Here

                    .withItem(transformAttributes(clazz, convertToItem(updateValues)))
                    .withExpected(expectedValues)));
        } else if ( !nonKeyAttributePresent ) {
            keyOnlyPut(clazz, tableName, objectKey, hashKeyGetter, rangeKeyGetter);
        } else {
            db.updateItem(applyUserAgent(new UpdateItemRequest().withTableName(tableName).withKey(objectKey)
                                         .withAttributeUpdates(transformAttributeUpdates(clazz, objectKey, updateValues)).withExpected(expectedValues)));
        }

        /*
         * Finally, after the service call has succeeded, update the in-memory
View Full Code Here

            AttributeValue v = new AttributeValue(val.getValue().toString());
            attributes.put(val.getKey(), new AttributeValueUpdate()
                    .withValue(v).withAction("PUT"));
        }

        UpdateItemRequest req = new UpdateItemRequest(table, createPrimaryKey(key), attributes);

        try {
            dynamoDB.updateItem(req);
        }catch (AmazonServiceException ex) {
            logger.error(ex.getMessage());
View Full Code Here

                    .withItem(transformAttributes(clazz, convertToItem(updateValues)))
                    .withExpected(expectedValues)));
        } else if ( !nonKeyAttributePresent ) {
            keyOnlyPut(tableName, objectKey, hashKeyGetter, rangeKeyGetter);
        } else {
            db.updateItem(applyUserAgent(new UpdateItemRequest().withTableName(tableName).withKey(objectKey)
                    .withAttributeUpdates(transformAttributeUpdates(clazz, updateValues)).withExpected(expectedValues)));
        }

        /*
         * Finally, after the service call has succeeded, update the in-memory
View Full Code Here

            this.path = path;
        }
       
        @Override
        public UpdateItemResult call() throws Exception {
            UpdateItemRequest update = new UpdateItemRequest();
            update.setTableName(tableName);
            update.setKey(new Key(new AttributeValue(normalize(path.getParent())), new AttributeValue(path.getName())));
           
            Map<String, AttributeValueUpdate> items = new HashMap<String, AttributeValueUpdate>();
            items.put(DELETE_MARKER, new AttributeValueUpdate().withValue(new AttributeValue().withS(Boolean.TRUE.toString())));
            items.put(EPOCH_VALUE, new AttributeValueUpdate().withValue(new AttributeValue().withN(System.currentTimeMillis()+"")));
           
            update.setAttributeUpdates(items);

            if(log.isDebugEnabled()) {
                log.debug("Marking DynamoDB path deleted: " + path.toUri());
            }
           
View Full Code Here

TOP

Related Classes of com.amazonaws.services.dynamodb.model.UpdateItemRequest

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.