code: public WriteResult<T, K> update(DBObject query, DBObject object, boolean upsert, boolean multi, WriteConcern concern) throws MongoException {
          return new WriteResult<T, K>(this, dbCollection.update(serializeFields(query), object, upsert, multi, concern));
      }
docs: Performs an update operation.
  
  @param query   search query for old object to update
  @param object  object with which to update <tt>query</tt>
  @param upsert  if the database should create the element if it does not exist
  @param multi   if the update should be applied to all objects matching (db version 1.1.3 and above). An object will
  not be inserted if it does not exist in the collection and upsert=true and multi=true.
  See <a href="http://www.mongodb.org/display/DOCS/Atomic+Operations">http://www.mongodb.org/display/DOCS/Atomic+Operations</a>
  @param concern the write concern
  @return The write result
  @throws MongoException If an error occurred