Class OptionalLongAttributeConverter

java.lang.Object
software.amazon.awssdk.enhanced.dynamodb.internal.converter.attribute.OptionalLongAttributeConverter
All Implemented Interfaces:
AttributeConverter<OptionalLong>

@ThreadSafe @Immutable public final class OptionalLongAttributeConverter extends Object implements AttributeConverter<OptionalLong>
A converter between OptionalLong and AttributeValue.

This stores values in DynamoDB as a number.

This supports reading numbers between Long.MIN_VALUE and Long.MAX_VALUE from DynamoDB. Null values are converted to OptionalLong.empty(). For larger numbers, consider using the OptionalAttributeConverter along with a BigInteger. For shorter numbers, consider using the OptionalIntAttributeConverter or OptionalAttributeConverter along with a Short type.

This does not support reading decimal numbers. For decimal numbers, consider using OptionalDoubleAttributeConverter, or the OptionalAttributeConverter with a Float or BigDecimal. Decimal numbers will cause a NumberFormatException on conversion.

This can be created via create().