}
return parallelScanRequests;
}
private <T> QueryRequest createQueryRequestFromExpression(Class<T> clazz, DynamoDBQueryExpression<T> queryExpression, DynamoDBMapperConfig config) {
QueryRequest queryRequest = new QueryRequest();
queryRequest.setConsistentRead(queryExpression.isConsistentRead());
queryRequest.setTableName(getTableName(clazz, config));
queryRequest.setIndexName(queryExpression.getIndexName());
Map<String, Condition> keyConditions = getHashKeyEqualsConditions(queryExpression.getHashKeyValues());
Map<String, Condition> rangeKeyConditions = queryExpression.getRangeKeyConditions();
if (null != rangeKeyConditions) {
processRangeKeyConditions(clazz, queryRequest, rangeKeyConditions);
keyConditions.putAll(rangeKeyConditions);
}
queryRequest.setKeyConditions(keyConditions);
queryRequest.setScanIndexForward(queryExpression.isScanIndexForward());
queryRequest.setLimit(queryExpression.getLimit());
queryRequest.setExclusiveStartKey(queryExpression.getExclusiveStartKey());
return queryRequest;
}