

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 明确包含或排除属性
<a name="ddb-en-client-adv-features-inex-attr"></a>

DynamoDB 增强型客户端 API 提供了注释，可将数据类属性排除在表的属性之外。通过 API，您还可以使用与数据类属性名称不同的属性名称。

## 排除属性
<a name="ddb-en-client-adv-features-inex-attr-ex"></a>

要忽略不应映射到 DynamoDB 表的属性，请使用 `@DynamoDbIgnore` 注释标记该属性。

```
private String internalKey;

@DynamoDbIgnore
public String getInternalKey() { return this.internalKey; }
public void setInternalKey(String internalKey) { this.internalKey = internalKey;}
```

## 包含属性
<a name="ddb-en-client-adv-features-inex-attr-in"></a>

要更改 DynamoDB 表中使用的属性的名称，请使用 `@DynamoDbAttribute` 注释标记该属性并提供其他名称。

```
private String internalKey;

@DynamoDbAttribute("renamedInternalKey")
public String getInternalKey() { return this.internalKey; }
public void setInternalKey(String internalKey) { this.internalKey = internalKey;}
```