diff --git a/services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/staticmapper/Attributes.java b/services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/staticmapper/Attributes.java index 2ae25d24ee2f..b299b8926576 100644 --- a/services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/staticmapper/Attributes.java +++ b/services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/staticmapper/Attributes.java @@ -33,8 +33,8 @@ private Attributes() { } public static AttributeSupplier binaryAttribute(String attributeName, - Function getAttributeMethod, - BiConsumer updateItemMethod) { + Function getAttributeMethod, + BiConsumer updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -42,9 +42,9 @@ public static AttributeSupplier binaryAttribute(String attributeName, AttributeTypes.binaryType()); } - public static AttributeSupplier binaryAttributeSet(String attributeName, - Function> getAttributeMethod, - BiConsumer> updateItemMethod) { + public static AttributeSupplier binarySetAttribute(String attributeName, + Function> getAttributeMethod, + BiConsumer> updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -53,8 +53,8 @@ public static AttributeSupplier binaryAttributeSet(String attributeName, } public static AttributeSupplier boolAttribute(String attributeName, - Function getAttributeMethod, - BiConsumer updateItemMethod) { + Function getAttributeMethod, + BiConsumer updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -63,8 +63,8 @@ public static AttributeSupplier boolAttribute(String attributeName, } public static AttributeSupplier stringAttribute(String attributeName, - Function getAttributeMethod, - BiConsumer updateItemMethod) { + Function getAttributeMethod, + BiConsumer updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -72,9 +72,9 @@ public static AttributeSupplier stringAttribute(String attributeName, AttributeTypes.stringType()); } - public static AttributeSupplier stringAttributeSet(String attributeName, - Function> getAttributeMethod, - BiConsumer> updateItemMethod) { + public static AttributeSupplier stringSetAttribute(String attributeName, + Function> getAttributeMethod, + BiConsumer> updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -83,8 +83,8 @@ public static AttributeSupplier stringAttributeSet(String attributeName, } public static AttributeSupplier integerNumberAttribute(String attributeName, - Function getAttributeMethod, - BiConsumer updateItemMethod) { + Function getAttributeMethod, + BiConsumer updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -93,8 +93,8 @@ public static AttributeSupplier integerNumberAttribute(String attributeNa } public static AttributeSupplier longNumberAttribute(String attributeName, - Function getAttributeMethod, - BiConsumer updateItemMethod) { + Function getAttributeMethod, + BiConsumer updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -103,8 +103,8 @@ public static AttributeSupplier longNumberAttribute(String attributeName, } public static AttributeSupplier shortNumberAttribute(String attributeName, - Function getAttributeMethod, - BiConsumer updateItemMethod) { + Function getAttributeMethod, + BiConsumer updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -113,8 +113,8 @@ public static AttributeSupplier shortNumberAttribute(String attributeName } public static AttributeSupplier doubleNumberAttribute(String attributeName, - Function getAttributeMethod, - BiConsumer updateItemMethod) { + Function getAttributeMethod, + BiConsumer updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -123,8 +123,8 @@ public static AttributeSupplier doubleNumberAttribute(String attributeNam } public static AttributeSupplier floatNumberAttribute(String attributeName, - Function getAttributeMethod, - BiConsumer updateItemMethod) { + Function getAttributeMethod, + BiConsumer updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -133,8 +133,8 @@ public static AttributeSupplier floatNumberAttribute(String attributeName } public static AttributeSupplier byteNumberAttribute(String attributeName, - Function getAttributeMethod, - BiConsumer updateItemMethod) { + Function getAttributeMethod, + BiConsumer updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -143,8 +143,8 @@ public static AttributeSupplier byteNumberAttribute(String attributeName, } public static AttributeSupplier integerSetAttribute(String attributeName, - Function> getAttributeMethod, - BiConsumer> updateItemMethod) { + Function> getAttributeMethod, + BiConsumer> updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -153,8 +153,8 @@ public static AttributeSupplier integerSetAttribute(String attributeName, } public static AttributeSupplier longSetAttribute(String attributeName, - Function> getAttributeMethod, - BiConsumer> updateItemMethod) { + Function> getAttributeMethod, + BiConsumer> updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -163,8 +163,8 @@ public static AttributeSupplier longSetAttribute(String attributeName, } public static AttributeSupplier shortSetAttribute(String attributeName, - Function> getAttributeMethod, - BiConsumer> updateItemMethod) { + Function> getAttributeMethod, + BiConsumer> updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -173,8 +173,8 @@ public static AttributeSupplier shortSetAttribute(String attributeName, } public static AttributeSupplier doubleSetAttribute(String attributeName, - Function> getAttributeMethod, - BiConsumer> updateItemMethod) { + Function> getAttributeMethod, + BiConsumer> updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -183,8 +183,8 @@ public static AttributeSupplier doubleSetAttribute(String attributeName, } public static AttributeSupplier floatSetAttribute(String attributeName, - Function> getAttributeMethod, - BiConsumer> updateItemMethod) { + Function> getAttributeMethod, + BiConsumer> updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -193,8 +193,8 @@ public static AttributeSupplier floatSetAttribute(String attributeName, } public static AttributeSupplier byteSetAttribute(String attributeName, - Function> getAttributeMethod, - BiConsumer> updateItemMethod) { + Function> getAttributeMethod, + BiConsumer> updateItemMethod) { return Attribute.create( attributeName, getAttributeMethod, @@ -203,9 +203,9 @@ public static AttributeSupplier byteSetAttribute(String attributeName, } public static AttributeSupplier documentMapAttribute(String attributeName, - Function getAttributeMethod, - BiConsumer updateItemMethod, - TableSchema documentSchema) { + Function getAttributeMethod, + BiConsumer updateItemMethod, + TableSchema documentSchema) { return Attribute.create( attributeName, getAttributeMethod, @@ -214,9 +214,9 @@ public static AttributeSupplier documentMapAttribute(String attributeN } public static AttributeSupplier mapAttribute(String attributeName, - Function> getAttributeMethod, - BiConsumer> updateItemMethod, - AttributeType mappedValueType) { + Function> getAttributeMethod, + BiConsumer> updateItemMethod, + AttributeType mappedValueType) { return Attribute.create( attributeName, getAttributeMethod, @@ -225,9 +225,9 @@ public static AttributeSupplier mapAttribute(String attributeName, } public static AttributeSupplier listAttribute(String attributeName, - Function> getAttributeMethod, - BiConsumer> updateItemMethod, - AttributeType listElementsType) { + Function> getAttributeMethod, + BiConsumer> updateItemMethod, + AttributeType listElementsType) { return Attribute.create( attributeName, getAttributeMethod, diff --git a/services-custom/dynamodb-enhanced/src/test/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/staticmapper/StaticTableSchemaTest.java b/services-custom/dynamodb-enhanced/src/test/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/staticmapper/StaticTableSchemaTest.java index f369b55626cd..56aea3149308 100644 --- a/services-custom/dynamodb-enhanced/src/test/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/staticmapper/StaticTableSchemaTest.java +++ b/services-custom/dynamodb-enhanced/src/test/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/staticmapper/StaticTableSchemaTest.java @@ -48,7 +48,6 @@ import software.amazon.awssdk.core.SdkBytes; import software.amazon.awssdk.extensions.dynamodb.mappingclient.TableMetadata; -import software.amazon.awssdk.extensions.dynamodb.mappingclient.TableSchema; import software.amazon.awssdk.extensions.dynamodb.mappingclient.staticmapper.Attribute.AttributeSupplier; import software.amazon.awssdk.services.dynamodb.model.AttributeValue; import software.amazon.awssdk.extensions.dynamodb.mappingclient.functionaltests.models.FakeItem; @@ -980,8 +979,8 @@ public void mapperCanHandleStringSet() { Set valueSet = new HashSet<>(asList("one", "two", "three")); List expectedList = valueSet.stream().map(Objects::toString).collect(toList()); - verifyNullableAttribute(Attributes.stringAttributeSet("value", FakeMappedItem::getAStringSet, - FakeMappedItem::setAStringSet), + verifyNullableAttribute(Attributes.stringSetAttribute("value", FakeMappedItem::getAStringSet, + FakeMappedItem::setAStringSet), FakeMappedItem.builder().aStringSet(valueSet).build(), AttributeValue.builder().ss(expectedList).build()); } @@ -1047,9 +1046,9 @@ public void mapperCanHandleByteBufferSet() { Set byteBuffer = new HashSet<>(asList(byteBuffer1, byteBuffer2, byteBuffer3)); List sdkBytes = byteBuffer.stream().map(SdkBytes::fromByteBuffer).collect(toList()); - verifyNullableAttribute(Attributes.binaryAttributeSet("value", - FakeMappedItem::getAByteBufferSet, - FakeMappedItem::setAByteBufferSet), + verifyNullableAttribute(Attributes.binarySetAttribute("value", + FakeMappedItem::getAByteBufferSet, + FakeMappedItem::setAByteBufferSet), FakeMappedItem.builder().aByteBufferSet(byteBuffer).build(), AttributeValue.builder().bs(sdkBytes).build()); }