Interface SearchLoadingOptionsStep
public interface SearchLoadingOptionsStep
The DSL entry point passed to consumers in
SearchQueryOptionsStep.loading(Consumer)
,
allowing the definition of loading options (fetch size, cache lookups, ...).-
Method Summary
Modifier and TypeMethodDescriptionSet the strategy for cache lookup before query results are loaded.fetchSize
(int fetchSize) Set the fetch size for this query, i.e.graph
(jakarta.persistence.EntityGraph<?> graph, GraphSemantic semantic) Customize fetching/loading of entity attributes and associations according to the given entity graph, with the given semantic.graph
(String graphName, GraphSemantic semantic) Customize fetching/loading of entity attributes and associations according to the entity graph with the given name, with the given semantic.
-
Method Details
-
fetchSize
Set the fetch size for this query, i.e. the amount of entities to load for each query to the database.Higher numbers mean fewer queries, but larger result sets.
- Parameters:
fetchSize
- The fetch size. Must be positive or zero.- Returns:
this
for method chaining.- See Also:
-
cacheLookupStrategy
Set the strategy for cache lookup before query results are loaded.- Parameters:
strategy
- The strategy.- Returns:
this
for method chaining.
-
graph
Customize fetching/loading of entity attributes and associations according to the given entity graph, with the given semantic.- Parameters:
graph
- The graph to apply.semantic
- The semantic to use when applying the graph.- Returns:
this
for method chaining.- See Also:
-
graph
Customize fetching/loading of entity attributes and associations according to the entity graph with the given name, with the given semantic.- Parameters:
graphName
- The name of the graph to apply.semantic
- The semantic to use when applying the graph.- Returns:
this
for method chaining.- See Also:
-
NamedEntityGraph
-