public interface HelperMongo extends Terminable
EMPTY| Modifier and Type | Method and Description |
|---|---|
com.mongodb.MongoClient |
getClient()
Gets the client instance backing the datasource
|
com.mongodb.client.MongoDatabase |
getDatabase()
Gets the main database in use by the instance.
|
com.mongodb.client.MongoDatabase |
getDatabase(String name)
Gets a specific database instance
|
org.mongodb.morphia.Morphia |
getMorphia()
Gets the Morphia instance for this datasource
|
org.mongodb.morphia.Datastore |
getMorphiaDatastore()
Gets the main Morphia datastore in use by the instance
|
org.mongodb.morphia.Datastore |
getMorphiaDatastore(String name)
Gets a specific Morphia datastore instance
|
static HelperMongo |
usingMongoDb(MongoDatabaseCredentials credentials) |
bindWith, close, hasTerminated, of, terminate@Nonnull static HelperMongo usingMongoDb(@Nonnull MongoDatabaseCredentials credentials)
@Nonnull com.mongodb.MongoClient getClient()
@Nonnull com.mongodb.client.MongoDatabase getDatabase()
com.mongodb.client.MongoDatabase getDatabase(String name)
name - the name of the databaseorg.mongodb.morphia.Morphia getMorphia()
org.mongodb.morphia.Datastore getMorphiaDatastore()
org.mongodb.morphia.Datastore getMorphiaDatastore(String name)
name - the name of the databaseCopyright © 2017. All rights reserved.