| 191 | } // end of FindColl |
| 192 | |
| 193 | @SuppressWarnings("unchecked") |
| 194 | public boolean AggregateColl(String pipeline) { |
| 195 | if (DEBUG) |
| 196 | System.out.println("AggregateColl: pipeline=" + pipeline); |
| 197 | |
| 198 | try { |
| 199 | Document pipe = Document.parse(pipeline); |
| 200 | ArrayList<?> pip = (ArrayList<?>) pipe.get("pipeline"); |
| 201 | |
| 202 | aggiter = coll.aggregate((List<? extends Bson>) pip); |
| 203 | cursor = aggiter.iterator(); |
| 204 | } catch (MongoException me) { |
| 205 | SetErrmsg(me); |
| 206 | return true; |
| 207 | } // end try/catch |
| 208 | |
| 209 | return false; |
| 210 | } // end of AggregateColl |
| 211 | |
| 212 | public boolean Rewind() { |
| 213 | if (cursor != null) |