+
+ }
+
+ public static <T> void computeForEach(ReadGraphImpl graph, Read<T> request, ReadEntry<T> entry,
+ AsyncProcedure<T> procedure_) throws DatabaseException {
+
+ AsyncProcedure<T> procedure = entry != null ? entry : procedure_;
+
+ ReadGraphImpl queryGraph = entry != null ? graph.withParent(entry) : graph;
+
+ try {
+
+ T result = request.perform(queryGraph);
+ procedure.execute(graph, result);
+
+ } catch (DatabaseException e) {
+
+ procedure.exception(graph, e);
+
+ } catch (Throwable t) {
+
+ DatabaseException dbe = new DatabaseException(t);
+ procedure.exception(graph, dbe);
+
+ }
+
+ if (entry != null)
+ entry.performFromCache(queryGraph, procedure_);
+