DocumentItemConverter

class DocumentItemConverter(numberValueConverter: ValueConverter<Number> = NumberValueConverters.Auto, stringValueConverter: ValueConverter<String> = StringValueConverter, booleanValueConverter: ValueConverter<Boolean> = BooleanValueConverter, nullValueConverter: ValueConverter<Nothing?> = NullValueConverter, attributeValueListValueConverter: ValueConverter<List<AttributeValue>> = AttributeValueListValueConverter, attributeValueMapValueConverter: ValueConverter<Map<String, AttributeValue>> = AttributeValueMapValueConverter) : DocumentConverterBase, Converter<Document.Map, Item>

Converts between Document and Item. The top-level document must be a Document.Map; nested values use the same element-level conversion as DocumentValueConverter.

Constructors

Link copied to clipboard
constructor(numberValueConverter: ValueConverter<Number> = NumberValueConverters.Auto, stringValueConverter: ValueConverter<String> = StringValueConverter, booleanValueConverter: ValueConverter<Boolean> = BooleanValueConverter, nullValueConverter: ValueConverter<Nothing?> = NullValueConverter, attributeValueListValueConverter: ValueConverter<List<AttributeValue>> = AttributeValueListValueConverter, attributeValueMapValueConverter: ValueConverter<Map<String, AttributeValue>> = AttributeValueMapValueConverter)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun convertLeft(from: Item): Document.Map
Link copied to clipboard
open override fun convertRight(from: Document.Map): Item

Inherited functions

Link copied to clipboard
fun <V : Any> ValueConverter<V>.asNullable(nullValueConverter: ValueConverter<Nothing?> = NullValueConverter): ValueConverter<V?>
Link copied to clipboard
fun <T, PK : KeyType> ItemConverter<T>.withKeySpec(partitionKey: KeySpec<PK>, attributes: Attributes = emptyAttributes()): ItemSchema.PartitionKey<T, PK>

Associate this ItemConverter with a KeySpec for a partition key to form a complete ItemSchema

fun <T, PK : KeyType, SK : KeyType> ItemConverter<T>.withKeySpec(partitionKey: KeySpec<PK>, sortKey: KeySpec<SK>, attributes: Attributes = emptyAttributes()): ItemSchema.CompositeKey<T, PK, SK>

Associate this ItemConverter with KeySpec instances for a composite key to form a complete ItemSchema