Class AttributeValues
- java.lang.Object
-
- software.amazon.awssdk.enhanced.dynamodb.internal.AttributeValues
-
public final class AttributeValues extends Object
This static helper class contains some literalAttributeValueconstants 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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AttributeValuebinaryValue(SdkBytes value)Creates a literal binaryAttributeValuefrom raw bytes.static AttributeValuenullAttributeValue()The 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 Detail
-
nullAttributeValue
public static AttributeValue nullAttributeValue()
The constant that represents a 'null' in a DynamoDb record.- Returns:
- An
AttributeValueof type NUL that represents 'null'.
-
stringValue
public static AttributeValue stringValue(String value)
Creates a literal stringAttributeValue.- Parameters:
value- A string to create the literal from.- Returns:
- An
AttributeValueof type S that represents the string literal.
-
numberValue
public static AttributeValue numberValue(Number value)
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
public static AttributeValue binaryValue(SdkBytes value)
Creates a literal binaryAttributeValuefrom raw bytes.- Parameters:
value- bytes to create the literal from.- Returns:
- An
AttributeValueof type B that represents the binary literal.
-
-