Modifier and Type | Method and Description |
---|---|
long |
count()
returns the total count
|
long |
count(Query<T> q)
returns the count which match the criteria
|
long |
count(String key,
Object value)
returns the count which match criteria {key:value}
|
Query<T> |
createQuery()
Starts a query for this DAO entities type
|
UpdateOperations<T> |
createUpdateOperations()
Starts a update-operations def for this DAO entities type
|
com.mongodb.WriteResult |
delete(T entity)
Deletes the entity
|
com.mongodb.WriteResult |
delete(T entity,
com.mongodb.WriteConcern wc)
Deletes the entity
|
com.mongodb.WriteResult |
deleteById(K id)
Delete the entity by id value
|
com.mongodb.WriteResult |
deleteByQuery(Query<T> q)
Saves the entities given the query
|
void |
ensureIndexes()
ensures indexed for this DAO
|
boolean |
exists(Query<T> q)
checks for entities which match the criteria
|
boolean |
exists(String key,
Object value)
checks for entities which match criteria {key:value}
|
QueryResults<T> |
find()
returns the entities
|
QueryResults<T> |
find(Query<T> q)
returns the entities which match the criteria
|
List<K> |
findIds()
Finds the entities Ts
|
List<K> |
findIds(Query<T> q)
Finds the entities Ts by the criteria {key:value}
|
List<K> |
findIds(String key,
Object value)
Finds the entities Key
|
T |
findOne(Query<T> q)
returns the entity which match the criteria
|
T |
findOne(String key,
Object value)
returns the entity which match criteria {key:value}
|
Key<T> |
findOneId()
Finds the first entity's ID
|
Key<T> |
findOneId(Query<T> q)
Finds the first entity's ID
|
Key<T> |
findOneId(String key,
Object value)
Finds the first entity's ID
|
T |
get(K id)
Loads the entity by id value
|
com.mongodb.DBCollection |
getCollection()
gets the collection
|
Datastore |
getDatastore()
returns the underlying datastore
|
Class<T> |
getEntityClass()
The type of entities for this DAO
|
Key<T> |
save(T entity)
Saves the entity; either inserting or overriding the existing document
|
Key<T> |
save(T entity,
com.mongodb.WriteConcern wc)
Saves the entity; either inserting or overriding the existing document
|
UpdateResults |
update(Query<T> q,
UpdateOperations<T> ops)
Updates all entities matched by the constraints with the modifiers supplied.
|
UpdateResults |
updateFirst(Query<T> q,
UpdateOperations<T> ops)
Updates the first entity matched by the constraints with the modifiers supplied.
|
UpdateOperations<T> createUpdateOperations()
Key<T> save(T entity, com.mongodb.WriteConcern wc)
UpdateResults updateFirst(Query<T> q, UpdateOperations<T> ops)
UpdateResults update(Query<T> q, UpdateOperations<T> ops)
com.mongodb.WriteResult delete(T entity)
com.mongodb.WriteResult delete(T entity, com.mongodb.WriteConcern wc)
com.mongodb.WriteResult deleteById(K id)
List<K> findIds(String key, Object value)
boolean exists(String key, Object value)
long count()
QueryResults<T> find()
QueryResults<T> find(Query<T> q)
void ensureIndexes()
com.mongodb.DBCollection getCollection()
Datastore getDatastore()
Copyright © 2016. All rights reserved.