@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 TypeMethodDescriptionbuild()
Build and return the FetchGroup.Fetch all the properties at the given path.fetch
(String path, FetchGroup<?> nestedGroup) Fetch the path with the nested fetch group.Fetch the path including specified properties.fetchCache
(String path) Fetch the path including all its properties using L2 cache.fetchCache
(String path, String properties) Fetch the path including specified properties using L2 cache.Fetch the path including all its properties lazily.fetchLazy
(String path, FetchGroup<?> nestedGroup) Fetch the path lazily with the nested fetch group.Fetch the path including specified properties lazily.fetchQuery
(String path) Fetch the path including all its properties using a query join.fetchQuery
(String path, FetchGroup<?> nestedGroup) Fetch the path using a query join with the nested fetch group.fetchQuery
(String path, String properties) Fetch the path including specified properties using a query join.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.
-