public class QueryWrapper<H extends QueryWrapper<H,T>,T> extends SimpleQueryWrapper<H,T> implements Query<T>
class MyQuery<T> extends QueryWrapper<MyQuery<T>, T>
Constructor and Description |
---|
QueryWrapper(Query<T> base) |
Modifier and Type | Method and Description |
---|---|
H |
filter(String condition,
Object value)
Create a filter based on the specified condition and value, using
the same syntax as the GAE/Python query class.
|
H |
order(String condition)
Sorts based on a property.
|
ancestor, chunk, chunkAll, clone, count, distinct, endAt, filterKey, filterKey, first, hybrid, iterable, iterator, keys, limit, list, offset, reverse, startAt, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
ancestor, chunk, chunkAll, endAt, filterKey, hybrid, limit, offset, reverse, startAt
count, distinct, filterKey, keys, toString
first, iterable, list
public H filter(String condition, Object value)
Query
Create a filter based on the specified condition and value, using the same syntax as the GAE/Python query class. Examples:
filter("age >=", age)
filter("age =", age)
filter("age", age)
(if no operator, = is assumed)filter("age !=", age)
filter("age in", ageList)
The space between the property name and the operator is required.
Filtering a condition of "age>="
will perform an equality test on an entity
property exactly named "age>=". You can't create properties like this with Objectify, but you
can with the Low-Level API.
See the Google documentation for indexes for an explanation of what you can and cannot filter for.
In addition to filtering on indexed properties, you can filter on @Id properties
if this query is restricted to a ClassfilterKey()
which builds the key for you.
You can not filter on @Parent properties. Use
filterKey()
or ancestor()
instead.
public H order(String condition)
Query
Sorts based on a property. Examples:
order("age")
order("-age")
(descending sort)You can sort on @Id properties if this query is
restricted to a Class
You can not sort on @Parent properties.
Copyright © 2014. All rights reserved.