/** * @return true if updated, false if inserted or none effected */ public boolean getUpdatedExisting() { return wr.isUpdateOfExisting(); }
/** * @return true if updated, false if inserted or none effected */ public boolean getUpdatedExisting() { return wr.isUpdateOfExisting(); }
/** * Returns true if this write resulted in an update of an existing document. * * @return whether the write resulted in an update of an existing document. */ public boolean isUpdateOfExisting() { return writeResult.isUpdateOfExisting(); }
public boolean deleteDocumentById(final DBObject o) { connect(); final WriteResult wr = coll.remove(o); return wr.isUpdateOfExisting(); }
if (!result.isUpdateOfExisting()) return false;
@Override public boolean upsert(ID id, E data) { Object idObject = mongoOperations.getConverter().convertToMongoType(id); DBObject dbObject = getDbObject(data); dbObject.removeField("_id"); Update update = new Update(); setField("", dbObject, update); return mongoOperations.upsert(Query.query(Criteria.where("_id").is(idObject)), update, metadata.getCollectionName()).isUpdateOfExisting(); }