@Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface DynamoDbAttribute
This annotation is optional when the name of the DynamoDB attribute matches
the name of the property declared in the class. When they differ, use this
annotation with the attributeName() parameter to specify which DynamoDB
attribute this property corresponds to. Furthermore, the
DynamoDbMapper
class assumes Java naming conventions, and will
lower-case the first character of a getter method's property name to
determine the name of the property. E.g., a method value() will map to the
DynamoDB attribute "value". Similarly, a method isValid() maps to the
DynamoDB attribute "valid".
Even getter method not marked with this annotation are assumed to be modeled
properties, unless marked with DynamoDbIgnore
.
Modifier and Type | Optional Element | Description |
---|---|---|
String |
attributeName |
Optional parameter when the name of the attribute as stored in DynamoDB
should differ from the name used by the getter / setter.
|
String |
mappedBy |
Optional parameter when using
DynamoDbFlattened ; identifies
the field/property name on the target class to map as the attribute. |
String attributeName
String mappedBy
DynamoDbFlattened
; identifies
the field/property name on the target class to map as the attribute.DynamoDbFlattened
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.