| 175 | } // end of FindColl |
| 176 | |
| 177 | @SuppressWarnings("unchecked") |
| 178 | public boolean AggregateColl(String pipeline) { |
| 179 | if (DEBUG) |
| 180 | System.out.println("AggregateColl: pipeline=" + pipeline); |
| 181 | |
| 182 | try { |
| 183 | DBObject pipe = (DBObject) JSON.parse(pipeline); |
| 184 | |
| 185 | pip = (List<DBObject>) pipe.get("pipeline"); |
| 186 | aop = AggregationOptions.builder().batchSize(0).allowDiskUse(true) |
| 187 | .outputMode(AggregationOptions.OutputMode.CURSOR).build(); |
| 188 | cursor = coll.aggregate(pip, aop); |
| 189 | } catch (MongoException me) { |
| 190 | SetErrmsg(me); |
| 191 | return true; |
| 192 | } // end try/catch |
| 193 | |
| 194 | return false; |
| 195 | } // end of AggregateColl |
| 196 | |
| 197 | public boolean Rewind() { |
| 198 | if (cursor != null) |