public class Morphium extends Object
| Constructor and Description |
|---|
Morphium() |
Morphium(MorphiumConfig cfg)
init the MongoDbLayer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(MorphiumStorageListener lst) |
void |
addProfilingListener(ProfilingListener l) |
void |
addShutdownListener(ShutdownListener l) |
<T,R> List<R> |
aggregate(Aggregator<T,R> a) |
void |
clearCachefor(Class<?> cls)
Erase cache entries for the given type. is being called after every store
depending on cache settings!
|
void |
clearCollection(Class<?> cls)
issues a delete command - no lifecycle methods calles, no drop, keeps all indexec this way
|
void |
clearCollection(Class<?> cls,
String colName)
issues a delete command - no lifecycle methods calles, no drop, keeps all indexec this way
But uses sepcified collection name instead deriving name from class
|
void |
clearCollectionOneByOne(Class<?> cls)
clears every single object in collection - reads ALL objects to do so
this way Lifecycle methods can be called!
|
void |
close() |
<T,R> Aggregator<T,R> |
createAggregator(Class<? extends T> type,
Class<? extends R> resultType) |
String |
createCamelCase(String n) |
List<Map<String,Object>> |
createIndexMapFrom(String[] fldStr) |
<T> T |
createLazyLoadedEntity(Class<? extends T> cls,
Object id) |
<T> MongoField<T> |
createMongoField() |
<T> T |
createPartiallyUpdateableEntity(T o)
create a proxy object, implementing the ParitallyUpdateable Interface
these objects will be updated in mongo by only changing altered fields
Attention: the field name if determined by the setter name for now.
|
<T> Query<T> |
createQueryFor(Class<? extends T> type) |
void |
dec(Object toDec,
String field,
double amount)
decreasing a value of a given object
calles
inc(toDec,field,-amount); |
void |
dec(Query<?> query,
Enum field,
double amount) |
void |
dec(Query<?> query,
Enum field,
double amount,
boolean insertIfNotExist,
boolean multiple) |
void |
dec(Query<?> query,
String field,
double amount) |
void |
dec(Query<?> query,
String field,
double amount,
boolean insertIfNotExist,
boolean multiple) |
<T> void |
delete(List<T> lst,
AsyncOperationCallback<T> callback) |
void |
delete(Object o)
deletes a single object from morphium backend.
|
void |
delete(Object o,
String collection) |
<T> void |
delete(Query<T> o) |
<T> void |
delete(Query<T> o,
AsyncOperationCallback<T> callback) |
<T> void |
delete(T lo,
AsyncOperationCallback<T> callback) |
<T> void |
delete(T lo,
String collection,
AsyncOperationCallback<T> callback) |
<T> T |
deReference(T obj)
de-references the given object of type T.
|
List<Object> |
distinct(Enum key,
Class c) |
List<Object> |
distinct(Enum key,
Query q)
returns a distinct list of values of the given collection
Attention: these values are not unmarshalled, you might get MongoDBObjects
|
List<Object> |
distinct(String key,
Class cls) |
List<Object> |
distinct(String key,
Query q)
returns a distinct list of values of the given collection
Attention: these values are not unmarshalled, you might get MongoDBObjects
|
void |
dropCollection(Class<?> cls) |
<T> void |
dropCollection(Class<T> cls,
AsyncOperationCallback<T> callback) |
<T> void |
dropCollection(Class<T> cls,
String collection,
AsyncOperationCallback<T> callback) |
void |
ensureIndex(Class<?> cls,
Enum... fldStr) |
void |
ensureIndex(Class<?> cls,
Map<String,Object> index) |
void |
ensureIndex(Class<?> cls,
String... fldStr) |
void |
ensureIndex(Class<?> cls,
String collection,
Map<String,Object> index) |
void |
ensureIndex(Class<?> cls,
String collection,
Map<String,Object> index,
Map<String,Object> options) |
<T> void |
ensureIndex(Class<T> cls,
AsyncOperationCallback<T> callback,
Enum... fldStr)
ensureIndex(CachedObject.class,"counter","-value");
ensureIndex(CachedObject.class,"counter:2d","-value);
Similar to sorting
|
<T> void |
ensureIndex(Class<T> cls,
AsyncOperationCallback<T> callback,
String... fldStr) |
<T> void |
ensureIndex(Class<T> cls,
Map<String,Object> index,
AsyncOperationCallback<T> callback) |
<T> void |
ensureIndex(Class<T> cls,
String collection,
AsyncOperationCallback<T> callback,
Enum... fldStr) |
<T> void |
ensureIndex(Class<T> cls,
String collection,
AsyncOperationCallback<T> callback,
String... fldStr) |
<T> void |
ensureIndex(Class<T> cls,
String collection,
Map<String,Object> index,
AsyncOperationCallback<T> callback) |
<T> void |
ensureIndex(Class<T> cls,
String collection,
Map<String,Object> index,
Map<String,Object> options,
AsyncOperationCallback<T> callback) |
<T> void |
ensureIndicesFor(Class<T> type)
can be called for autmatic index ensurance.
|
<T> void |
ensureIndicesFor(Class<T> type,
AsyncOperationCallback<T> callback) |
<T> void |
ensureIndicesFor(Class<T> type,
String onCollection) |
<T> void |
ensureIndicesFor(Class<T> type,
String onCollection,
AsyncOperationCallback<T> callback) |
<T> List<T> |
find(Query<T> q) |
<T> List<T> |
findByField(Class<? extends T> cls,
Enum fld,
Object val) |
<T> List<T> |
findByField(Class<? extends T> cls,
String fld,
Object val) |
<T> T |
findById(Class<? extends T> type,
Object id) |
<T> List<T> |
findByTemplate(T template,
String... fields)
search for objects similar to template concerning all given fields.
|
void |
firePostDropEvent(Class cls) |
void |
firePostLoadEvent(Object o)
will be called by query after unmarshalling
|
void |
firePostRemoveEvent(Object o) |
void |
firePostRemoveEvent(Query q) |
void |
firePostStoreEvent(Object o,
boolean isNew) |
void |
firePostUpdateEvent(Class cls,
MorphiumStorageListener.UpdateTypes t) |
void |
firePreDropEvent(Class cls) |
void |
firePreRemoveEvent(Object o) |
void |
firePreRemoveEvent(Query q) |
void |
firePreStoreEvent(Object o,
boolean isNew) |
void |
firePreUpdateEvent(Class cls,
MorphiumStorageListener.UpdateTypes t) |
void |
fireProfilingReadEvent(Query q,
long time,
ReadAccessType t) |
void |
fireProfilingWriteEvent(Class type,
Object data,
long time,
boolean isNew,
WriteAccessType wt) |
void |
flush() |
AnnotationAndReflectionHelper |
getARHelper() |
int |
getAsyncWriterBufferCount() |
int |
getBufferedWriterBufferCount() |
MorphiumCache |
getCache() |
MorphiumConfig |
getConfig() |
ReplicaSetStatus |
getCurrentStatus() |
com.mongodb.DB |
getDatabase() |
Object |
getId(Object o) |
ObjectMapper |
getMapper() |
com.mongodb.Mongo |
getMongo() |
Map<String,Double> |
getStatistics() |
Map<StatisticKeys,StatisticValue> |
getStats() |
int |
getWriteBufferCount() |
com.mongodb.WriteConcern |
getWriteConcernForClass(Class<?> cls) |
int |
getWriterBufferCount() |
MorphiumWriter |
getWriterForClass(Class<?> cls) |
com.mongodb.DBObject |
group(Query q,
Map<String,Object> initial,
String jsReduce,
String jsFinalize,
String... keys) |
void |
handleNetworkError(int i,
Throwable e) |
void |
inc(Object toSet,
String field,
double i) |
void |
inc(Query<?> query,
Enum field,
double amount) |
void |
inc(Query<?> query,
Enum field,
double amount,
boolean insertIfNotExist,
boolean multiple) |
void |
inc(Query<?> query,
String field,
double amount) |
void |
inc(Query<?> query,
String name,
double amount,
boolean insertIfNotExist,
boolean multiple) |
<T> void |
inc(Query<T> query,
Map<String,Double> toUptad,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback) |
<T> void |
inc(Query<T> query,
String name,
double amount,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback) |
void |
inc(StatisticKeys k) |
<T> void |
inc(T toSet,
String field,
double i,
AsyncOperationCallback<T> callback) |
<T> void |
inc(T toSet,
String collection,
String field,
double i,
AsyncOperationCallback<T> callback) |
boolean |
isReplicaSet() |
void |
pull(Query<?> query,
Enum field,
Object value) |
void |
pull(Query<?> query,
Enum field,
Object value,
boolean insertIfNotExist,
boolean multiple) |
void |
pull(Query<?> query,
String field,
Object value) |
<T> void |
pull(Query<T> query,
String field,
Object value,
boolean insertIfNotExist,
boolean multiple) |
<T> void |
pull(Query<T> query,
String field,
Object value,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback)
Asynchronous call to pulll
|
void |
pullAll(Query<?> query,
Enum field,
List<Object> value,
boolean insertIfNotExist,
boolean multiple) |
void |
pullAll(Query<?> query,
String field,
List<Object> value,
boolean insertIfNotExist,
boolean multiple) |
<T> void |
pullAll(Query<T> query,
String field,
List<?> value,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback) |
void |
push(Query<?> query,
Enum field,
Object value) |
void |
push(Query<?> query,
Enum field,
Object value,
boolean insertIfNotExist,
boolean multiple) |
void |
push(Query<?> query,
String field,
Object value) |
<T> void |
push(Query<T> query,
String field,
Object value,
boolean insertIfNotExist,
boolean multiple) |
<T> void |
push(Query<T> query,
String field,
Object value,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback)
asynchronous call to callback
|
void |
pushAll(Query<?> query,
Enum field,
List<Object> value,
boolean insertIfNotExist,
boolean multiple) |
void |
pushAll(Query<?> query,
String field,
List<?> value,
boolean insertIfNotExist,
boolean multiple) |
<T> void |
pushAll(Query<T> query,
String field,
List<?> value,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback) |
<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> List<T> |
readAll(Class<? extends T> cls)
return a list of all elements stored in morphium for this type
|
void |
removeListener(MorphiumStorageListener lst) |
void |
removeProfilingListener(ProfilingListener l) |
void |
removeShutdownListener(ShutdownListener l) |
<T> T |
reread(T o)
careful this actually changes the parameter o!
|
<T> T |
reread(T o,
String collection) |
void |
set(Object toSet,
Enum field,
Object value) |
void |
set(Object toSet,
String field,
Object value)
setting a value in an existing mongo collection entry - no reading necessary.
|
void |
set(Query<?> query,
Map<String,Object> map,
boolean insertIfNotExist,
boolean multiple) |
<T> void |
set(Query<T> query,
Enum field,
Object val) |
<T> void |
set(Query<T> query,
Enum field,
Object val,
AsyncOperationCallback<T> callback) |
<T> void |
set(Query<T> query,
Map<String,Object> map,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback) |
<T> void |
set(Query<T> query,
String field,
Object val) |
<T> void |
set(Query<T> query,
String field,
Object val,
AsyncOperationCallback<T> callback) |
<T> void |
set(Query<T> query,
String field,
Object val,
boolean insertIfNotExist,
boolean multiple)
will change an entry in mongodb-collection corresponding to given class object
if query is too complex, upsert might not work!
|
<T> void |
set(Query<T> query,
String field,
Object val,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback) |
<T> void |
set(T toSet,
Enum field,
Object value,
AsyncOperationCallback<T> callback) |
<T> void |
set(T toSet,
String field,
Object value,
AsyncOperationCallback<T> callback) |
<T> void |
set(T toSet,
String field,
Object value,
boolean insertIfNotExists,
boolean multiple,
AsyncOperationCallback<T> callback) |
<T> void |
set(T toSet,
String collection,
String field,
Object value,
boolean insertIfNotExists,
boolean multiple,
AsyncOperationCallback<T> callback) |
void |
setConfig(MorphiumConfig cfg) |
void |
setEnum(Query<?> query,
Map<Enum,Object> values,
boolean insertIfNotExist,
boolean multiple) |
com.mongodb.DBObject |
simplifyQueryObject(com.mongodb.DBObject q) |
<T> void |
store(List<T> lst,
AsyncOperationCallback<T> callback) |
<T> void |
store(List<T> lst,
String collectionName,
AsyncOperationCallback<T> callback) |
<T> void |
store(T o)
Stores a single Object.
|
<T> void |
store(T o,
AsyncOperationCallback<T> callback) |
<T> void |
store(T o,
String collection,
AsyncOperationCallback<T> callback) |
<T> void |
storeBuffered(T lst) |
<T> void |
storeBuffered(T lst,
AsyncOperationCallback<T> callback) |
<T> void |
storeBuffered(T lst,
String collection,
AsyncOperationCallback<T> callback) |
<T> void |
storeList(List<T> lst)
sorts elements in this list, whether to store in background or directly
|
<T> void |
storeList(List<T> lst,
AsyncOperationCallback<T> callback) |
<T> void |
storeList(List<T> lst,
String collection)
stores all elements of this list to the given collection
|
<T> void |
storeList(List<T> lst,
String collection,
AsyncOperationCallback<T> callback) |
<T> void |
storeNoCache(T lst) |
<T> void |
storeNoCache(T o,
AsyncOperationCallback<T> callback) |
<T> void |
storeNoCache(T o,
String collection) |
<T> void |
storeNoCache(T o,
String collection,
AsyncOperationCallback<T> callback) |
String |
toJsonString(Object o) |
<T> void |
unset(T toSet,
Enum field) |
<T> void |
unset(T toSet,
String field) |
<T> void |
unset(T toSet,
String field,
AsyncOperationCallback<T> callback) |
<T> void |
unset(T toSet,
String collection,
String field,
AsyncOperationCallback<T> callback) |
<T> void |
unsetQ(Query<T> q,
AsyncOperationCallback<T> cb,
boolean multiple,
String... field) |
<T> void |
unsetQ(Query<T> q,
AsyncOperationCallback<T> cb,
Enum... field) |
<T> void |
unsetQ(Query<T> q,
AsyncOperationCallback<T> cb,
String... field) |
<T> void |
unsetQ(Query<T> q,
boolean multiple,
AsyncOperationCallback<T> cb,
Enum... field) |
<T> void |
unsetQ(Query<T> q,
boolean multiple,
Enum... field) |
<T> void |
unsetQ(Query<T> q,
boolean multiple,
String... field) |
<T> void |
unsetQ(Query<T> q,
Enum... field) |
<T> void |
unsetQ(Query<T> q,
String... field) |
void |
updateUsingFields(Object ent,
String... fields)
updating an enty in DB without sending the whole entity
only transfers the fields to be changed / set
|
<T> void |
updateUsingFields(T ent,
AsyncOperationCallback<T> callback,
String... fields) |
<T> void |
updateUsingFields(T ent,
String collection,
AsyncOperationCallback<T> callback,
String... fields) |
int |
writeBufferCount() |
public Morphium()
public Morphium(MorphiumConfig cfg)
MorphiumConfigpublic MorphiumConfig getConfig()
public void setConfig(MorphiumConfig cfg)
public MorphiumCache getCache()
public void addListener(MorphiumStorageListener lst)
public void removeListener(MorphiumStorageListener lst)
public com.mongodb.Mongo getMongo()
public com.mongodb.DB getDatabase()
public <T> List<T> findByTemplate(T template, String... fields)
T - - typetemplate - - what to search forfields - - fields to use for searchingpublic <T> void unset(T toSet,
Enum field)
public <T> void unset(T toSet,
String field)
public <T> void unset(T toSet,
String field,
AsyncOperationCallback<T> callback)
public <T> void unset(T toSet,
String collection,
String field,
AsyncOperationCallback<T> callback)
public <T> void unsetQ(Query<T> q, AsyncOperationCallback<T> cb, String... field)
public <T> void unsetQ(Query<T> q, AsyncOperationCallback<T> cb, boolean multiple, String... field)
public <T> void unsetQ(Query<T> q, AsyncOperationCallback<T> cb, Enum... field)
public <T> void unsetQ(Query<T> q, boolean multiple, AsyncOperationCallback<T> cb, Enum... field)
public <T> void ensureIndicesFor(Class<T> type)
type - type to ensure indices forpublic <T> void ensureIndicesFor(Class<T> type, AsyncOperationCallback<T> callback)
public <T> void ensureIndicesFor(Class<T> type, String onCollection, AsyncOperationCallback<T> callback)
public com.mongodb.DBObject simplifyQueryObject(com.mongodb.DBObject q)
public <T> void set(Query<T> query, Enum field, Object val, AsyncOperationCallback<T> callback)
public <T> void set(Query<T> query, String field, Object val, AsyncOperationCallback<T> callback)
public void setEnum(Query<?> query, Map<Enum,Object> values, boolean insertIfNotExist, boolean multiple)
public void push(Query<?> query, Enum field, Object value, boolean insertIfNotExist, boolean multiple)
public void pull(Query<?> query, Enum field, Object value, boolean insertIfNotExist, boolean multiple)
public void pushAll(Query<?> query, Enum field, List<Object> value, boolean insertIfNotExist, boolean multiple)
public void pullAll(Query<?> query, Enum field, List<Object> value, boolean insertIfNotExist, boolean multiple)
public <T> void push(Query<T> query, String field, Object value, boolean insertIfNotExist, boolean multiple)
public <T> void push(Query<T> query, String field, Object value, boolean insertIfNotExist, boolean multiple, AsyncOperationCallback<T> callback)
T - - the typequery - - the queryfield - - field to push values tovalue - - value to pushinsertIfNotExist - - insert object, if it does not existmultiple - - more than onecallback - - will be called, when operation succeeds - synchronous call, if nullpublic <T> void pull(Query<T> query, String field, Object value, boolean insertIfNotExist, boolean multiple)
public <T> void pull(Query<T> query, String field, Object value, boolean insertIfNotExist, boolean multiple, AsyncOperationCallback<T> callback)
T - - typequery - - queryfield - - field to pullvalue - - value to pull from fieldinsertIfNotExist - - insert document unless it existsmultiple - - more than onecallback - -callback to call when operation succeeds - synchronous call, if nullpublic void pushAll(Query<?> query, String field, List<?> value, boolean insertIfNotExist, boolean multiple)
public <T> void pushAll(Query<T> query, String field, List<?> value, boolean insertIfNotExist, boolean multiple, AsyncOperationCallback<T> callback)
public void pullAll(Query<?> query, String field, List<Object> value, boolean insertIfNotExist, boolean multiple)
public <T> void set(Query<T> query, String field, Object val, boolean insertIfNotExist, boolean multiple)
query - - query to specify which objects should be setfield - - field to setval - - value to setinsertIfNotExist - - 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 set(Query<T> query, String field, Object val, boolean insertIfNotExist, boolean multiple, AsyncOperationCallback<T> callback)
public void set(Query<?> query, Map<String,Object> map, boolean insertIfNotExist, boolean multiple)
public <T> void set(Query<T> query, Map<String,Object> map, boolean insertIfNotExist, boolean multiple, AsyncOperationCallback<T> callback)
public void dec(Query<?> query, Enum field, double amount, boolean insertIfNotExist, boolean multiple)
public void dec(Query<?> query, String field, double amount, boolean insertIfNotExist, boolean multiple)
public void inc(Query<?> query, Enum field, double amount, boolean insertIfNotExist, boolean multiple)
public <T> void inc(Query<T> query, Map<String,Double> toUptad, boolean insertIfNotExist, boolean multiple, AsyncOperationCallback<T> callback)
public void inc(Query<?> query, String name, double amount, boolean insertIfNotExist, boolean multiple)
public <T> void inc(Query<T> query, String name, double amount, boolean insertIfNotExist, boolean multiple, AsyncOperationCallback<T> callback)
public <T> void set(T toSet,
Enum field,
Object value,
AsyncOperationCallback<T> callback)
public void set(Object toSet, String field, Object value)
toSet: - object to set the value in (or better - the corresponding entry in mongo)field: - the field to changevalue: - the value to setpublic <T> void set(T toSet,
String field,
Object value,
boolean insertIfNotExists,
boolean multiple,
AsyncOperationCallback<T> callback)
public <T> void set(T toSet,
String collection,
String field,
Object value,
boolean insertIfNotExists,
boolean multiple,
AsyncOperationCallback<T> callback)
public <T> void set(T toSet,
String field,
Object value,
AsyncOperationCallback<T> callback)
public MorphiumWriter getWriterForClass(Class<?> cls)
public void dec(Object toDec, String field, double amount)
inc(toDec,field,-amount);public <T> void inc(T toSet,
String field,
double i,
AsyncOperationCallback<T> callback)
public <T> void inc(T toSet,
String collection,
String field,
double i,
AsyncOperationCallback<T> callback)
public <T> void delete(List<T> lst, AsyncOperationCallback<T> callback)
public void inc(StatisticKeys k)
public void updateUsingFields(Object ent, String... fields)
ent - - entity to updatefields - - fields to usepublic <T> void updateUsingFields(T ent,
AsyncOperationCallback<T> callback,
String... fields)
public <T> void updateUsingFields(T ent,
String collection,
AsyncOperationCallback<T> callback,
String... fields)
public ObjectMapper getMapper()
public AnnotationAndReflectionHelper getARHelper()
public <T> T reread(T o)
T - - tpye of the objecto - - object to readpublic <T> T reread(T o,
String collection)
public void firePreStoreEvent(Object o, boolean isNew)
public void firePostStoreEvent(Object o, boolean isNew)
public void firePreDropEvent(Class cls)
public void firePostDropEvent(Class cls)
public void firePostUpdateEvent(Class cls, MorphiumStorageListener.UpdateTypes t)
public void firePreUpdateEvent(Class cls, MorphiumStorageListener.UpdateTypes t)
public void firePostRemoveEvent(Object o)
public void firePostRemoveEvent(Query q)
public void firePreRemoveEvent(Object o)
public void firePreRemoveEvent(Query q)
public <T> T deReference(T obj)
T - - typeobj - - the object to replactpublic void firePostLoadEvent(Object o)
o - - entitiypublic ReplicaSetStatus getCurrentStatus()
public boolean isReplicaSet()
public void handleNetworkError(int i,
Throwable e)
public com.mongodb.WriteConcern getWriteConcernForClass(Class<?> cls)
public void addProfilingListener(ProfilingListener l)
public void removeProfilingListener(ProfilingListener l)
public void fireProfilingWriteEvent(Class type, Object data, long time, boolean isNew, WriteAccessType wt)
public void fireProfilingReadEvent(Query q, long time, ReadAccessType t)
public void clearCollection(Class<?> cls)
cls - - classpublic void clearCollection(Class<?> cls, String colName)
cls - - classcolName - - CollectionNamepublic void clearCollectionOneByOne(Class<?> cls)
cls - -classpublic <T> List<T> readAll(Class<? extends T> cls)
T - - Typecls - - type to search for, needs to be an Propertypublic List<Object> distinct(Enum key, Query q)
public List<Object> distinct(String key, Query q)
public com.mongodb.DBObject group(Query q, Map<String,Object> initial, String jsReduce, String jsFinalize, String... keys)
public void clearCachefor(Class<?> cls)
cls - - classpublic <T> void storeNoCache(T lst)
public <T> void storeNoCache(T o,
AsyncOperationCallback<T> callback)
public <T> void storeNoCache(T o,
String collection)
public <T> void storeNoCache(T o,
String collection,
AsyncOperationCallback<T> callback)
public <T> void storeBuffered(T lst)
public <T> void storeBuffered(T lst,
AsyncOperationCallback<T> callback)
public <T> void storeBuffered(T lst,
String collection,
AsyncOperationCallback<T> callback)
public void flush()
public <T> void dropCollection(Class<T> cls, AsyncOperationCallback<T> callback)
public <T> void dropCollection(Class<T> cls, String collection, AsyncOperationCallback<T> callback)
public void dropCollection(Class<?> cls)
public <T> void ensureIndex(Class<T> cls, Map<String,Object> index, AsyncOperationCallback<T> callback)
public <T> void ensureIndex(Class<T> cls, String collection, Map<String,Object> index, Map<String,Object> options, AsyncOperationCallback<T> callback)
public <T> void ensureIndex(Class<T> cls, String collection, Map<String,Object> index, AsyncOperationCallback<T> callback)
public int writeBufferCount()
public <T> void store(List<T> lst, String collectionName, AsyncOperationCallback<T> callback)
public void ensureIndex(Class<?> cls, String collection, Map<String,Object> index, Map<String,Object> options)
public <T> void ensureIndex(Class<T> cls, AsyncOperationCallback<T> callback, Enum... fldStr)
cls - - classfldStr - - fieldspublic <T> void ensureIndex(Class<T> cls, String collection, AsyncOperationCallback<T> callback, Enum... fldStr)
public <T> void ensureIndex(Class<T> cls, AsyncOperationCallback<T> callback, String... fldStr)
public <T> void ensureIndex(Class<T> cls, String collection, AsyncOperationCallback<T> callback, String... fldStr)
public <T> void store(T o)
o - - Object to storepublic <T> void store(T o,
AsyncOperationCallback<T> callback)
public <T> void store(T o,
String collection,
AsyncOperationCallback<T> callback)
public <T> void store(List<T> lst, AsyncOperationCallback<T> callback)
public <T> void storeList(List<T> lst, String collection)
T - - type of entitylst - - list of objects to storecollection - - collection name to usepublic <T> void storeList(List<T> lst, String collection, AsyncOperationCallback<T> callback)
public <T> void storeList(List<T> lst)
T - lst - - all objects are sorted whether to store in BG or direclty. All objects are stored in their corresponding collectionpublic <T> void storeList(List<T> lst, AsyncOperationCallback<T> callback)
public <T> void delete(Query<T> o)
public <T> void delete(Query<T> o, 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 field,
List<?> value,
boolean insertIfNotExist,
boolean multiple,
AsyncOperationCallback<T> callback)
public <T> void pullAll(Query<T> query, String field, List<?> value, boolean insertIfNotExist, boolean multiple, AsyncOperationCallback<T> callback)
public void delete(Object o)
o - - entitypublic <T> void delete(T lo,
AsyncOperationCallback<T> callback)
public <T> void delete(T lo,
String collection,
AsyncOperationCallback<T> callback)
public Map<StatisticKeys,StatisticValue> getStats()
public void addShutdownListener(ShutdownListener l)
public void removeShutdownListener(ShutdownListener l)
public void close()
public <T,R> Aggregator<T,R> createAggregator(Class<? extends T> type, Class<? extends R> resultType)
public <T,R> List<R> aggregate(Aggregator<T,R> a)
public <T> T createPartiallyUpdateableEntity(T o)
T - - typeo - - entitypublic <T> MongoField<T> createMongoField()
public int getWriteBufferCount()
public int getBufferedWriterBufferCount()
public int getAsyncWriterBufferCount()
public int getWriterBufferCount()
Copyright © 2013. All rights reserved.