Annotation Type DynamoDbImmutable
-
@Target(TYPE) @Retention(RUNTIME) @SdkPublicApi public @interface DynamoDbImmutable
Class level annotation that identifies this class as being a DynamoDb mappable entity. Any class used to initialize aImmutableTableSchemamust have this annotation. If a class is used as an attribute type within another annotated DynamoDb class, either as a document or flattened with theDynamoDbFlattenannotation, it will also require this annotation to work automatically without an explicitAttributeConverter.Attribute Converter Providers
UsingAttributeConverterProviders is optional and, if used, the supplied provider supersedes the default converter provided by the table schema.Note:
- The converter(s) must provide
AttributeConverters for all types used in the schema. - The table schema DefaultAttributeConverterProvider provides standard converters for most primitive and common Java types. Use custom AttributeConverterProviders when you have specific needs for type conversion that the defaults do not cover.
- If you provide a list of attribute converter providers, you can add DefaultAttributeConverterProvider to the end of the list to fall back on the defaults.
- Providing an empty list {} will cause no providers to get loaded.
For Lombok users: Lombok's naming scheme for boolean properties is not compatible with this schema.
ImmutableTableSchemaexpects getters forbooleanproperties to begin with "is", for exampleboolean isNew(). However, Lombok will use a "get" prefix. To maintain backwards compatibility when existing use cases, the expected naming will not be updated. Example using attribute converter providers with one custom provider and the default provider:Example using
DynamoDbImmutable: {@snippet : - The converter(s) must provide
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<? extends AttributeConverterProvider>[]converterProviders
-
-
-
Element Detail
-
builder
Class<?> builder
The builder class that can be used to construct instances of the annotated immutable class
-
-
-
converterProviders
Class<? extends AttributeConverterProvider>[] converterProviders
- Default:
- {software.amazon.awssdk.enhanced.dynamodb.DefaultAttributeConverterProvider.class}
-
-