| Modifier and Type | Field and Description |
|---|---|
protected org.jongo.MongoCollection |
collection |
| Constructor and Description |
|---|
AbstractMongoDAO() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addIndex(String field,
boolean asc,
boolean background) |
protected void |
addIndexes() |
protected void |
addTTLIndex(String field,
int ttl) |
protected void |
afterDelete(String id) |
protected void |
afterSave(T object) |
protected void |
beforeDelete(String id) |
protected void |
beforeSave(T object) |
protected List<T> |
convertIterable(Iterable<T> as) |
protected org.jongo.Jongo |
createJongo(com.mongodb.DB db) |
void |
delete(String id) |
void |
delete(T object) |
T |
findById(String id) |
protected List<T> |
findByQuery(String query,
Object... params) |
protected T |
findFirstByQuery(String query,
String sort,
Object... params) |
List<T> |
findList() |
protected List<T> |
findSortedByQuery(String query,
String sort,
Object... params) |
protected String |
getCollectionName() |
protected abstract Class<T> |
getEntityClass() |
void |
init() |
protected <R> Iterable<R> |
mapReduce(String map,
String reduce,
com.mongodb.DBObject query,
IObjectConverter<R> conv) |
protected <R> Iterable<R> |
mapReduce(String map,
String reduce,
IObjectConverter<R> conv) |
T |
save(T object) |
@PostConstruct public final void init()
protected void addIndexes()
protected final void addIndex(String field, boolean asc, boolean background)
field - the fieldasc - true for ascending; false otherwisebackground - index asyncprotected final void addTTLIndex(String field, int ttl)
field - the fieldttl - the TTL in secondsprotected String getCollectionName()
protected final <R> Iterable<R> mapReduce(String map, String reduce, IObjectConverter<R> conv)
protected final <R> Iterable<R> mapReduce(String map, String reduce, com.mongodb.DBObject query, IObjectConverter<R> conv)
protected final List<T> findSortedByQuery(String query, String sort, Object... params)
protected void afterSave(T object)
protected void beforeSave(T object)
public final void delete(T object)
public final void delete(String id)
protected void beforeDelete(String id)
protected void afterDelete(String id)
protected org.jongo.Jongo createJongo(com.mongodb.DB db)
Copyright © 2013-2014 Taimos GmbH. All Rights Reserved.