public static final String COMMAND_COLLECTION_NAME
public MongoNamespace(String fullName)
Construct an instance for the given full name. The database name is the string preceding the first "."
character.
fullName
- the non-null full namespace
checkDatabaseNameValidity(String)
, checkCollectionNameValidity(String)
public MongoNamespace(@BsonProperty("db") String databaseName, @BsonProperty("coll") String collectionName)
Construct an instance from the given database name and collection name.
databaseName
- the valid database name
collectionName
- the valid collection name
checkDatabaseNameValidity(String)
, checkCollectionNameValidity(String)
public static void checkDatabaseNameValidity(String databaseName)
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.
databaseName
- the database name
IllegalArgumentException
- if the database name is invalid
public static void checkCollectionNameValidity(String collectionName)
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.
collectionName
- the collection name
IllegalArgumentException
- if the collection name is invalid
@BsonProperty("db") public String getDatabaseName()
Gets the database name.
@BsonProperty("coll") public String getCollectionName()
Gets the collection name.
public String getFullName()
Gets the full name, which is the database name and the collection name, separated by a period.
public String toString()
Returns the standard MongoDB representation of a namespace, which is <database>.<collection>
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4