Given a DynamoDB entity like this
@Data()
@DynamoDBTable(tableName = "DynamoTable")
public class DynamoTable implements Serializable {
@DynamoDBAttribute(attributeName = "DATA_VALUE")
private String data
…
}
What I want to know is if I know the name of the attribute in the entity class (data
), could I get the name of the DynamoDB attribute it is annotated with in the entity class (DATA_VALUE
)?
It can be simply achieved with reflection: