Future<QueryResultIterator<Entity>> futureEntities;
AsyncPreparedQuery prepared = new AsyncPreparedQuery(query, txn);
FetchOptions fetchOptions = getRootCommand().getFetchOptions();
if (fetchOptions == null)
{
futureEntities = prepared.asFutureQueryResultIterator();
}
else
{
futureEntities = prepared.asFutureQueryResultIterator(fetchOptions);
}