/** * Get the {@link MongoDbFactory} object associated with the only MongoDB service bound to the app. * * This is equivalent to the {@code <cloud:mongo-db-factory/>} element. * * @return mongo db factory * @throws CloudException * if there are either 0 or more than 1 mongodb services. */ @Override public MongoDbFactory mongoDbFactory() { return mongoDbFactory((MongoDbFactoryConfig) null); }
/** * Get the {@link MongoDbFactory} object associated with the only MongoDB service bound to the app. * * This is equivalent to the {@code <cloud:mongo-db-factory/>} element. * * @return mongo db factory * @throws CloudException * if there are either 0 or more than 1 mongodb services. */ @Override public MongoDbFactory mongoDbFactory() { return mongoDbFactory((MongoDbFactoryConfig) null); }
/** * Get the {@link MongoDbFactory} object for the specified MongoDB service. * * This is equivalent to the {@code <cloud:mongo-db-factory service-id="serviceId">} element. * * @param serviceId * the name of the service * @return mongo db factory * @throws CloudException * if the specified service doesn't exist */ @Override public MongoDbFactory mongoDbFactory(String serviceId) { return mongoDbFactory(serviceId, null); }
/** * Get the {@link MongoDbFactory} object for the specified MongoDB service. * * This is equivalent to the {@code <cloud:mongo-db-factory service-id="serviceId">} element. * * @param serviceId * the name of the service * @return mongo db factory * @throws CloudException * if the specified service doesn't exist */ @Override public MongoDbFactory mongoDbFactory(String serviceId) { return mongoDbFactory(serviceId, null); }