public class CommandResult extends BasicDBObject
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getErrorMessage()
Gets the error message associated with a failed command.
|
MongoException |
getException()
Utility method to create an exception from a failed command.
|
ServerAddress |
getServerUsed()
Deprecated.
there is no replacement for this method
|
boolean |
ok()
Gets the "ok" field, which is whether this command executed correctly or not.
|
void |
throwOnError()
Throws a
CommandFailureException if the command failed. |
append, copy, isPartialObject, markAsPartialObject, toStringcontainsField, containsKey, equals, get, getBoolean, getBoolean, getDate, getDate, getDouble, getDouble, getInt, getInt, getLong, getLong, getObjectId, getObjectId, getString, getString, hashCode, put, putAll, putAll, removeField, toMapclone, containsKey, entrySet, isEmpty, keySet, remove, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsField, containsKey, get, keySet, put, putAll, putAll, removeField, toMappublic boolean ok()
public java.lang.String getErrorMessage()
public MongoException getException()
public void throwOnError()
CommandFailureException if the command failed. Otherwise, returns normally.MongoExceptionok()@Deprecated public ServerAddress getServerUsed()