Interface FromStream<X,S extends jakarta.persistence.criteria.From<?,X>>

All Superinterfaces:
ExprStream<X,S>, PathStream<X,S>, QueryConfigurer<jakarta.persistence.criteria.AbstractQuery<?>,X,S>, QueryStream<X,S,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>, SearchStream<X,S>
All Known Subinterfaces:
FromValue<X,S>, RootStream<X>, RootValue<X>

public interface FromStream<X,S extends jakarta.persistence.criteria.From<?,X>> extends PathStream<X,S>
SearchStream containing items representable as Froms.
  • Method Details

    • distinct

      FromStream<X,S> distinct()
      Description copied from interface: SearchStream
      Suppress duplicates.
      Specified by:
      distinct in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      distinct in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      distinct in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Returns:
      a new stream with duplicates removed
    • orderBy

      FromStream<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      orderBy in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      orderBy in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      ref - previously bound expression reference
      asc - true for ascending, false for descending
      Returns:
      a new stream with specified ordering
    • orderBy

      FromStream<X,S> orderBy(jakarta.persistence.metamodel.SingularAttribute<? super X,?> attribute, boolean asc)
      Description copied from interface: SearchStream
      Order results using the specified property.

      Replaces any existing sort ordering.

      Specified by:
      orderBy in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      orderBy in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      orderBy in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      attribute - associated property
      asc - true for ascending, false for descending
      Returns:
      a new stream with specified ordering
    • orderBy

      FromStream<X,S> orderBy(jakarta.persistence.metamodel.SingularAttribute<? super X,?> attribute1, boolean asc1, jakarta.persistence.metamodel.SingularAttribute<? super X,?> attribute2, boolean asc2)
      Description copied from interface: SearchStream
      Order results using the specified properties.

      Replaces any existing sort ordering.

      Specified by:
      orderBy in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      orderBy in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      orderBy in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      attribute1 - associated property
      asc1 - true for attribute1 ascending, false for attribute1 descending
      attribute2 - associated property
      asc2 - true for attribute2 ascending, false for attribute2 descending
      Returns:
      a new stream with specified ordering
    • orderBy

      FromStream<X,S> orderBy(jakarta.persistence.metamodel.SingularAttribute<? super X,?> attribute1, boolean asc1, jakarta.persistence.metamodel.SingularAttribute<? super X,?> attribute2, boolean asc2, jakarta.persistence.metamodel.SingularAttribute<? super X,?> attribute3, boolean asc3)
      Description copied from interface: SearchStream
      Order results using the specified properties.

      Replaces any existing sort ordering.

      Specified by:
      orderBy in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      orderBy in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      orderBy in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      attribute1 - associated property
      asc1 - true for attribute1 ascending, false for attribute1 descending
      attribute2 - associated property
      asc2 - true for attribute2 ascending, false for attribute2 descending
      attribute3 - associated property
      asc3 - true for attribute3 ascending, false for attribute3 descending
      Returns:
      a new stream with specified ordering
    • orderBy

      FromStream<X,S> orderBy(Function<? super S,? 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      orderBy in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      orderBy in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      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

      FromStream<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      orderBy in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      orderBy in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      orders - ordering(s), with higher precedence orderings first
      Returns:
      a new stream with specified ordering(s)
    • orderByMulti

      FromStream<X,S> orderByMulti(Function<? super S,? 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      orderByMulti in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      orderByMulti in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      orderListFunction - Function that produces the sort ordering given an item expression
      Returns:
      a new stream with specified ordering
    • thenOrderBy

      FromStream<X,S> thenOrderBy(jakarta.persistence.metamodel.SingularAttribute<? super X,?> attribute, boolean asc)
      Description copied from interface: SearchStream
      Order results using the specified property after existing sort.

      Adds to any existing sort ordering.

      Specified by:
      thenOrderBy in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      thenOrderBy in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      thenOrderBy in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      attribute - associated property
      asc - true for ascending, false for descending
      Returns:
      a new stream with specified additional ordering
    • thenOrderBy

      FromStream<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      thenOrderBy in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      thenOrderBy in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      ref - previously bound expression reference
      asc - true for ascending, false for descending
      Returns:
      a new stream with specified additional ordering
    • thenOrderBy

      FromStream<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      thenOrderBy in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      thenOrderBy in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      orders - ordering(s), with higher precedence orderings first
      Returns:
      a new stream with specified additional ordering(s)
    • thenOrderBy

      FromStream<X,S> thenOrderBy(Function<? super S,? 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      thenOrderBy in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      thenOrderBy in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      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

      FromStream<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      groupBy in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      groupBy in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      ref - previously bound expression reference
      Returns:
      a new stream with additional grouping
    • groupBy

      FromStream<X,S> groupBy(jakarta.persistence.metamodel.SingularAttribute<? super X,?> attribute)
      Description copied from interface: SearchStream
      Apply grouping based on the specified property.

      Adds to any previously specified groupings.

      Specified by:
      groupBy in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      groupBy in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      groupBy in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      attribute - associated property
      Returns:
      a new stream with additional grouping
    • groupBy

      FromStream<X,S> groupBy(Function<? super S,? 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      groupBy in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      groupBy in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      groupFunction - function returning an expression by which to group results
      Returns:
      a new stream with additional grouping
    • groupByMulti

      FromStream<X,S> groupByMulti(Function<? super S,? 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      groupByMulti in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      groupByMulti in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      groupFunction - function returning a list of expressions by which to group results
      Returns:
      a new instance
    • having

      FromStream<X,S> having(Function<? super S,? 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      having in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      having in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      havingFunction - function returning a test to apply to grouped results
      Returns:
      a new instance
    • findAny

      FromValue<X,S> findAny()
      Description copied from interface: SearchStream
      Find any instance in the stream.
      Specified by:
      findAny in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      findAny in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      findAny in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Returns:
      single-valued stream containg any instance in this stream (or NULL if this stream is empty)
    • findFirst

      FromValue<X,S> findFirst()
      Description copied from interface: SearchStream
      Find the first instance in the stream.
      Specified by:
      findFirst in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      findFirst in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      findFirst in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Returns:
      single-valued stream containg the first instance in this stream (or NULL if this stream is empty)
    • findSingle

      FromValue<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      findSingle in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      findSingle in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Returns:
      a single value, either the only instance in this stream or null if this stream is empty
    • fetch

      FromStream<X,S> fetch(jakarta.persistence.metamodel.SingularAttribute<? super X,?> attribute)
      Description copied from interface: SearchStream
      Add a singular fetch inner join to this stream.

      Equivalent to fetch(attribute, JoinType.INNER).

      Specified by:
      fetch in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      fetch in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      fetch in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      attribute - associated property
      Returns:
      a new stream with specified inner fetch join
    • fetch

      FromStream<X,S> fetch(jakarta.persistence.metamodel.SingularAttribute<? super X,?> attribute, jakarta.persistence.criteria.JoinType joinType)
      Description copied from interface: SearchStream
      Add a singular fetch join to this stream.

      Unlike join(), this method does not change the stream's content type. In other words, this method is used simply to pre-fetch an association, to avoid having to fetch it again later for each individual element in the stream.

      Specified by:
      fetch in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      fetch in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      fetch in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      attribute - associated property
      joinType - join type
      Returns:
      a new stream with specified fetch join
    • fetch

      FromStream<X,S> fetch(jakarta.persistence.metamodel.PluralAttribute<? super X,?,?> attribute)
      Description copied from interface: SearchStream
      Add a plural fetch join to this stream.

      Equivalent to fetch(attribute, JoinType.INNER).

      Specified by:
      fetch in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      fetch in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      fetch in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      attribute - associated property
      Returns:
      a new stream with specified inner fetch join
    • fetch

      FromStream<X,S> fetch(jakarta.persistence.metamodel.PluralAttribute<? super X,?,?> attribute, jakarta.persistence.criteria.JoinType joinType)
      Description copied from interface: SearchStream
      Add a plural fetch join to this stream.

      Unlike join(), this method does not change the stream's content type. In other words, this method is used simply to pre-fetch an association, to avoid having to fetch it again later for each individual element in the stream.

      Specified by:
      fetch in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      fetch in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      fetch in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      attribute - associated property
      joinType - join type
      Returns:
      a new stream with specified fetch join
    • bind

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

      FromStream<X,S> peek(Consumer<? super S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      peek in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      peek in interface QueryStream<X,S extends jakarta.persistence.criteria.From<?,X>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>
      Specified by:
      peek in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      peeker - peeker into stream
      Returns:
      new stream that peeks into this stream
    • bind

      <X2, S2 extends jakarta.persistence.criteria.Selection<X2>> FromStream<X,S> bind(Ref<X2,? super S2> ref, Function<? super S,? 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      bind in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      bind in interface QueryStream<X,S extends jakarta.persistence.criteria.From<?,X>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>
      Specified by:
      bind in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      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> FromStream<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      addRoot in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      addRoot in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      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

      FromStream<X,S> filter(jakarta.persistence.metamodel.SingularAttribute<? super X,Boolean> attribute)
      Description copied from interface: QueryStream
      Filter results using the specified boolean property.

      Adds to any previously specified filters.

      Specified by:
      filter in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      filter in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      filter in interface QueryStream<X,S extends jakarta.persistence.criteria.From<?,X>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>
      Specified by:
      filter in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      attribute - boolean property
      Returns:
      new filtered stream
    • filter

      FromStream<X,S> filter(Function<? super S,? 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      filter in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      filter in interface QueryStream<X,S extends jakarta.persistence.criteria.From<?,X>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>
      Specified by:
      filter in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      predicateBuilder - function mapping this stream's item to a boolean Expression
      Returns:
      new filtered stream
    • limit

      FromStream<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      limit in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      limit in interface QueryStream<X,S extends jakarta.persistence.criteria.From<?,X>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>
      Specified by:
      limit in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      maxSize - maximum number of elements to return
      Returns:
      new truncated stream
    • skip

      FromStream<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      skip in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      skip in interface QueryStream<X,S extends jakarta.persistence.criteria.From<?,X>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>
      Specified by:
      skip in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      num - number of elements to skip
      Returns:
      new elided stream
    • withFlushMode

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

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

      FromStream<X,S> withHint(String name, Object value)
      Description copied from interface: QueryStream
      Associate a hint with this query.
      Specified by:
      withHint in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withHint in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withHint in interface QueryStream<X,S extends jakarta.persistence.criteria.From<?,X>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>
      Specified by:
      withHint in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      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

      FromStream<X,S> withHints(Map<String,Object> hints)
      Description copied from interface: QueryStream
      Associate hints with this query.
      Specified by:
      withHints in interface ExprStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withHints in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withHints in interface QueryStream<X,S extends jakarta.persistence.criteria.From<?,X>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>
      Specified by:
      withHints in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      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> FromStream<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withParam in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withParam in interface QueryStream<X,S extends jakarta.persistence.criteria.From<?,X>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>
      Specified by:
      withParam in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      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

      FromStream<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withParam in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withParam in interface QueryStream<X,S extends jakarta.persistence.criteria.From<?,X>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>
      Specified by:
      withParam in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      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

      FromStream<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withParam in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withParam in interface QueryStream<X,S extends jakarta.persistence.criteria.From<?,X>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>
      Specified by:
      withParam in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      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

      FromStream<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withParams in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withParams in interface QueryStream<X,S extends jakarta.persistence.criteria.From<?,X>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>
      Specified by:
      withParams in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      params - bindings to add
      Returns:
      new stream with the specified parameter bindings added
      See Also:
      • Query.setParameter(Parameter, Object)
    • withLoadGraph

      FromStream<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withLoadGraph in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withLoadGraph in interface QueryStream<X,S extends jakarta.persistence.criteria.From<?,X>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>
      Specified by:
      withLoadGraph in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      name - name of load graph
      Returns:
      new stream with the specified load graph configured
    • withFetchGraph

      FromStream<X,S> 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<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withFetchGraph in interface PathStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Specified by:
      withFetchGraph in interface QueryStream<X,S extends jakarta.persistence.criteria.From<?,X>,jakarta.persistence.criteria.AbstractQuery<?>,jakarta.persistence.criteria.CriteriaQuery<X>,jakarta.persistence.TypedQuery<X>>
      Specified by:
      withFetchGraph in interface SearchStream<X,S extends jakarta.persistence.criteria.From<?,X>>
      Parameters:
      name - name of fetch graph
      Returns:
      new stream with the specified fetch graph configured