

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 資料類別註釋
<a name="ddb-en-client-anno-index"></a>

下表列出可用於資料類別的註釋，並提供本指南中資訊和範例的連結。資料表會依註釋名稱遞增字母順序排序。


**本指南中使用的資料類別註釋**  

| 註釋名稱 | 註釋適用於 1 | 它的功能 | 本指南中顯示的位置 | 
| --- | --- | --- | --- | 
| DynamoDbAtomicCounter | 屬性 2 | 每次將記錄寫入資料庫時，都會遞增標記的數值屬性。 | [簡介和討論。](ddb-en-client-extensions.md#ddb-en-client-extensions-ACE) | 
| DynamoDbAttribute | 屬性 | 定義或重新命名映射至 DynamoDB 資料表屬性的 Bean 屬性。 |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbAutoGeneratedTimestampAttribute | 屬性 | 每次項目成功寫入資料庫時，都會以目前時間戳記更新已標記的屬性 | [簡介和討論](ddb-en-client-extensions.md#ddb-en-client-extensions-AGTE)。 | 
| DynamoDbAutoGeneratedUuid | 屬性 | 將新記錄寫入資料庫時，為屬性產生唯一的 UUID （通用唯一識別符）。 | [簡介和討論。](ddb-en-client-extensions.md#ddb-en-client-extensions-AGUE) | 
| DynamoDbBean | class | 將資料類別標示為可映射至資料表結構描述。 | 請先在「開始使用」區段中的[客戶類別](ddb-en-client-gs-tableschema.md#ddb-en-client-gs-tableschema-anno-bean-cust)上使用 。本指南中會顯示數個用量。 | 
| DynamoDbConvertedBy | 屬性 | 將自訂AttributeConverter與註釋屬性建立關聯。 | [初始討論和範例。](ddb-en-client-adv-features-conversion.md#ddb-en-client-adv-features-conversion-single) | 
| DynamoDbFlatten | 屬性 | 扁平化個別 DynamoDB 資料類別的所有屬性，並將其新增為最上層屬性至讀取和寫入資料庫的記錄。 |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbIgnore | 屬性 | 導致屬性保持未映射。 |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbIgnoreNulls | 屬性 | 防止儲存巢狀 DynamoDb 物件的 null 屬性。 | [討論和範例。](ddb-en-client-adv-features-ignore-null.md) | 
| DynamoDbImmutable | class | 將不可變資料類別標記為可映射至資料表結構描述。 |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbPartitionKey | 屬性 | 將屬性標記為 DynamoDb 資料表的主要分割區索引鍵 （雜湊索引鍵）。 |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbPreserveEmptyObject | 屬性 | 指定如果對應至註釋屬性的物件沒有資料，則應使用所有 null 欄位初始化物件。 | [討論和範例。](ddb-en-client-adv-features-empty.md) | 
| DynamoDbSecondaryPartitionKey | 屬性 | 將屬性標記為全域次要索引的分割區索引鍵。 |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbSecondarySortKey | 屬性 | 將屬性標記為全域或本機次要索引的選用排序索引鍵。 |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbSortKey | 屬性 | 將屬性標記為選用的主要排序索引鍵 （範圍索引鍵）。 |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/sdk-for-java/latest/developer-guide/ddb-en-client-anno-index.html)  | 
| DynamoDbUpdateBehavior | 屬性 | 指定在 UpdateItem 等 'update' 操作中更新此屬性時的行為。 | [簡介和範例。](ddb-en-client-adv-features-upd-behavior.md) | 
| DynamoDbVersionAttribute | 屬性 | 遞增項目版本號碼。 | [簡介和討論。](ddb-en-client-extensions.md#ddb-en-client-extensions-VRE) | 

1您可以將屬性層級註釋套用至 getter 或 setter，但不能同時套用兩者。本指南顯示 getter 上的註釋。

2 該術語`property`通常用於封裝在 JavaBean 資料類別中的值。不過，本指南會`attribute`改用 一詞，以符合 DynamoDB 所使用的術語。