Annotation Type DynamoDbImmutable
-
@Target(TYPE) @Retention(RUNTIME) public @interface DynamoDbImmutable
Class level annotation that identifies this class as being a DynamoDb mappable entity. Any class used to initialize aImmutableTableSchema
must have this annotation. If a class is used as an attribute type within another annotated DynamoDb class, either as a document or flattened with theDynamoDbFlatten
annotation, it will also require this annotation to work automatically without an explicitAttributeConverter
.Attribute Converter Providers
UsingAttributeConverterProvider
s is optional and, if used, the supplied provider supersedes the default converter provided by the table schema.Note:
- The converter(s) must provide
AttributeConverter
s 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.
(converterProviders = {CustomAttributeConverter.class, DefaultAttributeConverterProvider.class});
Example using
DynamoDbImmutable
:{@code
- 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}
-
-