code: private ObjectResult addOrUpdateObject(DBObject                          dbObj,
                                             Map<String, String>               currScalarMap,
                                             Map<String, Map<String, Integer>> targObjShardNos)
              throws IOException {
          ObjectUpdater objUpdater = new ObjectUpdater(m_tableDef);
          if (targObjShardNos.size() > 0) {
              objUpdater.setTargetObjectShardNumbers(targObjShardNos);
          }
          if (currScalarMap == null || currScalarMap.size() == 0) {
              return objUpdater.addNewObject(m_parentTran, dbObj);
          } else {
              return objUpdater.updateObject(m_parentTran, dbObj, currScalarMap);
          }
      }
docs: Add the given object if its current-value map is null, otherwise update the object.