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 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)
      • 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