Skip to content

Commit 6272280

Browse files
committed
Make builders and static ctors consistent
1 parent c0ba291 commit 6272280

File tree

93 files changed

+924
-921
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+924
-921
lines changed

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/CommonOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ default CompletableFuture<ResultT> executeAsync(TableSchema<ItemT> tableSchema,
132132
CompletableFuture<ResponseT> response = asyncServiceCall(dynamoDbAsyncClient).apply(request);
133133
return response.thenApply(r -> transformResponse(r, tableSchema, context, mapperExtension));
134134
}
135-
}
135+
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/IndexOperation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ default ResultT executeOnSecondaryIndex(TableSchema<ItemT> tableSchema,
5555
String indexName,
5656
MapperExtension mapperExtension,
5757
DynamoDbClient dynamoDbClient) {
58-
OperationContext context = OperationContext.of(tableName, indexName);
58+
OperationContext context = OperationContext.create(tableName, indexName);
5959
return execute(tableSchema, context, mapperExtension, dynamoDbClient);
6060
}
6161

@@ -78,7 +78,7 @@ default CompletableFuture<ResultT> executeOnSecondaryIndexAsync(TableSchema<Item
7878
String indexName,
7979
MapperExtension mapperExtension,
8080
DynamoDbAsyncClient dynamoDbAsyncClient) {
81-
OperationContext context = OperationContext.of(tableName, indexName);
81+
OperationContext context = OperationContext.create(tableName, indexName);
8282
return executeAsync(tableSchema, context, mapperExtension, dynamoDbAsyncClient);
8383
}
8484
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/Key.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private Key(AttributeValue partitionKeyValue, AttributeValue sortKeyValue) {
4646
* @param partitionKeyValue A DynamoDb {@link AttributeValue} that is the literal value of the partition key.
4747
* @return A key.
4848
*/
49-
public static Key of(AttributeValue partitionKeyValue) {
49+
public static Key create(AttributeValue partitionKeyValue) {
5050
return new Key(partitionKeyValue, null);
5151
}
5252

@@ -56,7 +56,7 @@ public static Key of(AttributeValue partitionKeyValue) {
5656
* @param sortKeyValue A DynamoDb {@link AttributeValue} that is the literal value of the sort key.
5757
* @return A key.
5858
*/
59-
public static Key of(AttributeValue partitionKeyValue, AttributeValue sortKeyValue) {
59+
public static Key create(AttributeValue partitionKeyValue, AttributeValue sortKeyValue) {
6060
return new Key(partitionKeyValue, sortKeyValue);
6161
}
6262

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/MappedDatabase.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package software.amazon.awssdk.extensions.dynamodb.mappingclient;
1717

1818
import software.amazon.awssdk.annotations.SdkPublicApi;
19-
import software.amazon.awssdk.extensions.dynamodb.mappingclient.core.DynamoDbMappedDatabase;
2019

2120
/**
2221
* Synchronous interface for running commands against a DynamoDb database. See {@link DynamoDbMappedDatabase} for an
@@ -43,12 +42,4 @@ public interface MappedDatabase {
4342
* @param <T> THe modelled object type being mapped to this table.
4443
*/
4544
<T> MappedTable<T> table(String tableName, TableSchema<T> tableSchema);
46-
47-
/**
48-
* Constructs a builder for the default approved implementation of this interface.
49-
* @return A builder for a {@link DynamoDbMappedDatabase}.
50-
*/
51-
static DynamoDbMappedDatabase.Builder builder() {
52-
return DynamoDbMappedDatabase.builder();
53-
}
5445
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/OperationContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ private OperationContext(String tableName, String indexName) {
2727
this.indexName = indexName;
2828
}
2929

30-
public static OperationContext of(String tableName, String indexName) {
30+
public static OperationContext create(String tableName, String indexName) {
3131
return new OperationContext(tableName, indexName);
3232
}
3333

34-
public static OperationContext of(String tableName) {
34+
public static OperationContext create(String tableName) {
3535
return new OperationContext(tableName, TableMetadata.primaryIndexName());
3636
}
3737

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/Page.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private Page(List<T> items, Map<String, AttributeValue> lastEvaluatedKey) {
4242
* @param <T> The modelled type of the object that has been read.
4343
* @return A newly constructed {@link Page} object.
4444
*/
45-
public static <T> Page<T> of(List<T> items, Map<String, AttributeValue> lastEvaluatedKey) {
45+
public static <T> Page<T> create(List<T> items, Map<String, AttributeValue> lastEvaluatedKey) {
4646
return new Page<>(items, lastEvaluatedKey);
4747
}
4848

@@ -53,7 +53,7 @@ public static <T> Page<T> of(List<T> items, Map<String, AttributeValue> lastEval
5353
* @param <T> The modelled type of the object that has been read.
5454
* @return A newly constructed {@link Page} object.
5555
*/
56-
public static <T> Page<T> of(List<T> items) {
56+
public static <T> Page<T> create(List<T> items) {
5757
return new Page<>(items, null);
5858
}
5959

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/PaginatedIndexOperation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ default SdkIterable<ResultT> executeOnSecondaryIndex(TableSchema<ItemT> tableSch
5656
String indexName,
5757
MapperExtension mapperExtension,
5858
DynamoDbClient dynamoDbClient) {
59-
OperationContext context = OperationContext.of(tableName, indexName);
59+
OperationContext context = OperationContext.create(tableName, indexName);
6060
return execute(tableSchema, context, mapperExtension, dynamoDbClient);
6161
}
6262

@@ -79,7 +79,7 @@ default SdkPublisher<ResultT> executeOnSecondaryIndexAsync(TableSchema<ItemT> ta
7979
String indexName,
8080
MapperExtension mapperExtension,
8181
DynamoDbAsyncClient dynamoDbAsyncClient) {
82-
OperationContext context = OperationContext.of(tableName, indexName);
82+
OperationContext context = OperationContext.create(tableName, indexName);
8383
return executeAsync(tableSchema, context, mapperExtension, dynamoDbAsyncClient);
8484
}
8585
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/PaginatedOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,4 @@ default SdkPublisher<ResultT> executeAsync(TableSchema<ItemT> tableSchema,
141141

142142
return TransformPublisher.of(response, r -> transformResponse(r, tableSchema, context, mapperExtension));
143143
}
144-
}
144+
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/PaginatedTableOperation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ default SdkIterable<ResultT> executeOnPrimaryIndex(TableSchema<ItemT> tableSchem
5555
MapperExtension mapperExtension,
5656
DynamoDbClient dynamoDbClient) {
5757

58-
OperationContext context = OperationContext.of(tableName, TableMetadata.primaryIndexName());
58+
OperationContext context = OperationContext.create(tableName, TableMetadata.primaryIndexName());
5959
return execute(tableSchema, context, mapperExtension, dynamoDbClient);
6060
}
6161

@@ -76,7 +76,7 @@ default SdkPublisher<ResultT> executeOnPrimaryIndexAsync(TableSchema<ItemT> tabl
7676
MapperExtension mapperExtension,
7777
DynamoDbAsyncClient dynamoDbAsyncClient) {
7878

79-
OperationContext context = OperationContext.of(tableName, TableMetadata.primaryIndexName());
79+
OperationContext context = OperationContext.create(tableName, TableMetadata.primaryIndexName());
8080
return executeAsync(tableSchema, context, mapperExtension, dynamoDbAsyncClient);
8181
}
8282
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/TableOperation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ default ResultT executeOnPrimaryIndex(TableSchema<ItemT> tableSchema,
5252
String tableName,
5353
MapperExtension mapperExtension,
5454
DynamoDbClient dynamoDbClient) {
55-
OperationContext context = OperationContext.of(tableName, TableMetadata.primaryIndexName());
55+
OperationContext context = OperationContext.create(tableName, TableMetadata.primaryIndexName());
5656
return execute(tableSchema, context, mapperExtension, dynamoDbClient);
5757
}
5858

@@ -74,7 +74,7 @@ default CompletableFuture<ResultT> executeOnPrimaryIndexAsync(TableSchema<ItemT>
7474
MapperExtension mapperExtension,
7575
DynamoDbAsyncClient dynamoDbAsyncClient) {
7676

77-
OperationContext context = OperationContext.of(tableName, TableMetadata.primaryIndexName());
77+
OperationContext context = OperationContext.create(tableName, TableMetadata.primaryIndexName());
7878
return executeAsync(tableSchema, context, mapperExtension, dynamoDbAsyncClient);
7979
}
8080
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/TableSchema.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import java.util.Map;
2020

2121
import software.amazon.awssdk.annotations.SdkPublicApi;
22-
import software.amazon.awssdk.extensions.dynamodb.mappingclient.staticmapper.StaticTableSchema;
2322
import software.amazon.awssdk.services.dynamodb.model.AttributeValue;
2423

2524
/**
@@ -84,14 +83,4 @@ public interface TableSchema<T> {
8483
* @return A {@link TableMetadata} object that contains structural information about the table being modelled.
8584
*/
8685
TableMetadata tableMetadata();
87-
88-
/**
89-
* Returns a builder for the default implementation of this interface which is an immutable, declarative, type-safe
90-
* mapper.
91-
* See {@link StaticTableSchema} for more information.
92-
* @return A default builder for a {@link StaticTableSchema}.
93-
*/
94-
static StaticTableSchema.GenericBuilder builder() {
95-
return StaticTableSchema.builder();
96-
}
9786
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/core/TransformIterable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ public static <T, R> TransformIterable<T, R> of(SdkIterable<T> iterable, Functio
3838

3939
@Override
4040
public Iterator<R> iterator() {
41-
return TransformIterator.of(wrappedIterable.iterator(), transformFunction);
41+
return TransformIterator.create(wrappedIterable.iterator(), transformFunction);
4242
}
4343
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/core/TransformIterator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private TransformIterator(Iterator<T> wrappedIterator, Function<T, R> transformF
3131
this.transformFunction = transformFunction;
3232
}
3333

34-
public static <T, R> TransformIterator<T, R> of(Iterator<T> iterator, Function<T, R> transformFunction) {
34+
public static <T, R> TransformIterator<T, R> create(Iterator<T> iterator, Function<T, R> transformFunction) {
3535
return new TransformIterator<>(iterator, transformFunction);
3636
}
3737

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/core/Utils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static <ResponseT, ItemT> Page<ItemT> readAndTransformPaginatedItems(
8888

8989
if (getLastEvaluatedKey.apply(response) == null || getLastEvaluatedKey.apply(response).isEmpty()) {
9090
// Last page
91-
return Page.of(getItems.apply(response)
91+
return Page.create(getItems.apply(response)
9292
.stream()
9393
.map(itemMap -> readAndTransformSingleItem(itemMap,
9494
tableSchema,
@@ -97,7 +97,7 @@ public static <ResponseT, ItemT> Page<ItemT> readAndTransformPaginatedItems(
9797
.collect(Collectors.toList()));
9898
} else {
9999
// More pages to come; add the lastEvaluatedKey
100-
return Page.of(getItems.apply(response)
100+
return Page.create(getItems.apply(response)
101101
.stream()
102102
.map(itemMap -> readAndTransformSingleItem(itemMap,
103103
tableSchema,
@@ -114,7 +114,7 @@ public static <T> Key createKeyFromItem(T item, TableSchema<T> tableSchema, Stri
114114
AttributeValue partitionKeyValue = tableSchema.attributeValue(item, partitionKeyName);
115115
Optional<AttributeValue> sortKeyValue = sortKeyName.map(key -> tableSchema.attributeValue(item, key));
116116

117-
return sortKeyValue.map(attributeValue -> Key.of(partitionKeyValue, attributeValue))
118-
.orElseGet(() -> Key.of(partitionKeyValue));
117+
return sortKeyValue.map(attributeValue -> Key.create(partitionKeyValue, attributeValue))
118+
.orElseGet(() -> Key.create(partitionKeyValue));
119119
}
120120
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/extensions/ChainMapperExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private ChainMapperExtension(List<MapperExtension> mapperExtensions) {
6464
* @param mapperExtensions A list of {@link MapperExtension} to chain together.
6565
* @return A constructed {@link ChainMapperExtension} object.
6666
*/
67-
public static ChainMapperExtension of(MapperExtension... mapperExtensions) {
67+
public static ChainMapperExtension create(MapperExtension... mapperExtensions) {
6868
return new ChainMapperExtension(Arrays.asList(mapperExtensions));
6969
}
7070

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/operations/BatchGetItem.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ private BatchGetItem(Collection<ReadBatch> readBatches) {
5151
this.readBatches = readBatches;
5252
}
5353

54-
public static BatchGetItem of(Collection<ReadBatch> readBatches) {
54+
public static BatchGetItem create(Collection<ReadBatch> readBatches) {
5555
return new BatchGetItem(readBatches);
5656
}
5757

58-
public static BatchGetItem of(ReadBatch... readBatches) {
58+
public static BatchGetItem create(ReadBatch... readBatches) {
5959
return new BatchGetItem(Arrays.asList(readBatches));
6060
}
6161

@@ -150,7 +150,7 @@ public <T> List<T> getResultsForTable(MappedTable<T> mappedTable) {
150150
return results.stream()
151151
.map(itemMap -> readAndTransformSingleItem(itemMap,
152152
mappedTable.tableSchema(),
153-
OperationContext.of(mappedTable.tableName()),
153+
OperationContext.create(mappedTable.tableName()),
154154
mapperExtension))
155155
.collect(Collectors.toList());
156156
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/operations/BatchWriteItem.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ private BatchWriteItem(Collection<WriteBatch> writeBatches) {
5252
this.writeBatches = writeBatches;
5353
}
5454

55-
public static BatchWriteItem of(Collection<WriteBatch> writeBatches) {
55+
public static BatchWriteItem create(Collection<WriteBatch> writeBatches) {
5656
return new BatchWriteItem(writeBatches);
5757
}
5858

59-
public static BatchWriteItem of(WriteBatch... writeBatches) {
59+
public static BatchWriteItem create(WriteBatch... writeBatches) {
6060
return new BatchWriteItem(Arrays.asList(writeBatches));
6161
}
6262

@@ -151,7 +151,7 @@ public <T> List<T> unprocessedPutItemsForTable(MappedTable<T> mappedTable) {
151151
.map(PutRequest::item)
152152
.map(item -> readAndTransformSingleItem(item,
153153
mappedTable.tableSchema(),
154-
OperationContext.of(mappedTable.tableName()),
154+
OperationContext.create(mappedTable.tableName()),
155155
mappedTable.mapperExtension()))
156156
.collect(Collectors.toList());
157157
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/operations/ConditionCheck.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ private ConditionCheck(Key key, Expression conditionExpression) {
3434
this.conditionExpression = conditionExpression;
3535
}
3636

37-
public static <T> ConditionCheck<T> of(Key key, Expression conditionExpression) {
37+
public static <T> ConditionCheck<T> create(Key key, Expression conditionExpression) {
3838
return new ConditionCheck<>(key, conditionExpression);
3939
}
4040

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/operations/CreateTable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private CreateTable(ProvisionedThroughput provisionedThroughput,
5656
this.globalSecondaryIndices = globalSecondaryIndices;
5757
}
5858

59-
public static <T> CreateTable<T> of(ProvisionedThroughput provisionedThroughput) {
59+
public static <T> CreateTable<T> create(ProvisionedThroughput provisionedThroughput) {
6060
return new CreateTable<>(provisionedThroughput, null, null);
6161
}
6262

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/operations/DeleteItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private DeleteItem(Builder b) {
5454
this.conditionExpression = b.conditionExpression;
5555
}
5656

57-
public static <T> DeleteItem<T> of(Key key) {
57+
public static <T> DeleteItem<T> create(Key key) {
5858
return DeleteItem.builder().key(key).build();
5959
}
6060

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/operations/GetItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ private GetItem(Key key, Boolean consistentRead) {
4949
this.consistentRead = consistentRead;
5050
}
5151

52-
public static <T> GetItem<T> of(Key key) {
52+
public static <T> GetItem<T> create(Key key) {
5353
return new GetItem<>(key, null);
5454
}
5555

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/operations/GlobalSecondaryIndex.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ private GlobalSecondaryIndex(String indexName, Projection projection, Provisione
3131
this.provisionedThroughput = provisionedThroughput;
3232
}
3333

34-
public static GlobalSecondaryIndex of(String indexName,
35-
Projection projection,
36-
ProvisionedThroughput provisionedThroughput) {
34+
public static GlobalSecondaryIndex create(String indexName,
35+
Projection projection,
36+
ProvisionedThroughput provisionedThroughput) {
3737

3838
return new GlobalSecondaryIndex(indexName, projection, provisionedThroughput);
3939
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/operations/LocalSecondaryIndex.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ private LocalSecondaryIndex(String indexName, Projection projection) {
2828
this.projection = projection;
2929
}
3030

31-
public static LocalSecondaryIndex of(String indexName,
32-
Projection projection) {
31+
public static LocalSecondaryIndex create(String indexName,
32+
Projection projection) {
3333

3434
return new LocalSecondaryIndex(indexName, projection);
3535
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/operations/PutItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ private PutItem(Builder<T> b) {
5353
this.conditionExpression = b.conditionExpression;
5454
}
5555

56-
public static <T> PutItem<T> of(T item) {
56+
public static <T> PutItem<T> create(T item) {
5757
return PutItem.builder().item(item).build();
5858
}
5959

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/operations/Query.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private Query(QueryConditional queryConditional,
6363
this.filterExpression = filterExpression;
6464
}
6565

66-
public static <T> Query<T> of(QueryConditional queryConditional) {
66+
public static <T> Query<T> create(QueryConditional queryConditional) {
6767
return new Query<>(queryConditional, null, null, null, null, null);
6868
}
6969

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/operations/ReadBatch.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ private ReadBatch(MappedTableResource<T> mappedTableResource, Collection<Batchab
4141
this.readOperations = readOperations;
4242
}
4343

44-
public static <T> ReadBatch<T> of(MappedTableResource<T> mappedTableResource,
44+
public static <T> ReadBatch<T> create(MappedTableResource<T> mappedTableResource,
4545
Collection<BatchableReadOperation> readOperations) {
4646
return new ReadBatch<>(mappedTableResource, readOperations);
4747
}
4848

49-
public static <T> ReadBatch<T> of(MappedTableResource<T> mappedTableResource,
49+
public static <T> ReadBatch<T> create(MappedTableResource<T> mappedTableResource,
5050
BatchableReadOperation... readOperations) {
5151
return new ReadBatch<>(mappedTableResource, Arrays.asList(readOperations));
5252
}

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/extensions/dynamodb/mappingclient/operations/ReadTransaction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private ReadTransaction(MappedTableResource<T> mappedTableResource, Transactable
3131
this.readOperation = readOperation;
3232
}
3333

34-
public static <T> ReadTransaction<T> of(MappedTableResource<T> mappedTableResource,
34+
public static <T> ReadTransaction<T> create(MappedTableResource<T> mappedTableResource,
3535
TransactableReadOperation<T> readOperation) {
3636

3737
return new ReadTransaction<>(mappedTableResource, readOperation);
@@ -47,7 +47,7 @@ public TransactableReadOperation<T> readOperation() {
4747

4848
TransactGetItem generateTransactGetItem() {
4949
return readOperation.generateTransactGetItem(mappedTableResource.tableSchema(),
50-
OperationContext.of(mappedTableResource.tableName()),
50+
OperationContext.create(mappedTableResource.tableName()),
5151
mappedTableResource.mapperExtension());
5252
}
5353

0 commit comments

Comments
 (0)