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, toStringcontainsField, containsKey, equals, get, getBoolean, getBoolean, getDate, getDate, getDouble, getDouble, getInt, getInt, getLong, getLong, getObjectId, getObjectId, getString, getString, put, putAll, putAll, removeField, toMapclear, containsValue, get, removeEldestEntryclone, containsKey, entrySet, isEmpty, keySet, remove, size, valueshashCodefinalize, getClass, notify, notifyAll, wait, wait, waitcontainsField, containsKey, get, keySet, put, putAll, putAll, removeField, toMappublic boolean ok()
public String getErrorMessage()
public MongoException getException()
public void throwOnError()
MongoExceptionpublic ServerAddress getServerUsed()