|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mongodb.WriteResult
public class WriteResult
This class lets you access the results of the previous write. if you have STRICT mode on, this just stores the result of that getLastError call if you don't, then this will actually do the getlasterror call. if another operation has been done on this connection in the interim, calls will fail
Method Summary | |
---|---|
CommandResult |
getCachedLastError()
Gets the last result from getLastError() |
String |
getError()
Gets the error String ("err" field) |
Object |
getField(String name)
Gets a field |
WriteConcern |
getLastConcern()
Gets the last WriteConcern used when calling getLastError() |
CommandResult |
getLastError()
calls getLastError(com.mongodb.WriteConcern) with concern=null |
CommandResult |
getLastError(WriteConcern concern)
This method does following: - returns the existing CommandResult if concern is null or less strict than the concern it was obtained with - otherwise attempts to obtain a CommandResult by calling getLastError with the concern |
int |
getN()
Gets the "n" field, which contains the number of documents affected in the write operation. |
boolean |
isLazy()
Returns whether or not the result is lazy, meaning that getLastError was not called automatically |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public CommandResult getCachedLastError()
public WriteConcern getLastConcern()
WriteConcern
used when calling getLastError()
public CommandResult getLastError()
getLastError(com.mongodb.WriteConcern)
with concern=null
MongoException
public CommandResult getLastError(WriteConcern concern)
concern
- the concern
MongoException
public String getError()
MongoException
public int getN()
MongoException
public Object getField(String name)
name
- field name
MongoException
public boolean isLazy()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |