public class DefaultDBCallback extends BasicBSONCallback implements DBCallback
| 限定符和类型 | 字段和说明 |
|---|---|
static DBCallbackFactory |
FACTORY |
| 构造器和说明 |
|---|
DefaultDBCallback(DBCollection collection)
Creates a new DefaultDBCallback.
|
| 限定符和类型 | 方法和说明 |
|---|---|
BSONObject |
create()
Factory method for creating a new BSONObject.
|
BSONObject |
create(boolean array,
java.util.List<java.lang.String> path)
Helper method to create either a BSON Object or a BSON List depending upon whether the
array parameter is true or not. |
void |
gotDBRef(java.lang.String name,
java.lang.String namespace,
ObjectId id)
Invoked when
BSONDecoder encountered a BsonType.DB_POINTER type field in a byte sequence. |
java.lang.Object |
objectDone()
Called at the end of the document/array, and returns this object.
|
_put, arrayDone, arrayStart, arrayStart, createBSONCallback, createList, cur, curName, get, gotBinary, gotBinaryArray, gotBoolean, gotCode, gotCodeWScope, gotDate, gotDouble, gotInt, gotLong, gotMaxKey, gotMinKey, gotNull, gotObjectId, gotRegex, gotString, gotSymbol, gotTimestamp, gotUndefined, gotUUID, isStackEmpty, objectStart, objectStart, reset, setRootclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitarrayDone, arrayStart, arrayStart, createBSONCallback, get, gotBinary, gotBinaryArray, gotBoolean, gotCode, gotCodeWScope, gotDate, gotDouble, gotInt, gotLong, gotMaxKey, gotMinKey, gotNull, gotObjectId, gotRegex, gotString, gotSymbol, gotTimestamp, gotUndefined, gotUUID, objectStart, objectStart, resetpublic static final DBCallbackFactory FACTORY
public DefaultDBCallback(DBCollection collection)
DBCollectionObjectFactory to create documents, otherwise
it uses the collection's object factory.collection - an optionally null Collection that the documents created by this callback belong to.public BSONObject create()
BasicBSONCallbackcreate 在类中 BasicBSONCallbackpublic BSONObject create(boolean array, java.util.List<java.lang.String> path)
BasicBSONCallbackarray parameter is true or not.create 在类中 BasicBSONCallbackarray - set to true to create a new BSON List, otherwise will create a new BSONObjectpath - a list of field names to navigate to this field in the documentpublic void gotDBRef(java.lang.String name,
java.lang.String namespace,
ObjectId id)
BSONCallbackBSONDecoder encountered a BsonType.DB_POINTER type field in a byte sequence.gotDBRef 在接口中 BSONCallbackgotDBRef 在类中 BasicBSONCallbackname - the name of the fieldnamespace - the namespace to which reference is pointing toid - the if of the object to which reference is pointing topublic java.lang.Object objectDone()
BSONCallbackobjectDone 在接口中 BSONCallbackobjectDone 在类中 BasicBSONCallback