Java Code Examples for com.googlecode.objectify.cmd.Query#list()
The following examples show how to use
com.googlecode.objectify.cmd.Query#list() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConferenceApi.java From ud859 with GNU General Public License v3.0 | 5 votes |
@ApiMethod( name = "queryConferences_nofilters", path = "queryConferences_nofilters", httpMethod = HttpMethod.POST ) public List<Conference> queryConferences_nofilters() { // Find all entities of type Conference Query<Conference> query = ofy().load().type(Conference.class).order("name"); return query.list(); }
Example 2
Source File: ConferenceApi.java From ud859 with GNU General Public License v3.0 | 5 votes |
public List<Conference> filterPlayground() { // Query<Conference> query = ofy().load().type(Conference.class).order("name"); Query<Conference> query = ofy().load().type(Conference.class); /* // Filter on city query = query.filter("city =", "London"); // query = query.filter("city =", "Default City"); // Add a filter for topic = "Medical Innovations" query = query.filter("topics =", "Medical Innovations"); // Add a filter for maxAttendees query = query.filter("maxAttendees >", 8); query = query.filter("maxAttendees <", 10).order("maxAttendees").order("name"); // Add a filter for month {unindexed composite query} // Find conferences in June query = query.filter("month =", 6); */ // multiple sort orders query = query.filter("city =", "Tokyo").filter("seatsAvailable <", 10). filter("seatsAvailable >" , 0).order("seatsAvailable").order("name"). order("month"); return query.list(); }
Example 3
Source File: ConferenceApi.java From ud859 with GNU General Public License v3.0 | 5 votes |
/** Code to add at the start of querying for conferences **/ @ApiMethod( name = "queryConferences_nofilters", path = "queryConferences_nofilters", httpMethod = HttpMethod.POST ) public List<Conference> queryConferences_nofilters() { // Find all entities of type Conference Query<Conference> query = ofy().load().type(Conference.class).order("name"); return query.list(); }
Example 4
Source File: ConferenceApi.java From ud859 with GNU General Public License v3.0 | 5 votes |
public List<Conference> filterPlayground() { // Query<Conference> query = ofy().load().type(Conference.class).order("name"); Query<Conference> query = ofy().load().type(Conference.class); /* // Filter on city query = query.filter("city =", "London"); // query = query.filter("city =", "Default City"); // Add a filter for topic = "Medical Innovations" query = query.filter("topics =", "Medical Innovations"); // Add a filter for maxAttendees query = query.filter("maxAttendees >", 8); query = query.filter("maxAttendees <", 10).order("maxAttendees").order("name"); // Add a filter for month {unindexed composite query} // Find conferences in June query = query.filter("month =", 6); */ // multiple sort orders query = query.filter("city =", "Tokyo").filter("seatsAvailable <", 10). filter("seatsAvailable >" , 0).order("seatsAvailable").order("name"). order("month"); return query.list(); }