|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplay.modules.morphia.Model.MorphiaQuery
public static class Model.MorphiaQuery
Constructor Summary | |
---|---|
Model.MorphiaQuery(Class<? extends Model> clazz)
|
|
Model.MorphiaQuery(Class<? extends Model> clazz,
DBCollection coll,
Datastore ds)
|
|
Model.MorphiaQuery(Class<? extends Model> clazz,
DBCollection coll,
Datastore ds,
int offset,
int limit)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Model.MorphiaQuery(Class<? extends Model> clazz)
public Model.MorphiaQuery(Class<? extends Model> clazz, DBCollection coll, Datastore ds)
public Model.MorphiaQuery(Class<? extends Model> clazz, DBCollection coll, Datastore ds, int offset, int limit)
Method Detail |
---|
public static Datastore ds()
public Query<? extends Model> getMorphiaQuery()
public DBObject getQueryObject()
public DBCollection col()
public long delete()
public long count()
public Model.MorphiaQuery findBy(String query, Object... params)
query
- could be either "Key1[AndKey2[AndKey3]]" or
"byKey1[AndKey2[AndKey3]]" or "key1 key2 ..."params
- the number of params should either be exactly one or the
number match the key number
public String toString()
toString
in class Object
public <T> T first()
public <T> Model.MorphiaQuery from(int position)
position
- Position of the first element
public <T extends Model> List<T> fetchAll()
public <T extends Model> List<T> fetch(int max)
max
- Max results to fetch
public <T extends Model> List<T> fetch(int page, int length)
page
- Page number (start at 1)length
- (page length)
public Model _get()
public <T extends Model> T get()
public <T extends Model> Model.MorphiaQuery filter(String condition, Object value)
public <T extends Model> Key<T> getKey()
public <T extends Model> Iterator<T> iterator()
public <T extends Model> List<T> asList()
public <T extends Model> List<Key<T>> asKeyList()
public <T extends Model> Iterable<T> fetch()
public Set<?> distinct(String key)
public Map<String,Long> cloud(String field)
public List<CommandResult> group(String groupKeys, DBObject initial, String reduce, String finalize)
groupKeys
- could be either "f1Andf2.." or "f1 f2" or "f1,f2"
public AggregationResult groupMax(String field, String... groupKeys)
public Long max(String maxField)
public AggregationResult groupMin(String field, String... groupKeys)
public Long min(String minField)
public AggregationResult groupAverage(String field, String... groupKeys)
public Long average(String field)
public AggregationResult groupSum(String field, String... groupKeys)
public Long sum(String field)
public AggregationResult groupCount(String field, String... groupKeys)
public <T extends Model> Iterable<T> fetchEmptyEntities()
public <T extends Model> FieldEnd<? extends Query<T>> field(String field)
public <T extends Model> Iterable<Key<T>> fetchKeys()
public <T extends Model> FieldEnd<? extends CriteriaContainerImpl> criteria(String field)
public <T extends Model> CriteriaContainer and(Criteria... criteria)
public long countAll()
public <T extends Model> CriteriaContainer or(Criteria... criteria)
public <T extends Model> Model.MorphiaQuery where(String js)
public <T extends Model> Model.MorphiaQuery where(CodeWScope js)
public <T extends Model> Model.MorphiaQuery order(String condition)
public <T extends Model> Model.MorphiaQuery limit(int value)
public <T extends Model> Model.MorphiaQuery batchSize(int value)
public <T extends Model> Model.MorphiaQuery offset(int value)
@Deprecated public <T extends Model> Model.MorphiaQuery skip(int value)
public <T extends Model> Model.MorphiaQuery enableValidation()
public <T extends Model> Model.MorphiaQuery disableValidation()
public <T extends Model> Model.MorphiaQuery hintIndex(String idxName)
public <T extends Model> Model.MorphiaQuery retrievedFields(boolean include, String... fields)
public <T extends Model> Model.MorphiaQuery enableSnapshotMode()
public <T extends Model> Model.MorphiaQuery disableSnapshotMode()
public <T extends Model> Model.MorphiaQuery queryNonPrimary()
public <T extends Model> Model.MorphiaQuery queryPrimaryOnly()
@Deprecated public <T extends Model> Model.MorphiaQuery disableTimeout()
public <T extends Model> Model.MorphiaQuery disableCursorTimeout()
@Deprecated public <T extends Model> Model.MorphiaQuery enableTimeout()
public <T extends Model> Model.MorphiaQuery enableCursorTimeout()
public Class<? extends Model> getEntityClass()
public Model.MorphiaQuery clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |