Package com.mongodb

Class DBRef

  • All Implemented Interfaces:
    java.io.Serializable

    @Deprecated(since="2021-05-27")
    public class DBRef
    extends java.lang.Object
    implements java.io.Serializable
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    A representation of a database reference.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      DBRef​(java.lang.String collectionName, java.lang.Object id)
      Deprecated.
      Construct an instance.
      DBRef​(java.lang.String databaseName, java.lang.String collectionName, java.lang.Object id)
      Deprecated.
      Construct an instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Deprecated.
       
      java.lang.String getCollectionName()
      Deprecated.
      Gets the name of the collection in which the referenced document is stored.
      java.lang.String getDatabaseName()
      Deprecated.
      Gets the name of the database in which the referenced document is stored.
      java.lang.Object getId()
      Deprecated.
      Gets the _id of the referenced document
      int hashCode()
      Deprecated.
       
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DBRef

        public DBRef​(java.lang.String collectionName,
                     java.lang.Object id)
        Deprecated.
        Construct an instance.
        Parameters:
        collectionName - the name of the collection where the document is stored
        id - the object id
      • DBRef

        public DBRef​(@Nullable
                     java.lang.String databaseName,
                     java.lang.String collectionName,
                     java.lang.Object id)
        Deprecated.
        Construct an instance.
        Parameters:
        databaseName - the name of the database where the document is stored
        collectionName - the name of the collection where the document is stored
        id - the object id
        Since:
        3.3
    • Method Detail

      • getId

        public java.lang.Object getId()
        Deprecated.
        Gets the _id of the referenced document
        Returns:
        the _id of the referenced document
      • getCollectionName

        public java.lang.String getCollectionName()
        Deprecated.
        Gets the name of the collection in which the referenced document is stored.
        Returns:
        the name of the collection in which the referenced is stored
      • getDatabaseName

        @Nullable
        public java.lang.String getDatabaseName()
        Deprecated.
        Gets the name of the database in which the referenced document is stored. A null value implies that the referenced document is stored in the same database as the referring document.
        Returns:
        the possibly-null database name
        Since:
        3.3
      • equals

        public boolean equals​(java.lang.Object o)
        Deprecated.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object