Query

From a http/json call, a java or javascript method you can query your entities using a fluent API that nicely exposes the Datastore Query class.

Javascript:

yawp('/people').where([ 'name', '=', 'Janes']).first( function(person) {} );

yawp('/people').order([ { p: 'name', d: 'desc' } ]).list( function(people) {} );

yawp('/people').from(parentId).list( function(people) {} );

Java:

Person person = yawp(Person.class).where("name", "=", "Janes").first();

List<Person> people = yawp(Person.class).order("name", "desc").list();

List<Person> people = yawp(Person.class).from(parentId).list();

Other Java examples, also available from http/json or Javascript:

yawp(Person.class).where("name", "=", "Mark").and("age", ">=", 21).list();

yawp(Person.class).where(or(and(c("company", "=", "github.com"), c("age", ">=", 21)), and(c("company", "=", "YAWP!"), c("age", ">=", 18)))).ids();

yawp(Person.class).where("name", "=", "John").and("company", "=", "github.com").only();

Note: The methods c, and and or must be static imported or fully qualified.

You can look at this Java test suite to see examples of more complex constructions.