Interface IntStream

All Superinterfaces:
ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>, QueryConfigurer<jakarta.persistence.criteria.AbstractQuery<?>,Integer,jakarta.persistence.criteria.Expression<Integer>>, QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>, SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
All Known Subinterfaces:
IntValue

public interface IntStream extends ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
SearchStream containing Integer values.
  • Method Details

    • average

      DoubleValue average()
    • max

      IntValue max()
    • min

      IntValue min()
    • sum

      IntValue sum()
    • asLongStream

      LongStream asLongStream()
    • asDoubleStream

      DoubleStream asDoubleStream()
    • distinct

      IntStream distinct()
      Description copied from interface: SearchStream
      Suppress duplicates.
      Specified by:
      distinct in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      distinct in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Returns:
      a new stream with duplicates removed
    • orderBy

      IntStream orderBy(Ref<?,? extends jakarta.persistence.criteria.Expression<?>> ref, boolean asc)
      Description copied from interface: SearchStream
      Order results using the specified expression reference.

      Replaces any existing sort ordering.

      Specified by:
      orderBy in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      orderBy in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      ref - previously bound expression reference
      asc - true for ascending, false for descending
      Returns:
      a new stream with specified ordering
    • orderBy

      IntStream orderBy(Function<? super jakarta.persistence.criteria.Expression<Integer>,? extends jakarta.persistence.criteria.Expression<?>> orderExprFunction, boolean asc)
      Description copied from interface: SearchStream
      Order results using the Expression produced by the given Function.

      Replaces any existing sort ordering.

      Specified by:
      orderBy in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      orderBy in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      orderExprFunction - Function that produces an Expression to order on given an item expression
      asc - true for ascending, false for descending
      Returns:
      a new stream with specified ordering
    • orderBy

      IntStream orderBy(jakarta.persistence.criteria.Order... orders)
      Description copied from interface: SearchStream
      Order results using the specified Orders.

      Replaces any existing sort ordering.

      Specified by:
      orderBy in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      orderBy in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      orders - ordering(s), with higher precedence orderings first
      Returns:
      a new stream with specified ordering(s)
    • orderByMulti

      IntStream orderByMulti(Function<? super jakarta.persistence.criteria.Expression<Integer>,? extends List<? extends jakarta.persistence.criteria.Order>> orderListFunction)
      Description copied from interface: SearchStream
      Order results using the Order list produced by the given Function.

      Replaces any existing sort ordering.

      Specified by:
      orderByMulti in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      orderByMulti in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      orderListFunction - Function that produces the sort ordering given an item expression
      Returns:
      a new stream with specified ordering
    • thenOrderBy

      IntStream thenOrderBy(Ref<?,? extends jakarta.persistence.criteria.Expression<?>> ref, boolean asc)
      Description copied from interface: SearchStream
      Order results using the specified expression reference after existing sort.

      Adds to any existing sort ordering.

      Specified by:
      thenOrderBy in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      thenOrderBy in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      ref - previously bound expression reference
      asc - true for ascending, false for descending
      Returns:
      a new stream with specified additional ordering
    • thenOrderBy

      IntStream thenOrderBy(jakarta.persistence.criteria.Order... orders)
      Description copied from interface: SearchStream
      Order results using the specified Orders after existing sort.

      Adds to any existing sort ordering.

      Specified by:
      thenOrderBy in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      thenOrderBy in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      orders - ordering(s), with higher precedence orderings first
      Returns:
      a new stream with specified additional ordering(s)
    • thenOrderBy

      IntStream thenOrderBy(Function<? super jakarta.persistence.criteria.Expression<Integer>,? extends jakarta.persistence.criteria.Expression<?>> orderExprFunction, boolean asc)
      Description copied from interface: SearchStream
      Order results using the Expression produced by the given Function after existing sort.

      Adds to any existing sort ordering.

      Specified by:
      thenOrderBy in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      thenOrderBy in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      orderExprFunction - Function that produces an Expression to order on given an item expression
      asc - true for ascending, false for descending
      Returns:
      a new stream with specified additional ordering
    • groupBy

      IntStream groupBy(Ref<?,? extends jakarta.persistence.criteria.Expression<?>> ref)
      Description copied from interface: SearchStream
      Apply grouping based on an expression reference.

      Adds to any previously specified groupings.

      Specified by:
      groupBy in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      groupBy in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      ref - previously bound expression reference
      Returns:
      a new stream with additional grouping
    • groupBy

      IntStream groupBy(Function<? super jakarta.persistence.criteria.Expression<Integer>,? extends jakarta.persistence.criteria.Expression<?>> groupFunction)
      Description copied from interface: SearchStream
      Apply grouping based on a single expression.

      Adds to any previously specified groupings.

      Specified by:
      groupBy in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      groupBy in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      groupFunction - function returning an expression by which to group results
      Returns:
      a new stream with additional grouping
    • groupByMulti

      IntStream groupByMulti(Function<? super jakarta.persistence.criteria.Expression<Integer>,? extends List<jakarta.persistence.criteria.Expression<?>>> groupFunction)
      Description copied from interface: SearchStream
      Apply grouping based on a list of expressions.

      Adds to any previously specified groupings.

      Specified by:
      groupByMulti in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      groupByMulti in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      groupFunction - function returning a list of expressions by which to group results
      Returns:
      a new instance
    • having

      IntStream having(Function<? super jakarta.persistence.criteria.Expression<Integer>,? extends jakarta.persistence.criteria.Expression<Boolean>> havingFunction)
      Description copied from interface: SearchStream
      Add a "having" restriction.

      Adds to any previously specified "having" restrictions.

      Specified by:
      having in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      having in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      havingFunction - function returning a test to apply to grouped results
      Returns:
      a new instance
    • findAny

      IntValue findAny()
      Description copied from interface: SearchStream
      Find any instance in the stream.
      Specified by:
      findAny in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      findAny in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Returns:
      single-valued stream containg any instance in this stream (or NULL if this stream is empty)
    • findFirst

      IntValue findFirst()
      Description copied from interface: SearchStream
      Find the first instance in the stream.
      Specified by:
      findFirst in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      findFirst in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Returns:
      single-valued stream containg the first instance in this stream (or NULL if this stream is empty)
    • findSingle

      IntValue findSingle()
      Description copied from interface: SearchStream
      Find the only instance in the stream or null.

      Invoke this method only when you know that the result stream contains at most one value, e.g., when searching for an object by its value in a field with a unique constraint. If the stream actually contains multiple values, then invoking any of the "single value" SearchValue methods such as value() or toOptional() will generate a NonUniqueResultException.

      Using this method is preferable to using SearchStream.findFirst() or SearchStream.findAny() for the same purpose, because it not only actually verifies the uniqueness assumption, but it also makes that assumption clearer in the code.

      Example:

        final User user = qb.stream(User.class)
          .filter(u -> qb.equal(u.get(User_.username), username))
          .findSingle()
          .orElseThrow(NoSuchUserException::new);
       
      Specified by:
      findSingle in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      findSingle in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Returns:
      a single value, either the only instance in this stream or null if this stream is empty
    • bind

      IntStream bind(Ref<Integer,? super jakarta.persistence.criteria.Expression<Integer>> ref)
      Description copied from interface: QueryStream
      Bind an unbound reference to the items in this stream.
      Specified by:
      bind in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      bind in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      bind in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      ref - unbound reference
      Returns:
      new stream that binds ref
    • peek

      IntStream peek(Consumer<? super jakarta.persistence.criteria.Expression<Integer>> peeker)
      Description copied from interface: QueryStream
      Peek at the items in this stream.

      This is useful in cases where the selection can be modified, e.g., setting join ON conditions using Join.on().

      Specified by:
      peek in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      peek in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      peek in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      peeker - peeker into stream
      Returns:
      new stream that peeks into this stream
    • bind

      <X2, S2 extends jakarta.persistence.criteria.Selection<X2>> IntStream bind(Ref<X2,? super S2> ref, Function<? super jakarta.persistence.criteria.Expression<Integer>,? extends S2> refFunction)
      Description copied from interface: QueryStream
      Bind an unbound reference to the result of applying the given function to the items in this stream.
      Specified by:
      bind in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      bind in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      bind in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Type Parameters:
      X2 - type of the bound value
      S2 - criteria type of the bound value
      Parameters:
      ref - unbound reference
      refFunction - function mapping this stream's Selection to the reference value
      Returns:
      new stream that binds ref
    • addRoot

      <R> IntStream addRoot(Ref<R,? super jakarta.persistence.criteria.Root<R>> ref, Class<R> type)
      Description copied from interface: SearchStream
      Bind an unbound reference to a new query root that will be added to the query.

      To select the new root in a SearchStream, use SearchStream.map(), providing a Function that returns ref.

      Note that this effectively creates an unconstrained (cross product) join with the new root. Typically there would be some additional restrictions imposed (e.g., via filter()) to relate the new root to the items in the stream.

      Specified by:
      addRoot in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      addRoot in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Type Parameters:
      R - type of the new query root
      Parameters:
      ref - unbound reference
      type - type of the new query root
      Returns:
      new stream that binds ref to a new query root from type
    • filter

      IntStream filter(Function<? super jakarta.persistence.criteria.Expression<Integer>,? extends jakarta.persistence.criteria.Expression<Boolean>> predicateBuilder)
      Description copied from interface: QueryStream
      Filter results using the boolean expression produced by the given function.

      Adds to any previously specified filters.

      Specified by:
      filter in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      filter in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      filter in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      predicateBuilder - function mapping this stream's item to a boolean Expression
      Returns:
      new filtered stream
    • limit

      IntStream limit(int maxSize)
      Description copied from interface: QueryStream
      Return this stream truncated to the specified maximum length.

      Due to limitations in the JPA Criteria API, this method is not supported on subquery streams and in general must be specified last (after any filtering, sorting, grouping, joins, etc.).

      Specified by:
      limit in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      limit in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      limit in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      maxSize - maximum number of elements to return
      Returns:
      new truncated stream
    • skip

      IntStream skip(int num)
      Description copied from interface: QueryStream
      Return this stream with the specified number of initial elements skipped.

      Due to limitations in the JPA Criteria API, this method is not supported on subquery streams and in general must be specified last (after any filtering, sorting, grouping, joins, etc.).

      Specified by:
      skip in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      skip in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      skip in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      num - number of elements to skip
      Returns:
      new elided stream
    • withFlushMode

      IntStream withFlushMode(jakarta.persistence.FlushModeType flushMode)
      Description copied from interface: QueryStream
      Set the FlushModeType associated with this query.
      Specified by:
      withFlushMode in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      withFlushMode in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      withFlushMode in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      flushMode - new flush mode
      Returns:
      new stream with the specified flush mode configured
      See Also:
      • Query.setFlushMode(jakarta.persistence.FlushModeType)
    • withLockMode

      IntStream withLockMode(jakarta.persistence.LockModeType lockMode)
      Description copied from interface: QueryStream
      Set the LockModeType associated with this query.
      Specified by:
      withLockMode in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      withLockMode in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      withLockMode in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      lockMode - new lock mode
      Returns:
      new stream with the specified lock mode configured
      See Also:
      • Query.setLockMode(jakarta.persistence.LockModeType)
    • withHint

      IntStream withHint(String name, Object value)
      Description copied from interface: QueryStream
      Associate a hint with this query.
      Specified by:
      withHint in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      withHint in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      withHint in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      name - name of hint
      value - value of hint
      Returns:
      new stream with the specified hint configured
      See Also:
      • Query.setHint(java.lang.String, java.lang.Object)
    • withHints

      IntStream withHints(Map<String,Object> hints)
      Description copied from interface: QueryStream
      Associate hints with this query.
      Specified by:
      withHints in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      withHints in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      withHints in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      hints - hints to add
      Returns:
      new stream with the specified hints added
      See Also:
      • Query.setHint(java.lang.String, java.lang.Object)
    • withParam

      <T> IntStream withParam(jakarta.persistence.Parameter<T> parameter, T value)
      Description copied from interface: QueryStream
      Bind the value of a query parameter.

      Replaces any previous binding of the same parameter.

      Specified by:
      withParam in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      withParam in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      withParam in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Type Parameters:
      T - parameter value type
      Parameters:
      parameter - the parameter to set
      value - parameter value
      Returns:
      new stream with the specified parameter value set
      See Also:
      • Query.setParameter(Parameter, Object)
    • withParam

      IntStream withParam(jakarta.persistence.Parameter<Date> parameter, Date value, jakarta.persistence.TemporalType temporalType)
      Description copied from interface: QueryStream
      Bind the value of a query parameter of type Date.

      Replaces any previous binding of the same parameter.

      Specified by:
      withParam in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      withParam in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      withParam in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      parameter - the parameter to set
      value - parameter value
      temporalType - temporal type for value
      Returns:
      new stream with the specified parameter value set
      See Also:
      • Query.setParameter(Parameter, Date, TemporalType)
    • withParam

      IntStream withParam(jakarta.persistence.Parameter<Calendar> parameter, Calendar value, jakarta.persistence.TemporalType temporalType)
      Description copied from interface: QueryStream
      Bind the value of a query parameter of type Calendar.

      Replaces any previous binding of the same parameter.

      Specified by:
      withParam in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      withParam in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      withParam in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      parameter - the parameter to set
      value - parameter value
      temporalType - temporal type for value
      Returns:
      new stream with the specified parameter value set
      See Also:
      • Query.setParameter(Parameter, Calendar, TemporalType)
    • withParams

      IntStream withParams(Iterable<? extends ParamBinding<?>> params)
      Description copied from interface: QueryStream
      Associate parameter bindings with this query.

      Replaces any previous bindings of the same parameters.

      Specified by:
      withParams in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      withParams in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      withParams in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      params - bindings to add
      Returns:
      new stream with the specified parameter bindings added
      See Also:
      • Query.setParameter(Parameter, Object)
    • withLoadGraph

      IntStream withLoadGraph(String name)
      Description copied from interface: QueryStream
      Configure a load graph for this query.

      Equivalent to withHint("jakarta.persistence.loadgraph", name).

      Specified by:
      withLoadGraph in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      withLoadGraph in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      withLoadGraph in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      name - name of load graph
      Returns:
      new stream with the specified load graph configured
    • withFetchGraph

      IntStream withFetchGraph(String name)
      Description copied from interface: QueryStream
      Configure a fetch graph for this query.

      Equivalent to withHint("jakarta.persistence.fetchgraph", name).

      Specified by:
      withFetchGraph in interface ExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Specified by:
      withFetchGraph in interface QueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<Integer>,jakarta.persistence.TypedQuery<Integer>>
      Specified by:
      withFetchGraph in interface SearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>>
      Parameters:
      name - name of fetch graph
      Returns:
      new stream with the specified fetch graph configured