src/main/java/org/mongojack/JacksonMongoCollection.java
/**
     * Performs an update operation.
     * 
     * @param query
     *            search query for old object to update
     * @param document
     *            a document describing the update, which may not be null. The update to apply must include only update operators.
     * @param upsert
     *            if the database should create the element if it does not exist
     * @param concern
     *            the write concern
     * @return The write result
     * @throws MongoWriteException
     *             If the write failed due some other failure specific to the update command
     * @throws MongoWriteConcernException
     *             If the write failed due being unable to fulfill the write concern
     * @throws MongoException
     *             If an error occurred
     */
Performs an update operation.

@param query
search query for old object to update
@param document
a document describing the update, which may not be null. The update to apply must include only update operators.
Performs an update operation . @param query search query for old object to update @param document a document describing the update which may not be null . The update to apply must include only update operators .
public UpdateResult updateOne(Document query, Document document, boolean upsert, WriteConcern concern) throws MongoException, MongoWriteException,
            MongoWriteConcernException {
        query = serializeFields(query);
        if (concern != null) {
            return mongoCollection.withWriteConcern(concern).updateOne(serializeFields(query), serializeFields(document), new UpdateOptions().upsert(
                    upsert));
        } else {
            return mongoCollection.updateOne(serializeFields(query), serializeFields(document), new UpdateOptions().upsert(
                    upsert));
        }
    }
public UpdateResult updateOne ( Document query , Document document , boolean upsert , WriteConcern concern ) throws MongoException , MongoWriteException , MongoWriteConcernException { query = serializeFields ( query ) ; if ( concern != null ) { return mongoCollection . withWriteConcern ( concern ) . updateOne ( serializeFields ( query ) , serializeFields ( document ) , new UpdateOptions ( ) . upsert ( upsert ) ) ; } else { return mongoCollection . updateOne ( serializeFields ( query ) , serializeFields ( document ) , new UpdateOptions ( ) . upsert ( upsert ) ) ; } }
Performs an update operation.
Performs an update operation .