public class MongoServices
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description | 
|---|
| MongoServices() | 
| Modifier and Type | Method and Description | 
|---|---|
| com.mongodb.MongoClient | getClient(java.lang.String databaseConnectionName)Returns an instance of MongoClient representing a connection to the MongoDB database. | 
public com.mongodb.MongoClient getClient(java.lang.String databaseConnectionName)
Javascript example:
 var client = services.database.mongo.getClient("MongoDB");
 var database = mongoClient.getDatabase("restaurants");
 var collection = database.getCollection("restaurant");
 databaseConnectionName - the name of the Database Connection as configured in the Server Administration Applicationcom.ebasetech.xi.exceptions.FormRuntimeException - if the connection cannot be obtained for any reason