public class MemoryCollection extends MongoCollection
| Constructor and Description |
|---|
MemoryCollection(String databaseName,
String collectionName,
String idField) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDocument(org.bson.BSONObject document) |
void |
addIndex(Index index) |
protected Object |
cloneValue(Object value) |
int |
count() |
int |
count(org.bson.BSONObject query) |
org.bson.BSONObject |
findAndModify(org.bson.BSONObject query) |
int |
getNumIndexes() |
org.bson.BSONObject |
getStats() |
protected String |
getSubkey(String key,
int dotPos,
AtomicReference<Integer> matchPos) |
int |
handleDelete(MongoDelete delete) |
org.bson.BSONObject |
handleDistinct(org.bson.BSONObject query) |
int |
handleInsert(MongoInsert insert) |
Iterable<org.bson.BSONObject> |
handleQuery(org.bson.BSONObject queryObject,
int numberToSkip,
int numberToReturn) |
Iterable<org.bson.BSONObject> |
handleQuery(org.bson.BSONObject queryObject,
int numberToSkip,
int numberToReturn,
org.bson.BSONObject fieldSelector) |
org.bson.BSONObject |
handleUpdate(MongoUpdate update) |
void |
removeDocument(org.bson.BSONObject document) |
org.bson.BSONObject |
validate() |
getCollectionName, getFullName, toStringpublic void addIndex(Index index)
addIndex in class MongoCollectionprotected String getSubkey(String key, int dotPos, AtomicReference<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 Iterable<org.bson.BSONObject> handleQuery(org.bson.BSONObject queryObject, int numberToSkip, int numberToReturn) throws MongoServerException
MongoServerExceptionpublic 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 handleInsert(MongoInsert insert) throws MongoServerException
handleInsert in class MongoCollectionMongoServerExceptionpublic int handleDelete(MongoDelete delete) throws MongoServerException
handleDelete in class MongoCollectionMongoServerExceptionpublic org.bson.BSONObject handleUpdate(MongoUpdate update) throws MongoServerException
handleUpdate in class MongoCollectionMongoServerExceptionpublic 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 MongoCollectionCopyright © 2013. All Rights Reserved.