/** * <p> * This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href= * "http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html" * >ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>. * </p> * * @param conditionalOperator * This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a * href= * "http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html" * >ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>. * @see ConditionalOperator */ public void setConditionalOperator(ConditionalOperator conditionalOperator) { withConditionalOperator(conditionalOperator); }
/** * Save the item using a PutItem request. The handler will call this * method if * <ul> * <li> CLOBBER configuration is being used; * <li> OR the item contains auto-generated key value; * <li> OR an UpdateItem request has silently failed (200 response with * no affected attribute), which indicates the key-only-put scenario * that we used to handle by the keyOnlyPut(...) hack. * </ul> */ protected PutItemResult doPutItem() { Map<String, AttributeValue> attributeValues = convertToItem(getAttributeValueUpdates()); attributeValues = transformAttributes( toParameters(attributeValues, this.clazz, getTableName(), saveConfig)); PutItemRequest req = new PutItemRequest() .withTableName(getTableName()) .withItem(attributeValues) .withExpected(mergeExpectedAttributeValueConditions()) .withConditionalOperator(userProvidedConditionOperator) .withRequestMetricCollector(saveConfig.getRequestMetricCollector()); return db.putItem(applyUserAgent(req)); }
/** * <p> * This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href= * "http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html" * >ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>. * </p> * * @param conditionalOperator * This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a * href= * "http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html" * >ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>. * @see ConditionalOperator */ public void setConditionalOperator(ConditionalOperator conditionalOperator) { withConditionalOperator(conditionalOperator); }
/** * Save the item using a PutItem request. The handler will call this * method if * <ul> * <li>CLOBBER configuration is being used; * <li>OR the item contains auto-generated key value; * <li>OR an UpdateItem request has silently failed (200 response with * no affected attribute), which indicates the key-only-put scenario * that we used to handle by the keyOnlyPut(...) hack. * </ul> */ protected PutItemResult doPutItem() { Map<String, AttributeValue> attributeValues = convertToItem(getAttributeValueUpdates()); attributeValues = transformAttributes( toParameters(attributeValues, this.clazz, getTableName(), saveConfig)); final PutItemRequest req = new PutItemRequest() .withTableName(getTableName()) .withItem(attributeValues) .withExpected(mergeExpectedAttributeValueConditions()) .withConditionalOperator(userProvidedConditionOperator) .withRequestMetricCollector(saveConfig.getRequestMetricCollector()); return db.putItem(applyUserAgent(req)); }
/** * Save the item using a PutItem request. The handler will call this * method if * <ul> * <li> CLOBBER configuration is being used; * <li> OR the item contains auto-generated key value; * <li> OR an UpdateItem request has silently failed (200 response with * no affected attribute), which indicates the key-only-put scenario * that we used to handle by the keyOnlyPut(...) hack. * </ul> */ protected PutItemResult doPutItem() { Map<String, AttributeValue> attributeValues = convertToItem(getAttributeValueUpdates()); attributeValues = transformAttributes( toParameters(attributeValues, this.clazz, getTableName(), saveConfig)); PutItemRequest req = new PutItemRequest() .withTableName(getTableName()) .withItem(attributeValues) .withExpected(mergeExpectedAttributeValueConditions()) .withConditionalOperator(userProvidedConditionOperator) .withRequestMetricCollector(saveConfig.getRequestMetricCollector()); return db.putItem(applyUserAgent(req)); }