public WriteResult<T, K> update(T query, T object, boolean upsert, boolean multi, WriteConcern concern) throws MongoException {
        return update(convertToBasicDbObject(query), convertToBasicDbObject(object), upsert, multi, concern);
    }
public WriteResult < T , K > update ( T query , T object , boolean upsert , boolean multi , WriteConcern concern ) throws MongoException { return update ( convertToBasicDbObject ( query ) , convertToBasicDbObject ( object ) , upsert , multi , concern ) ; }
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