public final class MongoDbConnection extends AbstractNoSqlConnection<com.mongodb.BasicDBObject,MongoDbObject>
NoSqlConnection
.Constructor and Description |
---|
MongoDbConnection(com.mongodb.DB database,
com.mongodb.WriteConcern writeConcern,
String collectionName,
Boolean isCapped,
Integer collectionSize) |
Modifier and Type | Method and Description |
---|---|
void |
closeImpl() |
MongoDbObject[] |
createList(int length)
Creates an array of the specified length typed to match the
NoSqlObject implementation appropriate for
this provider. |
MongoDbObject |
createObject()
Instantiates and returns a
NoSqlObject instance whose properties can be configured before ultimate
insertion via NoSqlConnection.insertObject(NoSqlObject) . |
void |
insertObject(NoSqlObject<com.mongodb.BasicDBObject> object)
Inserts the given object into the underlying NoSQL database.
|
close, isClosed
public MongoDbObject createObject()
NoSqlConnection
NoSqlObject
instance whose properties can be configured before ultimate
insertion via NoSqlConnection.insertObject(NoSqlObject)
.NoSqlObject
public MongoDbObject[] createList(int length)
NoSqlConnection
NoSqlObject
implementation appropriate for
this provider.length
- the length of the array to create.NoSqlObject
public void insertObject(NoSqlObject<com.mongodb.BasicDBObject> object)
NoSqlConnection
object
- The object to insert.public void closeImpl()
closeImpl
in class AbstractNoSqlConnection<com.mongodb.BasicDBObject,MongoDbObject>
Copyright © 1999-2017 The Apache Software Foundation. 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.