List of usage examples for org.springframework.data.mongodb.core DocumentCallbackHandler processDocument
void processDocument(Document document) throws MongoException, DataAccessException;
From source file:org.springframework.data.mongodb.core.MongoTemplate.java
private void executeQueryInternal(CollectionCallback<DBCursor> collectionCallback, CursorPreparer preparer, DocumentCallbackHandler callbackHandler, String collectionName) { try {//from w w w . ja v a2 s . co m DBCursor cursor = collectionCallback.doInCollection(getAndPrepareCollection(getDb(), collectionName)); if (preparer != null) { cursor = preparer.prepare(cursor); } for (DBObject dbobject : cursor) { callbackHandler.processDocument(dbobject); } } catch (RuntimeException e) { throw potentiallyConvertRuntimeException(e); } }