Interface SearchLoadingOptionsStep
-
public interface SearchLoadingOptionsStep
The DSL entry point passed to consumers inSearchQueryOptionsStep.loading(Consumer)
, allowing the definition of loading options (fetch size, cache lookups, ...).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SearchLoadingOptionsStep
cacheLookupStrategy(EntityLoadingCacheLookupStrategy strategy)
Set the strategy for cache lookup before query results are loaded.SearchLoadingOptionsStep
fetchSize(int fetchSize)
Set the fetch size for this query, i.e.SearchLoadingOptionsStep
graph(String graphName, org.hibernate.graph.GraphSemantic semantic)
Customize fetching/loading of entity attributes and associations according to the entity graph with the given name, with the given semantic.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.
-
-
-
Method Detail
-
fetchSize
SearchLoadingOptionsStep fetchSize(int 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:
Query.setFetchSize(int)
-
cacheLookupStrategy
SearchLoadingOptionsStep cacheLookupStrategy(EntityLoadingCacheLookupStrategy strategy)
Set the strategy for cache lookup before query results are loaded.- Parameters:
strategy
- The strategy.- Returns:
this
for 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:
this
for method chaining.- See Also:
Session.createEntityGraph(Class)
,Session.createEntityGraph(String)
,Session.getEntityGraph(String)
-
graph
SearchLoadingOptionsStep graph(String graphName, org.hibernate.graph.GraphSemantic semantic)
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
-
-