public final class AttributeValues extends Object
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"));
Modifier and Type | Method and Description |
---|---|
static AttributeValue |
binaryValue(SdkBytes value)
Creates a literal binary
AttributeValue from raw bytes. |
static AttributeValue |
nullAttributeValue()
The constant that represents a 'null' in a DynamoDb record.
|
static AttributeValue |
numberValue(Number value)
Creates a literal numeric
AttributeValue from any type of Java number. |
static AttributeValue |
stringValue(String value)
Creates a literal string
AttributeValue . |
public static AttributeValue nullAttributeValue()
AttributeValue
of type NUL that represents 'null'.public static AttributeValue stringValue(String value)
AttributeValue
.value
- A string to create the literal from.AttributeValue
of type S that represents the string literal.public static AttributeValue numberValue(Number value)
AttributeValue
from any type of Java number.value
- A number to create the literal from.AttributeValue
of type n that represents the numeric literal.public static AttributeValue binaryValue(SdkBytes value)
AttributeValue
from raw bytes.value
- bytes to create the literal from.AttributeValue
of type B that represents the binary literal.Copyright © 2022. All rights reserved.