- 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
SearchStream containing Integer values.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.dellroad.querystream.jpa.QueryStream
QueryStream.Builder -
Method Summary
Modifier and TypeMethodDescription<R> IntStreamBind an unbound reference to a new query root that will be added to the query.average()Bind an unbound reference to the items in this stream.<X2,S2 extends jakarta.persistence.criteria.Selection<X2>>
IntStreambind(Ref<X2, ? super S2> ref, Function<? super jakarta.persistence.criteria.Expression<Integer>, ? extends S2> refFunction) Bind an unbound reference to the result of applying the given function to the items in this stream.distinct()Suppress duplicates.filter(Function<? super jakarta.persistence.criteria.Expression<Integer>, ? extends jakarta.persistence.criteria.Expression<Boolean>> predicateBuilder) Filter results using the boolean expression produced by the given function.findAny()Find any instance in the stream.Find the first instance in the stream.Find the only instance in the stream or null.groupBy(Function<? super jakarta.persistence.criteria.Expression<Integer>, ? extends jakarta.persistence.criteria.Expression<?>> groupFunction) Apply grouping based on a single expression.Apply grouping based on an expression reference.groupByMulti(Function<? super jakarta.persistence.criteria.Expression<Integer>, ? extends List<jakarta.persistence.criteria.Expression<?>>> groupFunction) Apply grouping based on a list of expressions.having(Function<? super jakarta.persistence.criteria.Expression<Integer>, ? extends jakarta.persistence.criteria.Expression<Boolean>> havingFunction) Add a "having" restriction.limit(int maxSize) Return this stream truncated to the specified maximum length.max()min()orderBy(jakarta.persistence.criteria.Order... orders) Order results using the specifiedOrders.orderBy(Function<? super jakarta.persistence.criteria.Expression<Integer>, ? extends jakarta.persistence.criteria.Expression<?>> orderExprFunction, boolean asc) Order results using theExpressionproduced by the givenFunction.Order results using the specified expression reference.orderByMulti(Function<? super jakarta.persistence.criteria.Expression<Integer>, ? extends List<? extends jakarta.persistence.criteria.Order>> orderListFunction) Order results using theOrderlist produced by the givenFunction.Peek at the items in this stream.skip(int num) Return this stream with the specified number of initial elements skipped.sum()thenOrderBy(jakarta.persistence.criteria.Order... orders) Order results using the specifiedOrders after existing sort.thenOrderBy(Function<? super jakarta.persistence.criteria.Expression<Integer>, ? extends jakarta.persistence.criteria.Expression<?>> orderExprFunction, boolean asc) Order results using theExpressionproduced by the givenFunctionafter existing sort.thenOrderBy(Ref<?, ? extends jakarta.persistence.criteria.Expression<?>> ref, boolean asc) Order results using the specified expression reference after existing sort.withFetchGraph(String name) Configure a fetch graph for this query.withFlushMode(jakarta.persistence.FlushModeType flushMode) Set theFlushModeTypeassociated with this query.Associate a hint with this query.Associate hints with this query.withLoadGraph(String name) Configure a load graph for this query.withLockMode(jakarta.persistence.LockModeType lockMode) Set theLockModeTypeassociated with this query.withParam(jakarta.persistence.Parameter<Calendar> parameter, Calendar value, jakarta.persistence.TemporalType temporalType) Bind the value of a query parameter of typeCalendar.withParam(jakarta.persistence.Parameter<Date> parameter, Date value, jakarta.persistence.TemporalType temporalType) Bind the value of a query parameter of typeDate.<T> IntStreamwithParam(jakarta.persistence.Parameter<T> parameter, T value) Bind the value of a query parameter.withParams(Iterable<? extends ParamBinding<?>> params) Associate parameter bindings with this query.Methods inherited from interface org.dellroad.querystream.jpa.ExprStream
asSubquery, count, countDistinct, exists, fetch, fetch, fetch, fetch, filter, groupBy, orderBy, orderBy, orderBy, thenOrderByMethods inherited from interface org.dellroad.querystream.jpa.QueryConfigurer
configureMethods inherited from interface org.dellroad.querystream.jpa.QueryStream
getEntityManager, getFirstResult, getFlushMode, getHints, getLockMode, getMaxResults, getParams, toCriteriaQuery, toQueryMethods inherited from interface org.dellroad.querystream.jpa.SearchStream
allMatch, allMatch, anyMatch, anyMatch, flatMap, flatMap, flatMap, flatMapKeys, flatMapValues, getQueryType, getResultList, getResultStream, isEmpty, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, map, map, map, map, mapToDouble, mapToDouble, mapToExpr, mapToFrom, mapToInt, mapToInt, mapToLong, mapToLong, mapToPath, mapToRef, mapToRef, mapToRef, mapToRef, mapToRoot, mapToSelection, noneMatch, noneMatch
-
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:SearchStreamSuppress duplicates.- Specified by:
distinctin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
distinctin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Returns:
- a new stream with duplicates removed
-
orderBy
Description copied from interface:SearchStreamOrder results using the specified expression reference.Replaces any existing sort ordering.
- Specified by:
orderByin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
orderByin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Parameters:
ref- previously bound expression referenceasc- 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:SearchStreamOrder results using theExpressionproduced by the givenFunction.Replaces any existing sort ordering.
- Specified by:
orderByin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
orderByin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Parameters:
orderExprFunction-Functionthat produces anExpressionto order on given an item expressionasc- true for ascending, false for descending- Returns:
- a new stream with specified ordering
-
orderBy
Description copied from interface:SearchStreamOrder results using the specifiedOrders.Replaces any existing sort ordering.
- Specified by:
orderByin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
orderByin interfaceSearchStream<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:SearchStreamOrder results using theOrderlist produced by the givenFunction.Replaces any existing sort ordering.
- Specified by:
orderByMultiin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
orderByMultiin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Parameters:
orderListFunction-Functionthat produces the sort ordering given an item expression- Returns:
- a new stream with specified ordering
-
thenOrderBy
Description copied from interface:SearchStreamOrder results using the specified expression reference after existing sort.Adds to any existing sort ordering.
- Specified by:
thenOrderByin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
thenOrderByin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Parameters:
ref- previously bound expression referenceasc- true for ascending, false for descending- Returns:
- a new stream with specified additional ordering
-
thenOrderBy
Description copied from interface:SearchStreamOrder results using the specifiedOrders after existing sort.Adds to any existing sort ordering.
- Specified by:
thenOrderByin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
thenOrderByin interfaceSearchStream<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:SearchStreamOrder results using theExpressionproduced by the givenFunctionafter existing sort.Adds to any existing sort ordering.
- Specified by:
thenOrderByin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
thenOrderByin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Parameters:
orderExprFunction-Functionthat produces anExpressionto order on given an item expressionasc- true for ascending, false for descending- Returns:
- a new stream with specified additional ordering
-
groupBy
Description copied from interface:SearchStreamApply grouping based on an expression reference.Adds to any previously specified groupings.
- Specified by:
groupByin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
groupByin interfaceSearchStream<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:SearchStreamApply grouping based on a single expression.Adds to any previously specified groupings.
- Specified by:
groupByin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
groupByin interfaceSearchStream<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:SearchStreamApply grouping based on a list of expressions.Adds to any previously specified groupings.
- Specified by:
groupByMultiin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
groupByMultiin interfaceSearchStream<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:SearchStreamAdd a "having" restriction.Adds to any previously specified "having" restrictions.
- Specified by:
havingin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
havingin interfaceSearchStream<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:SearchStreamFind any instance in the stream.- Specified by:
findAnyin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
findAnyin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Returns:
- single-valued stream containg any instance in this stream (or
NULLif this stream is empty)
-
findFirst
IntValue findFirst()Description copied from interface:SearchStreamFind the first instance in the stream.- Specified by:
findFirstin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
findFirstin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Returns:
- single-valued stream containg the first instance in this stream (or
NULLif this stream is empty)
-
findSingle
IntValue findSingle()Description copied from interface:SearchStreamFind 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"
SearchValuemethods such asvalue()ortoOptional()will generate aNonUniqueResultException.Using this method is preferable to using
SearchStream.findFirst()orSearchStream.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:
findSinglein interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
findSinglein interfaceSearchStream<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
Description copied from interface:QueryStreamBind an unbound reference to the items in this stream.- Specified by:
bindin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
bindin interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
bindin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Parameters:
ref- unbound reference- Returns:
- new stream that binds
ref
-
peek
Description copied from interface:QueryStreamPeek at the items in this stream.This is useful in cases where the selection can be modified, e.g., setting join
ONconditions usingJoin.on().- Specified by:
peekin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
peekin interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
peekin interfaceSearchStream<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:QueryStreamBind an unbound reference to the result of applying the given function to the items in this stream.- Specified by:
bindin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
bindin interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
bindin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Type Parameters:
X2- type of the bound valueS2- criteria type of the bound value- Parameters:
ref- unbound referencerefFunction- function mapping this stream'sSelectionto the reference value- Returns:
- new stream that binds
ref
-
addRoot
Description copied from interface:SearchStreamBind an unbound reference to a new query root that will be added to the query.To select the new root in a
SearchStream, useSearchStream.map(), providing aFunctionthat returnsref.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:
addRootin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
addRootin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Type Parameters:
R- type of the new query root- Parameters:
ref- unbound referencetype- type of the new query root- Returns:
- new stream that binds
refto a new query root fromtype
-
filter
IntStream filter(Function<? super jakarta.persistence.criteria.Expression<Integer>, ? extends jakarta.persistence.criteria.Expression<Boolean>> predicateBuilder) Description copied from interface:QueryStreamFilter results using the boolean expression produced by the given function.Adds to any previously specified filters.
- Specified by:
filterin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
filterin interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
filterin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Parameters:
predicateBuilder- function mapping this stream's item to a booleanExpression- Returns:
- new filtered stream
-
limit
Description copied from interface:QueryStreamReturn 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:
limitin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
limitin interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
limitin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Parameters:
maxSize- maximum number of elements to return- Returns:
- new truncated stream
-
skip
Description copied from interface:QueryStreamReturn 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:
skipin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
skipin interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
skipin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Parameters:
num- number of elements to skip- Returns:
- new elided stream
-
withFlushMode
Description copied from interface:QueryStreamSet theFlushModeTypeassociated with this query.- Specified by:
withFlushModein interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
withFlushModein interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
withFlushModein interfaceSearchStream<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
Description copied from interface:QueryStreamSet theLockModeTypeassociated with this query.- Specified by:
withLockModein interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
withLockModein interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
withLockModein interfaceSearchStream<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
Description copied from interface:QueryStreamAssociate a hint with this query.- Specified by:
withHintin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
withHintin interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
withHintin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Parameters:
name- name of hintvalue- value of hint- Returns:
- new stream with the specified hint configured
- See Also:
-
Query.setHint(java.lang.String, java.lang.Object)
-
withHints
Description copied from interface:QueryStreamAssociate hints with this query.- Specified by:
withHintsin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
withHintsin interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
withHintsin interfaceSearchStream<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
Description copied from interface:QueryStreamBind the value of a query parameter.Replaces any previous binding of the same parameter.
- Specified by:
withParamin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
withParamin interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
withParamin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Type Parameters:
T- parameter value type- Parameters:
parameter- the parameter to setvalue- 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:QueryStreamBind the value of a query parameter of typeDate.Replaces any previous binding of the same parameter.
- Specified by:
withParamin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
withParamin interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
withParamin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Parameters:
parameter- the parameter to setvalue- parameter valuetemporalType- temporal type forvalue- 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:QueryStreamBind the value of a query parameter of typeCalendar.Replaces any previous binding of the same parameter.
- Specified by:
withParamin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
withParamin interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
withParamin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Parameters:
parameter- the parameter to setvalue- parameter valuetemporalType- temporal type forvalue- Returns:
- new stream with the specified parameter value set
- See Also:
-
Query.setParameter(Parameter, Calendar, TemporalType)
-
withParams
Description copied from interface:QueryStreamAssociate parameter bindings with this query.Replaces any previous bindings of the same parameters.
- Specified by:
withParamsin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
withParamsin interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
withParamsin interfaceSearchStream<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
Description copied from interface:QueryStreamConfigure a load graph for this query.Equivalent to
withHint("jakarta.persistence.loadgraph", name).- Specified by:
withLoadGraphin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
withLoadGraphin interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
withLoadGraphin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Parameters:
name- name of load graph- Returns:
- new stream with the specified load graph configured
-
withFetchGraph
Description copied from interface:QueryStreamConfigure a fetch graph for this query.Equivalent to
withHint("jakarta.persistence.fetchgraph", name).- Specified by:
withFetchGraphin interfaceExprStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Specified by:
withFetchGraphin interfaceQueryStream<Integer,jakarta.persistence.criteria.Expression<Integer>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Integer>, jakarta.persistence.TypedQuery<Integer>> - Specified by:
withFetchGraphin interfaceSearchStream<Integer,jakarta.persistence.criteria.Expression<Integer>> - Parameters:
name- name of fetch graph- Returns:
- new stream with the specified fetch graph configured
-