Package com.mongodb

Class LazyDBCallback

    • Constructor Detail

      • LazyDBCallback

        public LazyDBCallback​(@Nullable
                              DBCollection collection)
        Construct an instance.
        Parameters:
        collection - the DBCollection containing the document. This parameter is no longer used.
    • Method Detail

      • createObject

        public Object createObject​(byte[] bytes,
                                   int offset)
        Description copied from class: LazyBSONCallback
        Create a LazyBSONObject instance from the given bytes starting from the given offset.
        Overrides:
        createObject in class LazyBSONCallback
        Parameters:
        bytes - the raw BSON bytes
        offset - the offset into the bytes
        Returns:
        the LazyBSONObject
      • createArray

        public List createArray​(byte[] bytes,
                                int offset)
        Description copied from class: LazyBSONCallback
        Create a LazyBSONList from the given bytes starting from the given offset.
        Overrides:
        createArray in class LazyBSONCallback
        Parameters:
        bytes - the raw BSON bytes
        offset - the offset into the bytes
        Returns:
        the LazyBSONList
      • createDBRef

        public Object createDBRef​(String ns,
                                  ObjectId id)
        Description copied from class: LazyBSONCallback
        This is a factory method pattern to create appropriate objects for BSON type DBPointer(0x0c).
        Overrides:
        createDBRef in class LazyBSONCallback
        Parameters:
        ns - the namespace of the reference
        id - the identifier of the reference
        Returns:
        object to be used as reference representation