Package com.mongodb

Class DefaultDBCallback

    • Constructor Detail

      • DefaultDBCallback

        public DefaultDBCallback​(DBCollection collection)
        Creates a new DefaultDBCallback. If the Collection is null, it uses 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.
    • Method Detail

      • create

        public BSONObject create​(boolean array,
                                 List<String> path)
        Description copied from class: BasicBSONCallback
        Helper method to create either a BSON Object or a BSON List depending upon whether the array parameter is true or not.
        create in class BasicBSONCallback
        array - set to true to create a new BSON List, otherwise will create a new BSONObject
        path - a list of field names to navigate to this field in the document
        the new BSONObject
      • objectDone

        public Object objectDone​()
        Description copied from interface: BSONCallback
        Called at the end of the document/array, and returns this object.
        Specified by:
        objectDone in interface BSONCallback
        objectDone in class BasicBSONCallback
        the Object that has been read from this section of the document.