code: private boolean addOrUpdateBatch(DBObjectBatch dbObjBatch, BatchResult batchResult) throws IOException {
          Map<String, Map<String, String>> objCurrScalarMap = getCurrentScalars(dbObjBatch);
          Map<String, Map<String, Integer>> targObjShardNos = getLinkTargetShardNumbers(dbObjBatch);
          for (DBObject dbObj : dbObjBatch.getObjects()) {
              checkCommit();
              Map<String, String> currScalarMap = objCurrScalarMap.get(dbObj.getObjectID());  // ok if ID is null
              ObjectResult objResult = addOrUpdateObject(dbObj, currScalarMap, targObjShardNos);
              batchResult.addObjectResult(objResult);
          }
          commitTransaction();
          return true;
      }
docs: accordingly.