Package io.ebean
Interface FetchGroupBuilder<T>
@NonNullApi public interface FetchGroupBuilder<T>
Builds a FetchGroup by adding fetch clauses.
We add select() and fetch() clauses to define the object graph we want to load.
FetchGroup fetchGroup = FetchGroup
.select("name, status")
.fetch("contacts", "firstName, lastName, email")
.build();
Customer.query()
.select(fetchGroup)
.where()
...
.findList();
-
Method Summary
Modifier and Type Method Description FetchGroup<T>build()Build and return the FetchGroup.FetchGroupBuilder<T>fetch(String path)Fetch all the properties at the given path.FetchGroupBuilder<T>fetch(String path, FetchGroup<?> nestedGroup)Fetch the path with the nested fetch group.FetchGroupBuilder<T>fetch(String path, String properties)Fetch the path including specified properties.FetchGroupBuilder<T>fetchCache(String path)Fetch the path including all its properties using L2 cache.FetchGroupBuilder<T>fetchCache(String path, String properties)Fetch the path including specified properties using L2 cache.FetchGroupBuilder<T>fetchLazy(String path)Fetch the path including all its properties lazily.FetchGroupBuilder<T>fetchLazy(String path, FetchGroup<?> nestedGroup)Fetch the path lazily with the nested fetch group.FetchGroupBuilder<T>fetchLazy(String path, String properties)Fetch the path including specified properties lazily.FetchGroupBuilder<T>fetchQuery(String path)Fetch the path including all its properties using a query join.FetchGroupBuilder<T>fetchQuery(String path, FetchGroup<?> nestedGroup)Fetch the path using a query join with the nested fetch group.FetchGroupBuilder<T>fetchQuery(String path, String properties)Fetch the path including specified properties using a query join.FetchGroupBuilder<T>select(String select)Specify specific properties to select (top level properties).
-
Method Details
-
select
Specify specific properties to select (top level properties). -
fetch
Fetch all the properties at the given path. -
fetch
Fetch the path with the nested fetch group. -
fetchQuery
Fetch the path using a query join with the nested fetch group. -
fetchLazy
Fetch the path lazily with the nested fetch group. -
fetch
Fetch the path including specified properties. -
fetchQuery
Fetch the path including all its properties using a query join. -
fetchCache
Fetch the path including all its properties using L2 cache. Cache misses fallback to fetchQuery(). -
fetchQuery
Fetch the path including specified properties using a query join. -
fetchCache
Fetch the path including specified properties using L2 cache. Cache misses fallback to fetchQuery(). -
fetchLazy
Fetch the path including all its properties lazily. -
fetchLazy
Fetch the path including specified properties lazily. -
build
FetchGroup<T> build()Build and return the FetchGroup.
-