use of com.amazonaws.services.dynamodbv2.model.BatchGetItemResult in project camel by apache.
the class BatchGetItemsCommand method execute.
@Override
public void execute() {
BatchGetItemResult result = ddbClient.batchGetItem(new BatchGetItemRequest().withRequestItems(determineBatchItems()));
Map tmp = new HashMap<>();
tmp.put(DdbConstants.BATCH_RESPONSE, result.getResponses());
tmp.put(DdbConstants.UNPROCESSED_KEYS, result.getUnprocessedKeys());
addToResults(tmp);
}
use of com.amazonaws.services.dynamodbv2.model.BatchGetItemResult in project camel by apache.
the class AmazonDDBClientMock method batchGetItem.
@SuppressWarnings("unchecked")
@Override
public BatchGetItemResult batchGetItem(BatchGetItemRequest batchGetItemRequest) {
this.batchGetItemRequest = batchGetItemRequest;
Map<String, List<Map<String, AttributeValue>>> responseMap = new HashMap<String, List<Map<String, AttributeValue>>>();
List<Map<String, AttributeValue>> p = new ArrayList<Map<String, AttributeValue>>();
p.add(getAttributes());
responseMap.put("DOMAIN1", p);
Map<String, AttributeValue> keysMap = new HashMap<String, AttributeValue>();
keysMap.put("1", new AttributeValue("UNPROCESSED_KEY"));
Map<String, KeysAndAttributes> unprocessedKeys = new HashMap<String, KeysAndAttributes>();
unprocessedKeys.put("DOMAIN1", new KeysAndAttributes().withKeys(keysMap));
return new BatchGetItemResult().withResponses(responseMap).withUnprocessedKeys(unprocessedKeys);
}
Aggregations