Class AttributeValues
java.lang.Object
software.amazon.awssdk.enhanced.dynamodb.internal.AttributeValues
This static helper class contains some literal
AttributeValue constants and converters. Primarily these
will be used if constructing a literal key object or for use in a custom filter expression. Eg:
Key<?> myKey = Key.create(stringValue("id123"), numberValue(4.23));
Expression filterExpression = Expression.of("id = :filter_id", singletonMap(":filter_id", stringValue("id123")); -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeValuebinaryValue(SdkBytes value) Creates a literal binaryAttributeValuefrom raw bytes.static AttributeValueThe constant that represents a 'null' in a DynamoDb record.static AttributeValuenumberValue(Number value) Creates a literal numericAttributeValuefrom any type of Java number.static AttributeValuestringValue(String value) Creates a literal stringAttributeValue.
-
Method Details
-
nullAttributeValue
The constant that represents a 'null' in a DynamoDb record.- Returns:
- An
AttributeValueof type NUL that represents 'null'.
-
stringValue
Creates a literal stringAttributeValue.- Parameters:
value- A string to create the literal from.- Returns:
- An
AttributeValueof type S that represents the string literal.
-
numberValue
Creates a literal numericAttributeValuefrom any type of Java number.- Parameters:
value- A number to create the literal from.- Returns:
- An
AttributeValueof type n that represents the numeric literal.
-
binaryValue
Creates a literal binaryAttributeValuefrom raw bytes.- Parameters:
value- bytes to create the literal from.- Returns:
- An
AttributeValueof type B that represents the binary literal.
-