public class MongoDBVLargeCollection extends MongoDBVCollection implements VLargeCollection
InputStream
s in MongoDB's
GridFS
.OID, UID
Constructor and Description |
---|
MongoDBVLargeCollection(com.mongodb.DBCollection delegate,
com.mongodb.gridfs.GridFS gridFS,
MongoDBVBranch branch,
VCounter counter)
Creates a new MongoDBVLargeCollection.
|
MongoDBVLargeCollection(com.mongodb.DBCollection delegate,
com.mongodb.gridfs.GridFS gridFS,
MongoDBVBranch branch,
VCounter counter,
AccessStrategy accessStrategy)
Creates a new MongoDBVLargeCollection with a special access strategy
for large binary objects.
|
Modifier and Type | Method and Description |
---|---|
protected VCursor |
createCursor(com.mongodb.DBCursor delegate,
Filter<com.mongodb.DBObject> filter)
Creates a new cursor.
|
java.util.Map<java.lang.String,java.lang.Object> |
findOne(java.util.Map<java.lang.String,java.lang.Object> example)
Finds an object that matches the given example
|
void |
insert(java.util.Map<java.lang.String,java.lang.Object> obj)
Inserts a new object to the collection.
|
delete, delete, find, find, find, getCounter, getName
public MongoDBVLargeCollection(com.mongodb.DBCollection delegate, com.mongodb.gridfs.GridFS gridFS, MongoDBVBranch branch, VCounter counter)
delegate
- the actual MongoDB collectiongridFS
- the MongoDB GridFS storing binary databranch
- the branch currently checked outcounter
- a counter to generate unique IDspublic MongoDBVLargeCollection(com.mongodb.DBCollection delegate, com.mongodb.gridfs.GridFS gridFS, MongoDBVBranch branch, VCounter counter, AccessStrategy accessStrategy)
delegate
- the actual MongoDB collectiongridFS
- the MongoDB GridFS storing binary databranch
- the branch currently checked outcounter
- a counter to generate unique IDsaccessStrategy
- the strategy that should be used to access large objectspublic void insert(java.util.Map<java.lang.String,java.lang.Object> obj)
VCollection
uid
attribute.insert
in interface VCollection
insert
in class MongoDBVCollection
obj
- the object to add to the collectionprotected VCursor createCursor(com.mongodb.DBCursor delegate, Filter<com.mongodb.DBObject> filter)
MongoDBVCollection
createCursor
in class MongoDBVCollection
delegate
- the actual MongoDB cursorfilter
- a filter which decides if a DBObject should be included
into the cursor's result or not (can be null)public java.util.Map<java.lang.String,java.lang.Object> findOne(java.util.Map<java.lang.String,java.lang.Object> example)
VCollection
findOne
in interface VCollection
findOne
in class MongoDBVCollection
example
- the example object