code: public int handleUpdateFunctions(BasicDBObject query, BasicDBObject update, String collName)
      {
          DBCollection collection = mongoDb.getCollection(collName);
          KunderaCoreUtils.printQuery("Update collection:" + query, showQuery);
          WriteResult result = null;
          try
          {
              result = collection.update(query, update);
          }
          catch (MongoException ex)
          {
              return -1;
          }
          if (result.getN() <= 0)
              return -1;
          return result.getN();
      }
docs: Handle update functions.
  
  @param query
  the query
  @param update
  the update
  @param collName
  the coll name
  @return the int