DBCallback
, BSONCallback
public class LazyDBCallback extends LazyBSONCallback implements DBCallback
BSONCallback
for the creation of LazyDBObject
and LazyDBList
instances.Constructor | Description |
---|---|
LazyDBCallbackβ(DBCollection collection) |
Construct an instance.
|
Modifier and Type | Method | Description |
---|---|---|
List |
createArrayβ(byte[] bytes,
int offset) |
Create a
LazyBSONList from the given bytes starting from the given offset. |
Object |
createDBRefβ(String ns,
ObjectId id) |
This is a factory method pattern to create appropriate objects for BSON type DBPointer(0x0c).
|
Object |
createObjectβ(byte[] bytes,
int offset) |
Create a
LazyBSONObject instance from the given bytes starting from the given offset. |
arrayDone, arrayStart, arrayStart, createBSONCallback, get, gotBinary, gotBinaryArray, gotBoolean, gotCode, gotCodeWScope, gotDate, gotDBRef, gotDecimal128, gotDouble, gotInt, gotLong, gotMaxKey, gotMinKey, gotNull, gotObjectId, gotRegex, gotString, gotSymbol, gotTimestamp, gotUndefined, gotUUID, objectDone, objectStart, objectStart, reset
arrayDone, arrayStart, arrayStart, createBSONCallback, gotBinaryArray, gotBoolean, gotCode, gotCodeWScope, gotDate, gotDBRef, gotDecimal128, gotDouble, gotInt, gotLong, gotMaxKey, gotMinKey, gotNull, gotObjectId, gotRegex, gotString, gotSymbol, gotTimestamp, gotUndefined, gotUUID, objectDone, objectStart, objectStart
get, gotBinary, reset
public LazyDBCallbackβ(@Nullable DBCollection collection)
collection
- the DBCollection
containing the document. This parameter is no longer used.public Object createObjectβ(byte[] bytes, int offset)
LazyBSONCallback
LazyBSONObject
instance from the given bytes starting from the given offset.createObject
in class LazyBSONCallback
bytes
- the raw BSON bytesoffset
- the offset into the bytespublic List createArrayβ(byte[] bytes, int offset)
LazyBSONCallback
LazyBSONList
from the given bytes starting from the given offset.createArray
in class LazyBSONCallback
bytes
- the raw BSON bytesoffset
- the offset into the bytespublic Object createDBRefβ(String ns, ObjectId id)
LazyBSONCallback
createDBRef
in class LazyBSONCallback
ns
- the namespace of the referenceid
- the identifier of the reference