Skip to content

Commit 247d722

Browse files
committed
DDBEnhanced - Support to flatten a Map into top level attributes of the object
1 parent fd59082 commit 247d722

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

.changes/next-release/feature-AmazonDynamoDBEnhancedClient-22723fc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"type": "feature",
33
"category": "Amazon DynamoDB Enhanced Client",
44
"contributor": "",
5-
"description": "Add support for @DynamoDBFlattenMap to flatten a Map to top level attributes of an object"
5+
"description": "Add support for @DynamoDbFlattenMap to flatten a Map to top level attributes of an object"
66
}

services-custom/dynamodb-enhanced/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ builder pattern.
688688

689689
### Flattening map attributes
690690

691-
When using composition, you can apply the @DynamoDbFlattenMap annotation to flatten a Map into top-level attributes:
691+
You can apply the @DynamoDbFlattenMap annotation to flatten a Map into top-level attributes:
692692
```java
693693
@DynamoDbBean
694694
public class Customer {
@@ -737,6 +737,6 @@ private static final StaticTableSchema<Customer> CUSTOMER_TABLE_SCHEMA =
737737
.setter(Customer::setName))
738738
// Because we are flattening a Map object, we supply a getter and setter so the
739739
// mapper knows how to access it
740-
.flattenMap(Map::getDetailsMap, Map::setDetailsMap)
740+
.flattenMap(Customer::getDetailsMap, Customer::setDetailsMap)
741741
.build();
742742
```

services-custom/dynamodb-enhanced/src/test/java/software/amazon/awssdk/enhanced/dynamodb/mapper/testbeans/flattenmap/FlattenMapAndFlattenRecordBean.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void setFlattenRecord(FlattenRecord flattenRecord) {
5555
public Map<String, String> getAttributesMap() {
5656
return attributesMap;
5757
}
58-
public void setAttributesMap(Map<String, String> abstractMap) {
59-
this.attributesMap = abstractMap;
58+
public void setAttributesMap(Map<String, String> attributesMap) {
59+
this.attributesMap = attributesMap;
6060
}
6161
}

services-custom/dynamodb-enhanced/src/test/java/software/amazon/awssdk/enhanced/dynamodb/mapper/testbeans/flattenmap/FlattenMapValidBean.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public void setRootAttribute2(String rootAttribute2) {
5454
public Map<String, String> getAttributesMap() {
5555
return attributesMap;
5656
}
57-
public void setAttributesMap(Map<String, String> abstractMap) {
58-
this.attributesMap = abstractMap;
57+
public void setAttributesMap(Map<String, String> attributesMap) {
58+
this.attributesMap = attributesMap;
5959
}
6060

6161
public static FakeItem.Builder builder() {

0 commit comments

Comments
 (0)