

# Data class annotations
<a name="ddb-en-client-anno-index"></a>

The following table lists the annotations that can be used on data classes and provides links to information and examples in this guide. The table is sorted in ascending alphabetical order by annotation name.


**Data class annotations used in this guide**  

| Annotation name | Annotation applies to1 | What it does | Where it is shown in this guide | 
| --- | --- | --- | --- | 
| DynamoDbAtomicCounter | attribute2 | Increments a tagged numerical attribute each time a record is written to the database. | [Introduction and discussion.](ddb-en-client-extensions.md#ddb-en-client-extensions-ACE) | 
| DynamoDbAttribute | attribute | Defines or renames a bean property that is mapped to a DynamoDB table attribute. |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbAutoGeneratedTimestampAttribute | attribute | Updates a tagged attribute with a current timestamp every time the item is successfully written to the database | [Introduction and discussion](ddb-en-client-extensions.md#ddb-en-client-extensions-AGTE). | 
| DynamoDbAutoGeneratedUuid | attribute | Generate a unique UUID (Universally Unique Identifier) for an attribute when a new record is written to the database. | [Introduction and discussion.](ddb-en-client-extensions.md#ddb-en-client-extensions-AGUE) | 
| DynamoDbBean | class | Marks a data class as mappable to a table schema. | First use on the [Customer class](ddb-en-client-gs-tableschema.md#ddb-en-client-gs-tableschema-anno-bean-cust) in the Get started section. Several usages appear throughout the guide. | 
| DynamoDbConvertedBy | attribute | Associates a custom AttributeConverter with the annotated attribute. | [Initial discussion and example.](ddb-en-client-adv-features-conversion.md#ddb-en-client-adv-features-conversion-single) | 
| DynamoDbFlatten | attribute | Flattens all the attributes of a separate DynamoDB data class and adds them as top-level attributes to the record that is read and written to the database.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbIgnore | attribute |  Results in the attribute remaining unmapped.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbIgnoreNulls | attribute | Prevents saving null attributes of nested DynamoDb objects. | [Discussion and examples.](ddb-en-client-adv-features-ignore-null.md) | 
| DynamoDbImmutable | class |  Marks an immutable data class as mappable to a table schema.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbPartitionKey | attribute |  Marks an attribute as the primary partition key (hash key) of the DynamoDb table.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbPreserveEmptyObject | attribute |  Specifies that if no data is present for the object mapped to the annotated attribute, the object should be initialized with all null fields.  | [Discussion and examples.](ddb-en-client-adv-features-empty.md) | 
| DynamoDbSecondaryPartitionKey | attribute |  Marks an attribute as a partition key for a global secondary index.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbSecondarySortKey | attribute |  Marks an attribute as an optional sort key for a global or local secondary index.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbSortKey | attribute |  Marks an attribute as the optional primary sort key (range key).  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbUpdateBehavior | attribute |  Specifies the behavior when this attribute is updated as part of an 'update' operation such as UpdateItem.  | [Introduction and example.](ddb-en-client-adv-features-upd-behavior.md) | 
| DynamoDbVersionAttribute | attribute | Increments an item version number. | [Introduction and discussion.](ddb-en-client-extensions.md#ddb-en-client-extensions-VRE) | 

1You can apply an attribute-level annotations to the getter or setter, but not both. This guide shows annotations on getters.

2The term `property` is normally used for a value encapsulated in a JavaBean data class. However, this guide uses the term `attribute` instead, to be consistent with the terminology used by DynamoDB.