com.mongodb
Class CommandResult

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap<java.lang.String,java.lang.Object>
              extended by org.bson.BasicBSONObject
                  extended by com.mongodb.BasicDBObject
                      extended by com.mongodb.CommandResult
All Implemented Interfaces:
DBObject, java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>, BSONObject

public class CommandResult
extends BasicDBObject

A simple wrapper for the result of getLastError() calls, and network (socket) errors.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Method Summary
 java.lang.String getErrorMessage()
           
 MongoException getException()
           
 boolean ok()
           
 void throwOnError()
           
 
Methods inherited from class com.mongodb.BasicDBObject
append, isPartialObject, markAsPartialObject, toString
 
Methods inherited from class org.bson.BasicBSONObject
containsField, containsKey, equals, get, getBoolean, getDouble, getInt, getInt, getLong, getString, put, putAll, putAll, removeField, toMap
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get, removeEldestEntry
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, remove, size, values
 
Methods inherited from class java.util.AbstractMap
hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.bson.BSONObject
containsField, containsKey, get, keySet, put, putAll, putAll, removeField, toMap
 
Methods inherited from interface java.util.Map
containsKey, entrySet, hashCode, isEmpty, keySet, remove, size, values
 

Method Detail

ok

public boolean ok()

getErrorMessage

public java.lang.String getErrorMessage()

getException

public MongoException getException()

throwOnError

public void throwOnError()
                  throws MongoException
Throws:
MongoException