Package com.mongodb

Class MongoNamespace


  • @Immutable
    @Deprecated(since="2021-05-27")
    public final class MongoNamespace
    extends java.lang.Object
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    A MongoDB namespace, which includes a database name and collection name.
    Since:
    3.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String COMMAND_COLLECTION_NAME
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Constructor Description
      MongoNamespace​(java.lang.String fullName)
      Deprecated.
      Construct an instance for the given full name.
      MongoNamespace​(java.lang.String databaseName, java.lang.String collectionName)
      Deprecated.
      Construct an instance from the given database name and collection name.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void checkCollectionNameValidity​(java.lang.String collectionName)
      Deprecated.
      Check the validity of the given collection name.
      static void checkDatabaseNameValidity​(java.lang.String databaseName)
      Deprecated.
      Check the validity of the given database name.
      boolean equals​(java.lang.Object o)
      Deprecated.
       
      java.lang.String getCollectionName()
      Deprecated.
      Gets the collection name.
      java.lang.String getDatabaseName()
      Deprecated.
      Gets the database name.
      java.lang.String getFullName()
      Deprecated.
      Gets the full name, which is the database name and the collection name, separated by a period.
      int hashCode()
      Deprecated.
       
      java.lang.String toString()
      Deprecated.
      Returns the standard MongoDB representation of a namespace, which is <database>.<collection>.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • COMMAND_COLLECTION_NAME

        public static final java.lang.String COMMAND_COLLECTION_NAME
        Deprecated.
        See Also:
        Constant Field Values
    • Method Detail

      • checkDatabaseNameValidity

        public static void checkDatabaseNameValidity​(java.lang.String databaseName)
        Deprecated.
        Check the validity of the given database name. A valid database name is non-null, non-empty, and does not contain any of the following characters: '\0', '/', '\\', ' ', '"', '.'. The server may impose additional restrictions on database names.
        Parameters:
        databaseName - the database name
        Throws:
        java.lang.IllegalArgumentException - if the database name is invalid
        Since:
        3.4
      • checkCollectionNameValidity

        public static void checkCollectionNameValidity​(java.lang.String collectionName)
        Deprecated.
        Check the validity of the given collection name. A valid collection name is non-null and non-empty. The server may impose additional restrictions on collection names.
        Parameters:
        collectionName - the collection name
        Throws:
        java.lang.IllegalArgumentException - if the collection name is invalid
        Since:
        3.4
      • getDatabaseName

        @BsonProperty("db")
        public java.lang.String getDatabaseName()
        Deprecated.
        Gets the database name.
        Returns:
        the database name
      • getCollectionName

        @BsonProperty("coll")
        public java.lang.String getCollectionName()
        Deprecated.
        Gets the collection name.
        Returns:
        the collection name
      • getFullName

        public java.lang.String getFullName()
        Deprecated.
        Gets the full name, which is the database name and the collection name, separated by a period.
        Returns:
        the full name
      • equals

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

        public java.lang.String toString()
        Deprecated.
        Returns the standard MongoDB representation of a namespace, which is <database>.<collection>.
        Overrides:
        toString in class java.lang.Object
        Returns:
        string representation of the namespace.
      • hashCode

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