From a391a25b7fefff6e4f181e78f8010cef9f7c8eab Mon Sep 17 00:00:00 2001
From: Rob Bygrave
* Remember that with {@link QueryIterator} you must call {@link QueryIterator#close()} - * when you have finished iterating the results (typically in a finally block). + * when you have finished iterating the results. Use "try with resources" or ensure it + * is closed in a finally block. *
+ *{@code
*
* Query query = server.find(Customer.class)
@@ -38,6 +40,19 @@ import java.util.Iterator;
* }
*
* }
+ * + *
{@code
+ *
+ * // try with resources
+ * try (QueryIterator it = query.findIterate()) {
+ * while (it.hasNext()) {
+ * Customer customer = it.next();
+ * // do something with customer ...
+ * }
+ * }
+ *
+ * }
*
* @param