Package com.mongodb
Class LazyDBCallback
- java.lang.Object
-
- org.bson.EmptyBSONCallback
-
- org.bson.LazyBSONCallback
-
- com.mongodb.LazyDBCallback
-
- All Implemented Interfaces:
DBCallback,BSONCallback
public class LazyDBCallback extends LazyBSONCallback implements DBCallback
ABSONCallbackfor the creation ofLazyDBObjectandLazyDBListinstances.
-
-
Constructor Summary
Constructors Constructor Description LazyDBCallback(DBCollection collection)Construct an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListcreateArray(byte[] bytes, int offset)Create aLazyBSONListfrom the given bytes starting from the given offset.ObjectcreateDBRef(String ns, ObjectId id)This is a factory method pattern to create appropriate objects for BSON type DBPointer(0x0c).ObjectcreateObject(byte[] bytes, int offset)Create aLazyBSONObjectinstance from the given bytes starting from the given offset.-
Methods inherited from interface org.bson.BSONCallback
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
-
Methods inherited from class org.bson.EmptyBSONCallback
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
-
Methods inherited from class org.bson.LazyBSONCallback
get, gotBinary, reset
-
-
-
-
Constructor Detail
-
LazyDBCallback
public LazyDBCallback(@Nullable DBCollection collection)
Construct an instance.- Parameters:
collection- theDBCollectioncontaining the document. This parameter is no longer used.
-
-
Method Detail
-
createObject
public Object createObject(byte[] bytes, int offset)
Description copied from class:LazyBSONCallbackCreate aLazyBSONObjectinstance from the given bytes starting from the given offset.- Overrides:
createObjectin classLazyBSONCallback- Parameters:
bytes- the raw BSON bytesoffset- the offset into the bytes- Returns:
- the LazyBSONObject
-
createArray
public List createArray(byte[] bytes, int offset)
Description copied from class:LazyBSONCallbackCreate aLazyBSONListfrom the given bytes starting from the given offset.- Overrides:
createArrayin classLazyBSONCallback- Parameters:
bytes- the raw BSON bytesoffset- the offset into the bytes- Returns:
- the LazyBSONList
-
createDBRef
public Object createDBRef(String ns, ObjectId id)
Description copied from class:LazyBSONCallbackThis is a factory method pattern to create appropriate objects for BSON type DBPointer(0x0c).- Overrides:
createDBRefin classLazyBSONCallback- Parameters:
ns- the namespace of the referenceid- the identifier of the reference- Returns:
- object to be used as reference representation
-
-