Package com.mongodb

Class DefaultDBCallback

java.lang.Object
org.bson.BasicBSONCallback
com.mongodb.DefaultDBCallback
All Implemented Interfaces:
DBCallback, BSONCallback

@Deprecated(since="2021-05-27") public class DefaultDBCallback extends BasicBSONCallback implements DBCallback
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
An implementation of DBCallback that decodes into a DBObject.
  • Field Details

  • Constructor Details

    • DefaultDBCallback

      public DefaultDBCallback(DBCollection collection)
      Deprecated.
      Creates a new DefaultDBCallback. If the Collection is null, it uses DBCollectionObjectFactory to create documents, otherwise it uses the collection's object factory.
      Parameters:
      collection - an optionally null Collection that the documents created by this callback belong to.
  • Method Details

    • create

      public BSONObject create()
      Deprecated.
      Description copied from class: BasicBSONCallback
      Factory method for creating a new BSONObject.
      Overrides:
      create in class BasicBSONCallback
      Returns:
      a new BasicBSONObject.
    • create

      public BSONObject create(boolean array, List<String> path)
      Deprecated.
      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.
      Overrides:
      create in class BasicBSONCallback
      Parameters:
      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
      Returns:
      the new BSONObject
    • gotDBRef

      public void gotDBRef(String name, String namespace, ObjectId id)
      Deprecated.
      Description copied from interface: BSONCallback
      Invoked when BSONDecoder encountered a BsonType.DB_POINTER type field in a byte sequence.
      Specified by:
      gotDBRef in interface BSONCallback
      Overrides:
      gotDBRef in class BasicBSONCallback
      Parameters:
      name - the name of the field
      namespace - the namespace to which reference is pointing to
      id - the if of the object to which reference is pointing to
    • objectDone

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