Class MongoNamespace
On this page
io.realm.mongodb.mongo
A MongoDB namespace, which includes a database name and collection name.
Constructors
Constructor and Description |
---|
Construct an instance for the given full name. |
Construct an instance from the given database name and collection name. |
Field Summary
Modifier and Type | Field and Description |
---|---|
public static final String |
Method Summary
Modifier and Type | Method and Description |
---|---|
public static void | Check the validity of the given collection name. |
public static void | Check the validity of the given database name. |
public boolean | |
public String | Gets the collection name. |
public String | Gets the database name. |
public String | getFullName () Gets the full name, which is the database name and the collection name, separated by a period. |
public int | hashCode () |
public String | toString () Returns the standard MongoDB representation of a namespace, which is |
Inherited Methods
Methods inherited from class java.lang.Object :
getClass
,hashCode
,equals
,clone
,toString
,notify
,notifyAll
,wait
,wait
,wait
,finalize
Field Detail
COMMAND_COLLECTION_NAME
Constructor Detail
Construct an instance for the given full name. The database name is the string preceding the first Parameters
|
Construct an instance from the given database name and collection name. Parameters
|
Method Detail
checkCollectionNameValidity
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
Throws
|
checkDatabaseNameValidity
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: Parameters
Throws
|
equals
getCollectionName
public String getCollectionName () |
---|
Gets the collection name. Returns the collection name |
getDatabaseName
public String getDatabaseName () |
---|
Gets the database name. Returns the database name |
getFullName
public String getFullName () |
---|
Gets the full name, which is the database name and the collection name, separated by a period. Returns the full name |