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 AttributeValue
binaryValue
(SdkBytes value) Creates a literal binaryAttributeValue
from raw bytes.static AttributeValue
The constant that represents a 'null' in a DynamoDb record.static AttributeValue
numberValue
(Number value) Creates a literal numericAttributeValue
from any type of Java number.static AttributeValue
stringValue
(String value) Creates a literal stringAttributeValue
.
-
Method Details
-
nullAttributeValue
The constant that represents a 'null' in a DynamoDb record.- Returns:
- An
AttributeValue
of type NUL that represents 'null'.
-
stringValue
Creates a literal stringAttributeValue
.- Parameters:
value
- A string to create the literal from.- Returns:
- An
AttributeValue
of type S that represents the string literal.
-
numberValue
Creates a literal numericAttributeValue
from any type of Java number.- Parameters:
value
- A number to create the literal from.- Returns:
- An
AttributeValue
of type n that represents the numeric literal.
-
binaryValue
Creates a literal binaryAttributeValue
from raw bytes.- Parameters:
value
- bytes to create the literal from.- Returns:
- An
AttributeValue
of type B that represents the binary literal.
-