/** * Gets the last {@link com.mongodb.WriteConcern} used when calling getLastError() * * @return The last write concern. */ public WriteConcern getLastConcern() { return writeResult.getLastConcern(); }
/** * Gets the last {@link com.mongodb.WriteConcern} used when calling getLastError() * * @return The last write concern. */ public WriteConcern getLastConcern() { return writeResult.getLastConcern(); }
/** * @param wc * @param wr */ protected void throwOnError(WriteConcern wc, WriteResult wr) { if (wc == null && wr.getLastConcern() == null) { CommandResult cr = wr.getLastError(); if (cr != null && cr.getErrorMessage() != null && cr.getErrorMessage().length() > 0) cr.throwOnError(); } }
protected void throwOnError(final WriteConcern wc, final WriteResult wr) { if (wc == null && wr.getLastConcern() == null) { final CommandResult cr = wr.getLastError(); if (cr != null && cr.getErrorMessage() != null && cr.getErrorMessage().length() != 0) { cr.throwOnError(); } } }
protected void throwOnError(WriteConcern wc, WriteResult wr) { if ( wc == null && wr.getLastConcern() == null) { CommandResult cr = wr.getLastError(); if (cr != null && cr.getErrorMessage() != null && cr.getErrorMessage().length() > 0) cr.throwOnError(); } } public <T> Key<T> save(String kind, T entity) {