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.Customize fetching/loading of entity attributes and associations according to the entity graph with the given name, with the given semantic.graph(javax.persistence.EntityGraph<?> graph, org.hibernate.graph.GraphSemantic semantic) Customize fetching/loading of entity attributes and associations according to the given entity graph, 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:
thisfor method chaining.- See Also:
-
Query.setFetchSize(int)
-
cacheLookupStrategy
Set the strategy for cache lookup before query results are loaded.- Parameters:
strategy- The strategy.- Returns:
thisfor method chaining.
-
graph
SearchLoadingOptionsStep graph(javax.persistence.EntityGraph<?> graph, org.hibernate.graph.GraphSemantic semantic) 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:
thisfor method chaining.- See Also:
-
Session.createEntityGraph(Class)Session.createEntityGraph(String)Session.getEntityGraph(String)
-
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:
thisfor method chaining.- See Also:
-
NamedEntityGraph
-