| Constructor and Description |
|---|
WriterImpl() |
| 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,
AsyncOperationCallback<T> callback) |
<T> void |
dropCollection(Class<T> cls,
AsyncOperationCallback<T> callback) |
<T> void |
ensureIndex(Class<T> cls,
Map<String,Object> index,
AsyncOperationCallback<T> callback) |
<T> void |
inc(Query<T> query,
String field,
int amount,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback) |
<T> void |
inc(T toInc,
String field,
int 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 f,
List<?> v,
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 field,
Object v,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback)
changes an object in DB AND in Memory...
|
void |
setMorphium(Morphium m) |
<T> void |
store(List<T> lst,
AsyncOperationCallback<T> callback)
stores the given list of objects, should be entities or embedded
|
<T> void |
store(T obj,
AsyncOperationCallback<T> callback)
Stores the object, should be an entity
|
<T> void |
storeUsingFields(T ent,
AsyncOperationCallback<T> callback,
String... fields)
update an object using fields specified
|
<T> void |
unset(T toSet,
String field,
AsyncOperationCallback<T> callback)
Un-setting a value in an existing mongo collection entry - no reading necessary.
|
int |
writeBufferCount() |
public void setMorphium(Morphium m)
setMorphium in interface Writerpublic <T> void store(T obj,
AsyncOperationCallback<T> callback)
Writerpublic <T> void store(List<T> lst, AsyncOperationCallback<T> callback)
Writerpublic <T> void set(T toSet,
String field,
Object v,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback)
Writerpublic <T> void storeUsingFields(T ent,
AsyncOperationCallback<T> callback,
String... fields)
WriterstoreUsingFields in interface Writerent - entityfields - - fieldspublic <T> void delete(List<T> lst, AsyncOperationCallback<T> callback)
public <T> void delete(Query<T> q, AsyncOperationCallback<T> callback)
public <T> void delete(T o,
AsyncOperationCallback<T> callback)
public <T> void inc(T toInc,
String field,
int amount,
AsyncOperationCallback<T> callback)
public <T> void inc(Query<T> query, String field, int amount, boolean insertIfNotExist, boolean multiple, AsyncOperationCallback<T> callback)
public <T> void set(Query<T> query, Map<String,Object> values, boolean insertIfNotExist, boolean multiple, AsyncOperationCallback<T> callback)
set in interface Writerquery - - 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 updatedpublic <T> void unset(T toSet,
String field,
AsyncOperationCallback<T> callback)
public <T> void pushPull(boolean push,
Query<T> query,
String field,
Object value,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback)
public <T> void pushPullAll(boolean push,
Query<T> query,
String f,
List<?> v,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback)
pushPullAll in interface Writerpublic <T> void dropCollection(Class<T> cls, AsyncOperationCallback<T> callback)
dropCollection in interface Writerpublic <T> void ensureIndex(Class<T> cls, Map<String,Object> index, AsyncOperationCallback<T> callback)
ensureIndex in interface Writerpublic int writeBufferCount()
writeBufferCount in interface WriterCopyright © 2013. All Rights Reserved.