public class MongoClientSession extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
protected ch.exense.commons.app.Configuration |
configuration |
protected String |
db |
protected com.mongodb.MongoClient |
mongoClient |
Constructor and Description |
---|
MongoClientSession(ch.exense.commons.app.Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.jongo.MongoCollection |
getJongoCollection(String collectionName) |
com.mongodb.client.MongoDatabase |
getMongoDatabase() |
protected void |
initMongoClient() |
protected com.mongodb.MongoClient mongoClient
protected String db
protected ch.exense.commons.app.Configuration configuration
public MongoClientSession(ch.exense.commons.app.Configuration configuration)
protected void initMongoClient()
public com.mongodb.client.MongoDatabase getMongoDatabase()
public org.jongo.MongoCollection getJongoCollection(String collectionName)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2020. All rights reserved.