public interface MorphiumWriter
MorphiumConfig| Modifier and Type | Method and Description |
|---|---|
<T> void |
delete(List<T> lst,
AsyncOperationCallback<T> callback) |
<T> void |
delete(Query<T> q,
AsyncOperationCallback<T> callback)
deletes all objects matching the given query
|
<T> void |
delete(T o,
String collection,
AsyncOperationCallback<T> callback) |
<T> void |
dropCollection(Class<T> cls,
String collection,
AsyncOperationCallback<T> callback) |
<T> void |
ensureIndex(Class<T> cls,
String collection,
Map<String,Object> index,
Map<String,Object> options,
AsyncOperationCallback<T> callback) |
void |
flush() |
<T> void |
inc(Query<T> query,
Map<String,Double> fieldsToInc,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback) |
<T> void |
inc(Query<T> query,
String field,
double amount,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback) |
<T> void |
inc(T toInc,
String collection,
String field,
double amount,
AsyncOperationCallback<T> callback)
Increases a value in an existing mongo collection entry - no reading necessary.
|
<T> void |
pushPull(boolean push,
Query<T> query,
String field,
Object value,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback) |
<T> void |
pushPullAll(boolean push,
Query<T> query,
String field,
List<?> value,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback) |
<T> void |
set(Query<T> query,
Map<String,Object> values,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback)
will change an entry in mongodb-collection corresponding to given class object
if query is too complex, upsert might not work!
|
<T> void |
set(T toSet,
String collection,
String field,
Object value,
boolean insertIfNotExists,
boolean multiple,
AsyncOperationCallback<T> callback)
changes an object in DB AND in Memory...
|
void |
setMaximumQueingTries(int n) |
void |
setMorphium(Morphium m) |
void |
setPauseBetweenTries(int p) |
<T> void |
store(List<T> lst,
AsyncOperationCallback<T> callback)
stores the given list of objects, should be entities or embedded
|
<T> void |
store(List<T> lst,
String collectionName,
AsyncOperationCallback<T> callback) |
<T> void |
store(T o,
String collection,
AsyncOperationCallback<T> callback)
Stores the object, should be an entity
|
<T> void |
unset(Query<T> query,
AsyncOperationCallback<T> callback,
boolean multiple,
Enum... fields) |
<T> void |
unset(Query<T> query,
AsyncOperationCallback<T> callback,
boolean multiple,
String... fields) |
<T> void |
unset(Query<T> query,
String field,
boolean multiple,
AsyncOperationCallback<T> callback) |
<T> void |
unset(T toSet,
String collection,
String field,
AsyncOperationCallback<T> callback)
Un-setting a value in an existing mongo collection entry - no reading necessary.
|
<T> void |
updateUsingFields(T ent,
String collection,
AsyncOperationCallback<T> callback,
String... fields)
update an object using fields specified
|
int |
writeBufferCount() |
<T> void store(T o,
String collection,
AsyncOperationCallback<T> callback)
o - - entity<T> void store(List<T> lst, AsyncOperationCallback<T> callback)
lst - - to store<T> void updateUsingFields(T ent,
String collection,
AsyncOperationCallback<T> callback,
String... fields)
ent - entityfields - - fields<T> void set(T toSet,
String collection,
String field,
Object value,
boolean insertIfNotExists,
boolean multiple,
AsyncOperationCallback<T> callback)
toSet - entity to set values in both in mongo and in memoryfield - fieldvalue - value to set<T> void set(Query<T> query, Map<String,Object> values, boolean insertIfNotExist, boolean multiple, AsyncOperationCallback<T> callback)
query - - query to specify which objects should be setvalues - - map fieldName->Value, which values are to be set!insertIfNotExist - - insert, if it does not exist (query needs to be simple!)multiple - - update several documents, if false, only first hit will be updated<T> void inc(Query<T> query, String field, double amount, boolean insertIfNotExist, boolean multiple, AsyncOperationCallback<T> callback)
<T> void inc(T toInc,
String collection,
String field,
double amount,
AsyncOperationCallback<T> callback)
toInc: - object to set the value in (or better - the corresponding entry in mongo)field: - the field to changeamount: - the value to setvoid setMorphium(Morphium m)
<T> void delete(List<T> lst, AsyncOperationCallback<T> callback)
<T> void delete(T o,
String collection,
AsyncOperationCallback<T> callback)
<T> void delete(Query<T> q, AsyncOperationCallback<T> callback)
q - the query<T> void pushPull(boolean push,
Query<T> query,
String field,
Object value,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback)
<T> void pushPullAll(boolean push,
Query<T> query,
String field,
List<?> value,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback)
<T> void unset(T toSet,
String collection,
String field,
AsyncOperationCallback<T> callback)
toSet: - object to set the value in (or better - the corresponding entry in mongo)field: - field to remove from document<T> void unset(Query<T> query, String field, boolean multiple, AsyncOperationCallback<T> callback)
<T> void unset(Query<T> query, AsyncOperationCallback<T> callback, boolean multiple, String... fields)
<T> void unset(Query<T> query, AsyncOperationCallback<T> callback, boolean multiple, Enum... fields)
<T> void dropCollection(Class<T> cls, String collection, AsyncOperationCallback<T> callback)
<T> void ensureIndex(Class<T> cls, String collection, Map<String,Object> index, Map<String,Object> options, AsyncOperationCallback<T> callback)
int writeBufferCount()
<T> void store(List<T> lst, String collectionName, AsyncOperationCallback<T> callback)
void flush()
void setMaximumQueingTries(int n)
void setPauseBetweenTries(int p)
<T> void inc(Query<T> query, Map<String,Double> fieldsToInc, boolean insertIfNotExist, boolean multiple, AsyncOperationCallback<T> callback)
Copyright © 2013. All rights reserved.