/** * Constructs a new ExpectedAttributeValue object. Callers should use the setter or fluent setter (with...) methods * to initialize any additional object members. * * @param value * Represents the data for the expected attribute.</p> * <p> * Each attribute value is described as a name-value pair. The name is the data type, and the value is the * data itself. * </p> * <p> * For more information, see <a href= * "http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes" * >Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>. */ public ExpectedAttributeValue(AttributeValue value) { setValue(value); }
/** * <p> * Represents the data for the expected attribute. * </p> * <p> * Each attribute value is described as a name-value pair. The name is the data type, and the value is the data * itself. * </p> * <p> * For more information, see <a href= * "http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes" * >Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>. * </p> * * @param value * Represents the data for the expected attribute.</p> * <p> * Each attribute value is described as a name-value pair. The name is the data type, and the value is the * data itself. * </p> * <p> * For more information, see <a href= * "http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes" * >Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>. * @return Returns a reference to this object so that method calls can be chained together. */ public ExpectedAttributeValue withValue(AttributeValue value) { setValue(value); return this; }
if (context.testExpression("Value", targetDepth)) { context.nextToken(); expectedAttributeValue.setValue(AttributeValueJsonUnmarshaller.getInstance().unmarshall(context));
/** * Constructs a new ExpectedAttributeValue object. Callers should use the * setter or fluent setter (with...) methods to initialize any additional * object members. * * @param value <p> * Represents the data for the expected attribute. * </p> * <p> * Each attribute value is described as a name-value pair. The * name is the data type, and the value is the data itself. * </p> * <p> * For more information, see <a href= * "http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes" * >Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>. * </p> */ public ExpectedAttributeValue(AttributeValue value) { setValue(value); }
private void onVersionAttribute(Method method, Object getterResult, String attributeName) { if (getLocalSaveBehavior() != SaveBehavior.CLOBBER && !internalExpectedValueAssertions.containsKey(attributeName)) { // First establish the expected (current) value for the // update call final ExpectedAttributeValue expected = new ExpectedAttributeValue(); // For new objects, insist that the value doesn't exist. // For existing ones, insist it has the old value. final AttributeValue currentValue = converter.convert(method, getterResult); expected.setExists(currentValue != null); if (currentValue != null) { expected.setValue(currentValue); } internalExpectedValueAssertions.put(attributeName, expected); } final Object newVersion = incrementor.increment(method, getterResult); final AttributeValue newVersionValue = converter.convert(method, newVersion); updateValues.put(attributeName, new AttributeValueUpdate() .withAction("PUT") .withValue(newVersionValue)); inMemoryUpdates.add(new ValueUpdate(method, newVersionValue, object, converter)); } }
String name = reader.nextName(); if (name.equals("Value")) { expectedAttributeValue.setValue(AttributeValueJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Exists")) {
/** * Constructs a new ExpectedAttributeValue object. Callers should use the setter or fluent setter (with...) methods * to initialize any additional object members. * * @param value * Represents the data for the expected attribute.</p> * <p> * Each attribute value is described as a name-value pair. The name is the data type, and the value is the * data itself. * </p> * <p> * For more information, see <a href= * "http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes" * >Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>. */ public ExpectedAttributeValue(AttributeValue value) { setValue(value); }
/** * <p> * Represents the data for the expected attribute. * </p> * <p> * Each attribute value is described as a name-value pair. The name is the data type, and the value is the data * itself. * </p> * <p> * For more information, see <a href= * "http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes" * >Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>. * </p> * * @param value * Represents the data for the expected attribute.</p> * <p> * Each attribute value is described as a name-value pair. The name is the data type, and the value is the * data itself. * </p> * <p> * For more information, see <a href= * "http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes" * >Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>. * @return Returns a reference to this object so that method calls can be chained together. */ public ExpectedAttributeValue withValue(AttributeValue value) { setValue(value); return this; }
expected.setExists(currentValue != null); if (currentValue != null) { expected.setValue(currentValue);
if (context.testExpression("Value", targetDepth)) { context.nextToken(); expectedAttributeValue.setValue(AttributeValueJsonUnmarshaller.getInstance().unmarshall(context));