}
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());
// Hash key (primary or index) conditions
Map<String, Condition> hashKeyConditions = getHashKeyEqualsConditions(queryExpression.getHashKeyValues());
// Range key (primary or index) conditions
Map<String, Condition> rangeKeyConditions = queryExpression.getRangeKeyConditions();
processKeyConditions(clazz, queryRequest, hashKeyConditions, rangeKeyConditions);
queryRequest.setScanIndexForward(queryExpression.isScanIndexForward());
queryRequest.setLimit(queryExpression.getLimit());
queryRequest.setExclusiveStartKey(queryExpression.getExclusiveStartKey());
queryRequest.setQueryFilter(queryExpression.getQueryFilter());
queryRequest.setConditionalOperator(queryExpression.getConditionalOperator());
queryRequest.setRequestMetricCollector(config.getRequestMetricCollector());
return queryRequest;
}