public interface VCollection
A collection within a Multiversion Concurrency Control database.
Implementations of this interface do not handle large objects (BLOBs).
Inserting a large object into this collection may lead to an error if
the underlying implementation has a maximum size for documents. You
can use a VLargeCollection
for such cases. Nonetheless,
implementations of this interface may be significantly faster than thos
of VLargeCollection
. Hence, if the objects are definitely not
too large, this interface should be used.
Thread-safety: this class is thread-safe.
Modifier and Type | Method and Description |
---|---|
void |
delete(long uid)
Deletes the object with the given UID from the collection (if it exists)
|
void |
delete(java.util.Map<java.lang.String,java.lang.Object> example)
Deletes all objects from the collection that match the given example object
|
VCursor |
find() |
VCursor |
find(java.util.Map<java.lang.String,java.lang.Object> example)
Find by example.
|
VCursor |
find(java.util.Map<java.lang.String,java.lang.Object> example,
java.lang.String... fields)
Find by example.
|
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
|
java.lang.String |
getName() |
void |
insert(java.util.Map<java.lang.String,java.lang.Object> obj)
Inserts a new object to the collection.
|
java.lang.String getName()
void insert(java.util.Map<java.lang.String,java.lang.Object> obj)
uid
attribute.obj
- the object to add to the collectionvoid delete(long uid)
uid
- the UID of the object to deletevoid delete(java.util.Map<java.lang.String,java.lang.Object> example)
example
- the example objectVCursor find()
VCursor find(java.util.Map<java.lang.String,java.lang.Object> example)
example
- the example objectVCursor find(java.util.Map<java.lang.String,java.lang.Object> example, java.lang.String... fields)
example
- the example objectfields
- the names of the fields to returnjava.util.Map<java.lang.String,java.lang.Object> findOne(java.util.Map<java.lang.String,java.lang.Object> example)
example
- the example object