public class CommandResult extends BasicDBObject
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Method and Description |
---|---|
String |
getErrorMessage()
gets the "errmsg" field which holds the error message
|
MongoException |
getException()
utility method to create an exception with the command name
|
ServerAddress |
getServerUsed() |
boolean |
ok()
gets the "ok" field which is the result of the command
|
void |
throwOnError()
throws an exception containing the cmd name, in case the command failed, or the "err/code" information
|
append, copy, isPartialObject, markAsPartialObject, toString
containsField, containsKey, equals, get, getBoolean, getBoolean, getDate, getDate, getDouble, getDouble, getInt, getInt, getLong, getLong, getObjectId, getObjectId, getString, getString, hashCode, put, putAll, putAll, removeField, toMap
clear, containsValue, get, removeEldestEntry
clone, containsKey, entrySet, isEmpty, keySet, remove, size, values
finalize, getClass, notify, notifyAll, wait, wait, wait
containsField, containsKey, get, keySet, put, putAll, putAll, removeField, toMap
public boolean ok()
public String getErrorMessage()
public MongoException getException()
public void throwOnError()
MongoException
public ServerAddress getServerUsed()