@@ -113,7 +113,7 @@ fully documented in the Javadoc of the interfaces referenced in these examples.
113
113
Customer deletedCustomer = customerTable. deleteItem(Key . builder(). partitionValue(" a123" ). sortValue(456 ). build());
114
114
115
115
// Query
116
- PageIterable<Customer > customers = customerTable. query(equalTo (k - > k. partitionValue(" a123" )));
116
+ PageIterable<Customer > customers = customerTable. query(keyEqualTo (k - > k. partitionValue(" a123" )));
117
117
118
118
// Scan
119
119
PageIterable<Customer > customers = customerTable. scan();
@@ -220,6 +220,12 @@ The following requirements must be met for a class annotated with @DynamoDbImmut
220
220
' builder' on the immutable class that takes no parameters and returns an instance of the builder class.
221
221
1. The builder class must have a public method named ' build' that takes no parameters and returns an instance of the
222
222
immutable class.
223
+
224
+ To create a TableSchema for your immutable class, use the static constructor method for immutable classes on TableSchema :
225
+
226
+ ```java
227
+ static final TableSchema<Customer> CUSTOMER_TABLE_SCHEMA = TableSchema.fromImmutableClass(Customer.class);
228
+ ```
223
229
224
230
There are third-party library that help generate a lot of the boilerplate code associated with immutable objects.
225
231
The DynamoDb Enhanced client should work with these libraries as long as they follow the conventions detailed
@@ -276,7 +282,7 @@ key differences:
276
282
application can then subscribe a handler to that publisher and deal
277
283
with the results asynchronously without having to block:
278
284
```java
279
- PagePublisher<Customer> results = mappedTable.query(r -> r.queryConditional(equalTo (k -> k.partitionValue("Smith"))));
285
+ PagePublisher<Customer> results = mappedTable.query(r -> r.queryConditional(keyEqualTo (k -> k.partitionValue("Smith"))));
280
286
results.subscribe(myCustomerResultsProcessor);
281
287
// Perform other work and let the processor handle the results asynchronously
282
288
```
0 commit comments