Closeable, AutoCloseable, NoSqlConnection<org.bson.Document,MongoDbDocumentObject>public final class MongoDbConnection extends AbstractNoSqlConnection<org.bson.Document,MongoDbDocumentObject>
NoSqlConnection.| Constructor | Description |
|---|---|
MongoDbConnection(com.mongodb.MongoClient mongoClient,
com.mongodb.client.MongoDatabase mongoDatabase,
String collectionName,
boolean isCapped,
Integer sizeInBytes) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
closeImpl() |
|
MongoDbDocumentObject[] |
createList(int length) |
Creates an array of the specified length typed to match the
NoSqlObject implementation appropriate for
this provider. |
MongoDbDocumentObject |
createObject() |
Instantiates and returns a
NoSqlObject instance whose properties can be configured before ultimate
insertion via NoSqlConnection.insertObject(NoSqlObject). |
void |
insertObject(NoSqlObject<org.bson.Document> object) |
Inserts the given object into the underlying NoSQL database.
|
close, isClosedpublic void closeImpl()
closeImpl in class AbstractNoSqlConnection<org.bson.Document,MongoDbDocumentObject>public MongoDbDocumentObject[] createList(int length)
NoSqlConnectionNoSqlObject implementation appropriate for
this provider.length - the length of the array to create.NoSqlObjectpublic MongoDbDocumentObject createObject()
NoSqlConnectionNoSqlObject instance whose properties can be configured before ultimate
insertion via NoSqlConnection.insertObject(NoSqlObject).NoSqlObjectpublic void insertObject(NoSqlObject<org.bson.Document> object)
NoSqlConnectionobject - The object to insert.Copyright © 1999-2018. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.