public interface GetList<E> extends Command<List<E>>
GetList is a command interface to get entities match to the
specified Filters in the specified range ordered by the specified
sort orders. This command's execution result is entities as List
view. You can build & execute this command as the following code, in App
Engine example:
import org.eiichiro.acidhouse.Session;
import org.eiichiro.acidhouse.appengine.AppEngineDatastoreSession;
...
// Creating 'Session' instance.
Session session = new AppEngineDatastoreSession();
// Get metamodel instance of 'Entity3' class.
Entity3$ entity3$ = Metamodels.metamodel(Entity3.class);
// Filtering: "Entity3"'s 'entity1.i' property is greater than or equal to 13,
// and 15 or 16 or 17 or 18 or 19 or 20.
// Range: from 1 to 3 (offset value).
// Ordering: In descending order of "Entity3"'s 'i' property.
List<Entity3> entity3s = session
.get(entity3$)
.filter(entity3$.entity1.i.greaterThanOrEqualTo(13),
entity3$.entity1.i.in(15, 16, 17, 18, 19, 20))
.offset(1)
.limit(3)
.sort(entity3$.i.desc)
.execute();
| Modifier and Type | Method and Description |
|---|---|
GetList<E> |
filter(Filter<?>... filters)
Qualifies entities to be retrieved with the specified
Filters. |
GetList<E> |
limit(int limit)
Qualifies limit size of returned list.
|
GetList<E> |
offset(int offset)
Qualifies offset of execution result to be contained in the returned list
at first.
|
GetList<E> |
sort(Order<?,?>... orders)
Specifies sort orders by which the returned list is sorted.
|
GetList<E> sort(Order<?,?>... orders)
orders - The sort orders by which the returned list is sorted.GetList which the execution result is sorted
by the specified sort orders.GetList<E> filter(Filter<?>... filters)
Filters.
Each of the specified filters is combined with "logical and".filters - Filters to qualify entities to be retrieved.GetList which the execution result is
qualified with the specified Filters.GetList<E> limit(int limit)
limit - The limit size of returned list.GetList which the execution result is qualified with
the specified limit.GetList<E> offset(int offset)
offset - The offset of execution result to be contained in the
returned list at first.GetList which the execution result is qualified with
the specified offset.Copyright © 2009-2014 Eiichiro Uchiumi. All Rights Reserved.