public class MemoryCollection extends MongoCollection
| Constructor and Description |
|---|
MemoryCollection(java.lang.String databaseName,
java.lang.String collectionName,
java.lang.String idField) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDocument(org.bson.BSONObject document) |
void |
addIndex(Index index) |
protected java.lang.Object |
cloneValue(java.lang.Object value) |
int |
count() |
int |
count(org.bson.BSONObject query) |
int |
deleteDocuments(org.bson.BSONObject selector,
int limit) |
org.bson.BSONObject |
findAndModify(org.bson.BSONObject query) |
int |
getNumIndexes() |
org.bson.BSONObject |
getStats() |
protected java.lang.String |
getSubkey(java.lang.String key,
int dotPos,
java.util.concurrent.atomic.AtomicReference<java.lang.Integer> matchPos) |
org.bson.BSONObject |
handleDistinct(org.bson.BSONObject query) |
java.lang.Iterable<org.bson.BSONObject> |
handleQuery(org.bson.BSONObject queryObject,
int numberToSkip,
int numberToReturn) |
java.lang.Iterable<org.bson.BSONObject> |
handleQuery(org.bson.BSONObject queryObject,
int numberToSkip,
int numberToReturn,
org.bson.BSONObject fieldSelector) |
int |
insertDocuments(java.util.List<org.bson.BSONObject> documents) |
void |
removeDocument(org.bson.BSONObject document) |
org.bson.BSONObject |
updateDocuments(org.bson.BSONObject selector,
org.bson.BSONObject updateQuery,
boolean isMulti,
boolean isUpsert) |
org.bson.BSONObject |
validate() |
getCollectionName, getFullName, toStringpublic MemoryCollection(java.lang.String databaseName,
java.lang.String collectionName,
java.lang.String idField)
public void addIndex(Index index)
addIndex in class MongoCollectionprotected java.lang.String getSubkey(java.lang.String key,
int dotPos,
java.util.concurrent.atomic.AtomicReference<java.lang.Integer> matchPos)
throws MongoServerError
MongoServerErrorpublic void addDocument(org.bson.BSONObject document)
throws MongoServerException
addDocument in class MongoCollectionMongoServerExceptionpublic void removeDocument(org.bson.BSONObject document)
throws MongoServerException
removeDocument in class MongoCollectionMongoServerExceptionpublic int count()
count in class MongoCollectionpublic org.bson.BSONObject findAndModify(org.bson.BSONObject query)
throws MongoServerException
findAndModify in class MongoCollectionMongoServerExceptionpublic java.lang.Iterable<org.bson.BSONObject> handleQuery(org.bson.BSONObject queryObject,
int numberToSkip,
int numberToReturn)
throws MongoServerException
MongoServerExceptionpublic java.lang.Iterable<org.bson.BSONObject> handleQuery(org.bson.BSONObject queryObject,
int numberToSkip,
int numberToReturn,
org.bson.BSONObject fieldSelector)
throws MongoServerException
handleQuery in class MongoCollectionMongoServerExceptionpublic org.bson.BSONObject handleDistinct(org.bson.BSONObject query)
throws MongoServerException
handleDistinct in class MongoCollectionMongoServerExceptionpublic int insertDocuments(java.util.List<org.bson.BSONObject> documents)
throws MongoServerException
insertDocuments in class MongoCollectionMongoServerExceptionpublic int deleteDocuments(org.bson.BSONObject selector,
int limit)
throws MongoServerException
deleteDocuments in class MongoCollectionMongoServerExceptionpublic org.bson.BSONObject updateDocuments(org.bson.BSONObject selector,
org.bson.BSONObject updateQuery,
boolean isMulti,
boolean isUpsert)
throws MongoServerException
updateDocuments in class MongoCollectionMongoServerExceptionprotected java.lang.Object cloneValue(java.lang.Object value)
public int getNumIndexes()
getNumIndexes in class MongoCollectionpublic int count(org.bson.BSONObject query)
throws MongoServerException
count in class MongoCollectionMongoServerExceptionpublic org.bson.BSONObject getStats()
getStats in class MongoCollectionpublic org.bson.BSONObject validate()
validate in class MongoCollection