Class CoreRemoteMongoDatabaseImpl
- java.lang.Object
-
- com.mongodb.stitch.core.services.mongodb.remote.internal.CoreRemoteMongoDatabaseImpl
-
- All Implemented Interfaces:
CoreRemoteMongoDatabase
public class CoreRemoteMongoDatabaseImpl extends Object implements CoreRemoteMongoDatabase
-
-
Method Summary
Modifier and Type Method Description CoreRemoteMongoCollectionImpl<Document>
getCollection(String collectionName)
Gets a collection.<DocumentT>
CoreRemoteMongoCollectionImpl<DocumentT>getCollection(String collectionName, Class<DocumentT> documentClass)
Gets a collection, with a specific default document class.String
getName()
Gets the name of the database.
-
-
-
Method Detail
-
getName
public String getName()
Gets the name of the database.- Specified by:
getName
in interfaceCoreRemoteMongoDatabase
- Returns:
- the database name
-
getCollection
public CoreRemoteMongoCollectionImpl<Document> getCollection(String collectionName)
Gets a collection.- Specified by:
getCollection
in interfaceCoreRemoteMongoDatabase
- Parameters:
collectionName
- the name of the collection to return- Returns:
- the collection
-
getCollection
public <DocumentT> CoreRemoteMongoCollectionImpl<DocumentT> getCollection(String collectionName, Class<DocumentT> documentClass)
Gets a collection, with a specific default document class.- Specified by:
getCollection
in interfaceCoreRemoteMongoDatabase
- Type Parameters:
DocumentT
- the type of the class to use instead ofDocument
.- Parameters:
collectionName
- the name of the collection to returndocumentClass
- the default class to cast any documents returned from the database into.- Returns:
- the collection
-
-