public class MemoryCollection
extends de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>
| Constructor and Description |
|---|
MemoryCollection(java.lang.String databaseName,
java.lang.String collectionName,
java.lang.String idField) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Integer |
addDocumentInternal(org.bson.BSONObject document) |
int |
count() |
void |
drop() |
protected java.lang.Integer |
findDocument(org.bson.BSONObject document) |
protected long |
getDataSize() |
protected int |
getDeletedCount() |
protected org.bson.BSONObject |
getDocument(java.lang.Integer position) |
protected int |
getRecordCount() |
protected java.lang.Iterable<org.bson.BSONObject> |
matchDocuments(org.bson.BSONObject query,
org.bson.BSONObject orderBy,
int numberToSkip,
int numberToReturn) |
protected java.lang.Iterable<org.bson.BSONObject> |
matchDocuments(org.bson.BSONObject query,
java.lang.Iterable<java.lang.Integer> keys,
org.bson.BSONObject orderBy,
int numberToSkip,
int numberToReturn) |
protected void |
removeDocumentWithKey(java.lang.Integer position) |
protected void |
updateDataSize(long sizeDelta) |
addDocument, addIndex, count, deleteDocuments, documentMatchesQuery, findAndModify, getCollectionName, getDatabaseName, getFullName, getNumIndexes, getStats, handleDistinct, handleQuery, handleQuery, insertDocuments, queryDocuments, removeDocument, renameTo, toString, updateDocuments, validatepublic MemoryCollection(java.lang.String databaseName,
java.lang.String collectionName,
java.lang.String idField)
protected void updateDataSize(long sizeDelta)
updateDataSize in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>protected long getDataSize()
getDataSize in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>protected java.lang.Integer addDocumentInternal(org.bson.BSONObject document)
addDocumentInternal in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>protected java.lang.Iterable<org.bson.BSONObject> matchDocuments(org.bson.BSONObject query,
java.lang.Iterable<java.lang.Integer> keys,
org.bson.BSONObject orderBy,
int numberToSkip,
int numberToReturn)
throws de.bwaldvogel.mongo.exception.MongoServerException
matchDocuments in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>de.bwaldvogel.mongo.exception.MongoServerExceptionprotected java.lang.Iterable<org.bson.BSONObject> matchDocuments(org.bson.BSONObject query,
org.bson.BSONObject orderBy,
int numberToSkip,
int numberToReturn)
throws de.bwaldvogel.mongo.exception.MongoServerException
matchDocuments in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>de.bwaldvogel.mongo.exception.MongoServerExceptionpublic int count()
protected java.lang.Integer findDocument(org.bson.BSONObject document)
findDocument in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>protected int getRecordCount()
getRecordCount in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>protected int getDeletedCount()
getDeletedCount in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>protected void removeDocumentWithKey(java.lang.Integer position)
removeDocumentWithKey in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>protected org.bson.BSONObject getDocument(java.lang.Integer position)
getDocument in class de.bwaldvogel.mongo.backend.AbstractMongoCollection<java.lang.Integer>public void drop()