Interface SearchLoadingOptionsStep
-
public interface SearchLoadingOptionsStepThe 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 SearchLoadingOptionsStepcacheLookupStrategy(EntityLoadingCacheLookupStrategy strategy)Set the strategy for cache lookup before query results are loaded.SearchLoadingOptionsStepfetchSize(int fetchSize)Set the fetch size for this query, i.e.SearchLoadingOptionsStepgraph(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.SearchLoadingOptionsStepgraph(javax.persistence.EntityGraph<?> 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:
thisfor 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:
thisfor method chaining.
-
graph
SearchLoadingOptionsStep graph(javax.persistence.EntityGraph<?> 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
SearchLoadingOptionsStep 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.- 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
-
-