}
public static <T> Iterable<T> query(Query q, FetchOptions options, Mapper<T> mapper) {
DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
PreparedQuery pq = ds.prepare(q);
return Iterables.transform(pq.asIterable(), new FromEntityFunction<T>(mapper));
}
public static <T> Iterable<Key> queryKeys(Query q, FetchOptions options, Mapper<T> mapper) {
DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
PreparedQuery pq = ds.prepare(q.setKeysOnly());