// primary keys against one table
final List<PrimaryKey> pks = tableKeysAndAttributes.getPrimaryKeys();
final List<Map<String,AttributeValue>> keys = new ArrayList<Map<String,AttributeValue>>(pks.size());
for (PrimaryKey pk: pks)
keys.add(InternalUtils.toAttributeValueMap(pk));
final KeysAndAttributes keysAndAttrs = new KeysAndAttributes()
.withAttributesToGet(attrNames)
.withConsistentRead(tableKeysAndAttributes.isConsistentRead())
.withKeys(keys)
.withProjectionExpression(tableKeysAndAttributes.getProjectionExpression())
.withExpressionAttributeNames(tableKeysAndAttributes.getNameMap())