public interface AdvancedDatastore extends Datastore
Datastore
features, like interacting with DBObject and low-level options. It implements matching
methods from the Datastore
interface but with a specified kind (collection name), or raw types (DBObject).Modifier and Type | Method and Description |
---|---|
<T> Query<T> |
createQuery(Class<T> kind,
com.mongodb.DBObject q) |
<T> Query<T> |
createQuery(String kind,
Class<T> clazz) |
<T> Query<T> |
createQuery(String kind,
Class<T> clazz,
com.mongodb.DBObject q) |
<T,V> com.mongodb.DBRef |
createRef(Class<T> clazz,
V id)
Creates a reference to the entity (using the current DB -can be null-, the collectionName, and id)
|
<T> com.mongodb.DBRef |
createRef(T entity)
Creates a reference to the entity (using the current DB -can be null-, the collectionName, and id)
|
<T> UpdateOperations<T> |
createUpdateOperations(Class<T> kind,
com.mongodb.DBObject ops) |
<T,V> com.mongodb.WriteResult |
delete(String kind,
Class<T> clazz,
V id) |
<T,V> com.mongodb.WriteResult |
delete(String kind,
Class<T> clazz,
V id,
com.mongodb.WriteConcern wc) |
<T> com.mongodb.WriteResult |
delete(String kind,
T id)
Deprecated.
|
Key<?> |
exists(Object keyOrEntity,
com.mongodb.ReadPreference readPreference) |
<T> Query<T> |
find(String kind,
Class<T> clazz) |
<T,V> Query<T> |
find(String kind,
Class<T> clazz,
String property,
V value,
int offset,
int size) |
<T> T |
get(Class<T> clazz,
com.mongodb.DBRef ref)
Find the given entity (by collectionName/id);
|
<T,V> T |
get(String kind,
Class<T> clazz,
V id) |
long |
getCount(String kind)
Gets the count this kind
|
com.mongodb.DBDecoderFactory |
getDecoderFact() |
<T> Iterable<Key<T>> |
insert(Iterable<T> entities,
com.mongodb.WriteConcern wc) |
<T> Iterable<Key<T>> |
insert(String kind,
Iterable<T> entities) |
<T> Iterable<Key<T>> |
insert(String kind,
Iterable<T> entities,
com.mongodb.WriteConcern wc) |
<T> Key<T> |
insert(String kind,
T entity) |
<T> Iterable<Key<T>> |
insert(T... entities) |
<T> Key<T> |
insert(T entity) |
<T> Key<T> |
insert(T entity,
com.mongodb.WriteConcern wc) |
<T> Query<T> |
queryByExample(String kind,
T example)
Returns a new query based on the example object
|
<T> Key<T> |
save(String kind,
T entity) |
<T> Key<T> |
save(String kind,
T entity,
com.mongodb.WriteConcern wc) |
com.mongodb.DBDecoderFactory |
setDecoderFact(com.mongodb.DBDecoderFactory fact) |
createQuery, createUpdateOperations, delete, delete, delete, delete, delete, delete, ensureCaps, ensureIndex, ensureIndex, ensureIndex, ensureIndex, ensureIndex, ensureIndexes, ensureIndexes, ensureIndexes, ensureIndexes, exists, find, find, find, findAndDelete, findAndModify, findAndModify, findAndModify, get, get, get, getByKey, getByKeys, getByKeys, getCollection, getCount, getCount, getCount, getDB, getDefaultWriteConcern, getKey, getMongo, getQueryFactory, mapReduce, mapReduce, merge, merge, queryByExample, save, save, save, save, save, setDefaultWriteConcern, setQueryFactory, update, update, update, update, update, updateFirst, updateFirst, updateFirst, updateFirst
Key<?> exists(Object keyOrEntity, com.mongodb.ReadPreference readPreference)
readPreference
- Uses the supplied ReadPreference for the check. If readPreference is null the preference is taken from the
annotation or uses the default preference.Datastore.exists(Object)
<T,V> com.mongodb.DBRef createRef(Class<T> clazz, V id)
<T> com.mongodb.DBRef createRef(T entity)
<T> T get(Class<T> clazz, com.mongodb.DBRef ref)
long getCount(String kind)
<T,V> Query<T> find(String kind, Class<T> clazz, String property, V value, int offset, int size)
@Deprecated <T> com.mongodb.WriteResult delete(String kind, T id)
<T,V> com.mongodb.WriteResult delete(String kind, Class<T> clazz, V id, com.mongodb.WriteConcern wc)
<T> Key<T> insert(T entity)
<T> Key<T> insert(T entity, com.mongodb.WriteConcern wc)
<T> Query<T> queryByExample(String kind, T example)
<T> UpdateOperations<T> createUpdateOperations(Class<T> kind, com.mongodb.DBObject ops)
com.mongodb.DBDecoderFactory setDecoderFact(com.mongodb.DBDecoderFactory fact)
com.mongodb.DBDecoderFactory getDecoderFact()
Copyright © 2015. All rights reserved.