public interface RootStream<X> extends FromStream<X,Root<X>>
SearchStream containing items representable as Roots.QueryStream.Builder| Modifier and Type | Method and Description |
|---|---|
<R> RootStream<X> |
addRoot(Ref<R,? super Root<R>> ref,
Class<R> type)
Bind an unbound reference to a new query root that will be added to the query.
|
RootStream<X> |
bind(Ref<X,? super Root<X>> ref)
Bind an unbound reference to the items in this stream.
|
<X2,S2 extends Selection<X2>> |
bind(Ref<X2,? super S2> ref,
Function<? super Root<X>,? extends S2> refFunction)
Bind an unbound reference to the result of applying the given function to the items in this stream.
|
<Y extends X> |
cast(Class<Y> type)
Map this stream into a stream whose elements are the result of applying the given narrowing cast.
|
RootStream<X> |
distinct()
Suppress duplicates.
|
RootStream<X> |
fetch(PluralAttribute<? super X,?,?> attribute)
Add a plural fetch join to this stream.
|
RootStream<X> |
fetch(PluralAttribute<? super X,?,?> attribute,
JoinType joinType)
Add a plural fetch join to this stream.
|
RootStream<X> |
fetch(SingularAttribute<? super X,?> attribute)
Add a singular fetch inner join to this stream.
|
RootStream<X> |
fetch(SingularAttribute<? super X,?> attribute,
JoinType joinType)
Add a singular fetch join to this stream.
|
RootStream<X> |
filter(Function<? super Root<X>,? extends Expression<Boolean>> predicateBuilder)
Filter results using the boolean expression produced by the given function.
|
RootStream<X> |
filter(SingularAttribute<? super X,Boolean> attribute)
Filter results using the specified boolean property.
|
RootValue<X> |
findAny()
Find any instance in the stream.
|
RootValue<X> |
findFirst()
Find the first instance in the stream.
|
RootValue<X> |
findSingle()
Find the only instance in the stream.
|
RootStream<X> |
groupBy(Function<? super Root<X>,? extends Expression<?>> groupFunction)
Apply grouping based on a single expression.
|
RootStream<X> |
groupBy(Ref<?,? extends Expression<?>> ref)
Apply grouping based on an expression reference.
|
RootStream<X> |
groupBy(SingularAttribute<? super X,?> attribute)
Apply grouping based on the specified property.
|
RootStream<X> |
groupByMulti(Function<? super Root<X>,? extends List<Expression<?>>> groupFunction)
Apply grouping based on a list of expressions.
|
RootStream<X> |
having(Function<? super Root<X>,? extends Expression<Boolean>> havingFunction)
Add a "having" restriction.
|
RootStream<X> |
limit(int maxSize)
Return this stream truncated to the specified maximum length.
|
RootStream<X> |
orderBy(Function<? super Root<X>,? extends Expression<?>> orderExprFunction,
boolean asc)
Order results using the
Expression produced by the given Function. |
RootStream<X> |
orderBy(Order... orders)
Order results using the specified
Orders. |
RootStream<X> |
orderBy(Ref<?,? extends Expression<?>> ref,
boolean asc)
Order results using the specified expression reference.
|
RootStream<X> |
orderBy(SingularAttribute<? super X,?> attribute,
boolean asc)
Order results using the specified property.
|
RootStream<X> |
orderBy(SingularAttribute<? super X,?> attribute1,
boolean asc1,
SingularAttribute<? super X,?> attribute2,
boolean asc2)
Order results using the specified properties.
|
RootStream<X> |
orderBy(SingularAttribute<? super X,?> attribute1,
boolean asc1,
SingularAttribute<? super X,?> attribute2,
boolean asc2,
SingularAttribute<? super X,?> attribute3,
boolean asc3)
Order results using the specified properties.
|
RootStream<X> |
orderByMulti(Function<? super Root<X>,? extends List<? extends Order>> orderListFunction)
|
RootStream<X> |
peek(Consumer<? super Root<X>> peeker)
Peek at the items in this stream.
|
RootStream<X> |
skip(int num)
Return this stream with the specified number of initial elements skipped.
|
RootStream<X> |
thenOrderBy(Function<? super Root<X>,? extends Expression<?>> orderExprFunction,
boolean asc)
Order results using the
Expression produced by the given Function after existing sort. |
RootStream<X> |
thenOrderBy(Order... orders)
Order results using the specified
Orders after existing sort. |
RootStream<X> |
thenOrderBy(Ref<?,? extends Expression<?>> ref,
boolean asc)
Order results using the specified expression reference after existing sort.
|
RootStream<X> |
thenOrderBy(SingularAttribute<? super X,?> attribute,
boolean asc)
Order results using the specified property after existing sort.
|
RootStream<X> |
withFetchGraph(String name)
Configure a fetch graph for this query.
|
RootStream<X> |
withFlushMode(FlushModeType flushMode)
Set the
FlushModeType associated with this query. |
RootStream<X> |
withHint(String name,
Object value)
Associate a hint with this query.
|
RootStream<X> |
withHints(Map<String,Object> hints)
Associate hints with this query.
|
RootStream<X> |
withLoadGraph(String name)
Configure a load graph for this query.
|
RootStream<X> |
withLockMode(LockModeType lockMode)
Set the
LockModeType associated with this query. |
RootStream<X> |
withParam(Parameter<Calendar> parameter,
Calendar value,
TemporalType temporalType)
Bind the value of a query parameter of type
Calendar. |
RootStream<X> |
withParam(Parameter<Date> parameter,
Date value,
TemporalType temporalType)
Bind the value of a query parameter of type
Date. |
<T> RootStream<X> |
withParam(Parameter<T> parameter,
T value)
Bind the value of a query parameter.
|
RootStream<X> |
withParams(Iterable<? extends ParamBinding<?>> params)
Associate parameter bindings with this query.
|
asSubquery, count, countDistinct, existsallMatch, 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, noneMatchgetEntityManager, getFirstResult, getFlushMode, getHints, getLockMode, getMaxResults, getParams, newBuilder, toCriteriaQuery, toQueryconfigure<Y extends X> RootStream<Y> cast(Class<Y> type)
PathStreamcast in interface PathStream<X,Root<X>>Y - narrower typetype - new, narrower item typeCriteriaBuilder.treat()RootStream<X> distinct()
SearchStreamdistinct in interface ExprStream<X,Root<X>>distinct in interface FromStream<X,Root<X>>distinct in interface PathStream<X,Root<X>>distinct in interface SearchStream<X,Root<X>>RootStream<X> orderBy(Ref<?,? extends Expression<?>> ref, boolean asc)
SearchStreamReplaces any existing sort ordering.
orderBy in interface ExprStream<X,Root<X>>orderBy in interface FromStream<X,Root<X>>orderBy in interface PathStream<X,Root<X>>orderBy in interface SearchStream<X,Root<X>>ref - previously bound expression referenceasc - true for ascending, false for descendingRootStream<X> orderBy(SingularAttribute<? super X,?> attribute, boolean asc)
SearchStreamReplaces any existing sort ordering.
orderBy in interface ExprStream<X,Root<X>>orderBy in interface FromStream<X,Root<X>>orderBy in interface PathStream<X,Root<X>>orderBy in interface SearchStream<X,Root<X>>attribute - associated propertyasc - true for ascending, false for descendingRootStream<X> orderBy(SingularAttribute<? super X,?> attribute1, boolean asc1, SingularAttribute<? super X,?> attribute2, boolean asc2)
SearchStreamReplaces any existing sort ordering.
orderBy in interface ExprStream<X,Root<X>>orderBy in interface FromStream<X,Root<X>>orderBy in interface PathStream<X,Root<X>>orderBy in interface SearchStream<X,Root<X>>attribute1 - associated propertyasc1 - true for attribute1 ascending, false for attribute1 descendingattribute2 - associated propertyasc2 - true for attribute2 ascending, false for attribute2 descendingRootStream<X> orderBy(SingularAttribute<? super X,?> attribute1, boolean asc1, SingularAttribute<? super X,?> attribute2, boolean asc2, SingularAttribute<? super X,?> attribute3, boolean asc3)
SearchStreamReplaces any existing sort ordering.
orderBy in interface ExprStream<X,Root<X>>orderBy in interface FromStream<X,Root<X>>orderBy in interface PathStream<X,Root<X>>orderBy in interface SearchStream<X,Root<X>>attribute1 - associated propertyasc1 - true for attribute1 ascending, false for attribute1 descendingattribute2 - associated propertyasc2 - true for attribute2 ascending, false for attribute2 descendingattribute3 - associated propertyasc3 - true for attribute3 ascending, false for attribute3 descendingRootStream<X> orderBy(Function<? super Root<X>,? extends Expression<?>> orderExprFunction, boolean asc)
SearchStreamExpression produced by the given Function.
Replaces any existing sort ordering.
orderBy in interface ExprStream<X,Root<X>>orderBy in interface FromStream<X,Root<X>>orderBy in interface PathStream<X,Root<X>>orderBy in interface SearchStream<X,Root<X>>orderExprFunction - Function that produces an Expression to order on given an item expressionasc - true for ascending, false for descendingRootStream<X> orderBy(Order... orders)
SearchStreamOrders.
Replaces any existing sort ordering.
orderBy in interface ExprStream<X,Root<X>>orderBy in interface FromStream<X,Root<X>>orderBy in interface PathStream<X,Root<X>>orderBy in interface SearchStream<X,Root<X>>orders - ordering(s), with higher precedence orderings firstRootStream<X> orderByMulti(Function<? super Root<X>,? extends List<? extends Order>> orderListFunction)
SearchStreamOrder list produced by the given Function.
Replaces any existing sort ordering.
orderByMulti in interface ExprStream<X,Root<X>>orderByMulti in interface FromStream<X,Root<X>>orderByMulti in interface PathStream<X,Root<X>>orderByMulti in interface SearchStream<X,Root<X>>orderListFunction - Function that produces the sort ordering given an item expressionRootStream<X> thenOrderBy(SingularAttribute<? super X,?> attribute, boolean asc)
SearchStreamAdds to any existing sort ordering.
thenOrderBy in interface ExprStream<X,Root<X>>thenOrderBy in interface FromStream<X,Root<X>>thenOrderBy in interface PathStream<X,Root<X>>thenOrderBy in interface SearchStream<X,Root<X>>attribute - associated propertyasc - true for ascending, false for descendingRootStream<X> thenOrderBy(Ref<?,? extends Expression<?>> ref, boolean asc)
SearchStreamAdds to any existing sort ordering.
thenOrderBy in interface ExprStream<X,Root<X>>thenOrderBy in interface FromStream<X,Root<X>>thenOrderBy in interface PathStream<X,Root<X>>thenOrderBy in interface SearchStream<X,Root<X>>ref - previously bound expression referenceasc - true for ascending, false for descendingRootStream<X> thenOrderBy(Order... orders)
SearchStreamOrders after existing sort.
Adds to any existing sort ordering.
thenOrderBy in interface ExprStream<X,Root<X>>thenOrderBy in interface FromStream<X,Root<X>>thenOrderBy in interface PathStream<X,Root<X>>thenOrderBy in interface SearchStream<X,Root<X>>orders - ordering(s), with higher precedence orderings firstRootStream<X> thenOrderBy(Function<? super Root<X>,? extends Expression<?>> orderExprFunction, boolean asc)
SearchStreamExpression produced by the given Function after existing sort.
Adds to any existing sort ordering.
thenOrderBy in interface ExprStream<X,Root<X>>thenOrderBy in interface FromStream<X,Root<X>>thenOrderBy in interface PathStream<X,Root<X>>thenOrderBy in interface SearchStream<X,Root<X>>orderExprFunction - Function that produces an Expression to order on given an item expressionasc - true for ascending, false for descendingRootStream<X> groupBy(Ref<?,? extends Expression<?>> ref)
SearchStreamAdds to any previously specified groupings.
groupBy in interface ExprStream<X,Root<X>>groupBy in interface FromStream<X,Root<X>>groupBy in interface PathStream<X,Root<X>>groupBy in interface SearchStream<X,Root<X>>ref - previously bound expression referenceRootStream<X> groupBy(SingularAttribute<? super X,?> attribute)
SearchStreamAdds to any previously specified groupings.
groupBy in interface ExprStream<X,Root<X>>groupBy in interface FromStream<X,Root<X>>groupBy in interface PathStream<X,Root<X>>groupBy in interface SearchStream<X,Root<X>>attribute - associated propertyRootStream<X> groupBy(Function<? super Root<X>,? extends Expression<?>> groupFunction)
SearchStreamAdds to any previously specified groupings.
groupBy in interface ExprStream<X,Root<X>>groupBy in interface FromStream<X,Root<X>>groupBy in interface PathStream<X,Root<X>>groupBy in interface SearchStream<X,Root<X>>groupFunction - function returning an expression by which to group resultsRootStream<X> groupByMulti(Function<? super Root<X>,? extends List<Expression<?>>> groupFunction)
SearchStreamAdds to any previously specified groupings.
groupByMulti in interface ExprStream<X,Root<X>>groupByMulti in interface FromStream<X,Root<X>>groupByMulti in interface PathStream<X,Root<X>>groupByMulti in interface SearchStream<X,Root<X>>groupFunction - function returning a list of expressions by which to group resultsRootStream<X> having(Function<? super Root<X>,? extends Expression<Boolean>> havingFunction)
SearchStreamAdds to any previously specified "having" restrictions.
having in interface ExprStream<X,Root<X>>having in interface FromStream<X,Root<X>>having in interface PathStream<X,Root<X>>having in interface SearchStream<X,Root<X>>havingFunction - function returning a test to apply to grouped resultsRootValue<X> findAny()
SearchStreamfindAny in interface ExprStream<X,Root<X>>findAny in interface FromStream<X,Root<X>>findAny in interface PathStream<X,Root<X>>findAny in interface SearchStream<X,Root<X>>NULL if this stream is empty)RootValue<X> findFirst()
SearchStreamfindFirst in interface ExprStream<X,Root<X>>findFirst in interface FromStream<X,Root<X>>findFirst in interface PathStream<X,Root<X>>findFirst in interface SearchStream<X,Root<X>>NULL if this stream is empty)RootValue<X> findSingle()
SearchStream
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);
findSingle in interface ExprStream<X,Root<X>>findSingle in interface FromStream<X,Root<X>>findSingle in interface PathStream<X,Root<X>>findSingle in interface SearchStream<X,Root<X>>NULL if this stream is empty)RootStream<X> bind(Ref<X,? super Root<X>> ref)
QueryStreambind in interface ExprStream<X,Root<X>>bind in interface FromStream<X,Root<X>>bind in interface PathStream<X,Root<X>>bind in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>bind in interface SearchStream<X,Root<X>>ref - unbound referencerefRootStream<X> peek(Consumer<? super Root<X>> peeker)
QueryStream
This is useful in cases where the selection can be modified, e.g., setting join ON conditions
using Join.on().
peek in interface ExprStream<X,Root<X>>peek in interface FromStream<X,Root<X>>peek in interface PathStream<X,Root<X>>peek in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>peek in interface SearchStream<X,Root<X>>peeker - peeker into stream<X2,S2 extends Selection<X2>> RootStream<X> bind(Ref<X2,? super S2> ref, Function<? super Root<X>,? extends S2> refFunction)
QueryStreambind in interface ExprStream<X,Root<X>>bind in interface FromStream<X,Root<X>>bind in interface PathStream<X,Root<X>>bind in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>bind in interface SearchStream<X,Root<X>>X2 - type of the bound valueS2 - criteria type of the bound valueref - unbound referencerefFunction - function mapping this stream's Selection to the reference valueref<R> RootStream<X> addRoot(Ref<R,? super Root<R>> ref, Class<R> type)
SearchStream
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.
addRoot in interface ExprStream<X,Root<X>>addRoot in interface FromStream<X,Root<X>>addRoot in interface PathStream<X,Root<X>>addRoot in interface SearchStream<X,Root<X>>R - type of the new query rootref - unbound referencetype - type of the new query rootref to a new query root from typeRootStream<X> filter(SingularAttribute<? super X,Boolean> attribute)
QueryStreamAdds to any previously specified filters.
filter in interface ExprStream<X,Root<X>>filter in interface FromStream<X,Root<X>>filter in interface PathStream<X,Root<X>>filter in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>filter in interface SearchStream<X,Root<X>>attribute - boolean propertyRootStream<X> filter(Function<? super Root<X>,? extends Expression<Boolean>> predicateBuilder)
QueryStreamAdds to any previously specified filters.
filter in interface ExprStream<X,Root<X>>filter in interface FromStream<X,Root<X>>filter in interface PathStream<X,Root<X>>filter in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>filter in interface SearchStream<X,Root<X>>predicateBuilder - function mapping this stream's item to a boolean ExpressionRootStream<X> limit(int maxSize)
QueryStreamDue 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.).
limit in interface ExprStream<X,Root<X>>limit in interface FromStream<X,Root<X>>limit in interface PathStream<X,Root<X>>limit in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>limit in interface SearchStream<X,Root<X>>maxSize - maximum number of elements to returnRootStream<X> skip(int num)
QueryStreamDue 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.).
skip in interface ExprStream<X,Root<X>>skip in interface FromStream<X,Root<X>>skip in interface PathStream<X,Root<X>>skip in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>skip in interface SearchStream<X,Root<X>>num - number of elements to skipRootStream<X> withFlushMode(FlushModeType flushMode)
QueryStreamFlushModeType associated with this query.withFlushMode in interface ExprStream<X,Root<X>>withFlushMode in interface FromStream<X,Root<X>>withFlushMode in interface PathStream<X,Root<X>>withFlushMode in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withFlushMode in interface SearchStream<X,Root<X>>flushMode - new flush modeQuery.setFlushMode(javax.persistence.FlushModeType)RootStream<X> withLockMode(LockModeType lockMode)
QueryStreamLockModeType associated with this query.withLockMode in interface ExprStream<X,Root<X>>withLockMode in interface FromStream<X,Root<X>>withLockMode in interface PathStream<X,Root<X>>withLockMode in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withLockMode in interface SearchStream<X,Root<X>>lockMode - new lock modeQuery.setLockMode(javax.persistence.LockModeType)RootStream<X> withHint(String name, Object value)
QueryStreamwithHint in interface ExprStream<X,Root<X>>withHint in interface FromStream<X,Root<X>>withHint in interface PathStream<X,Root<X>>withHint in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withHint in interface SearchStream<X,Root<X>>name - name of hintvalue - value of hintQuery.setHint(java.lang.String, java.lang.Object)RootStream<X> withHints(Map<String,Object> hints)
QueryStreamwithHints in interface ExprStream<X,Root<X>>withHints in interface FromStream<X,Root<X>>withHints in interface PathStream<X,Root<X>>withHints in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withHints in interface SearchStream<X,Root<X>>hints - hints to addQuery.setHint(java.lang.String, java.lang.Object)<T> RootStream<X> withParam(Parameter<T> parameter, T value)
QueryStreamReplaces any previous binding of the same parameter.
withParam in interface ExprStream<X,Root<X>>withParam in interface FromStream<X,Root<X>>withParam in interface PathStream<X,Root<X>>withParam in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withParam in interface SearchStream<X,Root<X>>T - parameter value typeparameter - the parameter to setvalue - parameter valueQuery.setParameter(javax.persistence.Parameter, Object)RootStream<X> withParam(Parameter<Date> parameter, Date value, TemporalType temporalType)
QueryStreamDate.
Replaces any previous binding of the same parameter.
withParam in interface ExprStream<X,Root<X>>withParam in interface FromStream<X,Root<X>>withParam in interface PathStream<X,Root<X>>withParam in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withParam in interface SearchStream<X,Root<X>>parameter - the parameter to setvalue - parameter valuetemporalType - temporal type for valueQuery.setParameter(javax.persistence.Parameter, Date, TemporalType)RootStream<X> withParam(Parameter<Calendar> parameter, Calendar value, TemporalType temporalType)
QueryStreamCalendar.
Replaces any previous binding of the same parameter.
withParam in interface ExprStream<X,Root<X>>withParam in interface FromStream<X,Root<X>>withParam in interface PathStream<X,Root<X>>withParam in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withParam in interface SearchStream<X,Root<X>>parameter - the parameter to setvalue - parameter valuetemporalType - temporal type for valueQuery.setParameter(javax.persistence.Parameter, Calendar, TemporalType)RootStream<X> withParams(Iterable<? extends ParamBinding<?>> params)
QueryStreamReplaces any previous bindings of the same parameters.
withParams in interface ExprStream<X,Root<X>>withParams in interface FromStream<X,Root<X>>withParams in interface PathStream<X,Root<X>>withParams in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withParams in interface SearchStream<X,Root<X>>params - bindings to addQuery.setParameter(javax.persistence.Parameter, Object)RootStream<X> withLoadGraph(String name)
QueryStream
Equivalent to withHint("javax.persistence.loadgraph", name).
withLoadGraph in interface ExprStream<X,Root<X>>withLoadGraph in interface FromStream<X,Root<X>>withLoadGraph in interface PathStream<X,Root<X>>withLoadGraph in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withLoadGraph in interface SearchStream<X,Root<X>>name - name of load graphRootStream<X> withFetchGraph(String name)
QueryStream
Equivalent to withHint("javax.persistence.fetchgraph", name).
withFetchGraph in interface ExprStream<X,Root<X>>withFetchGraph in interface FromStream<X,Root<X>>withFetchGraph in interface PathStream<X,Root<X>>withFetchGraph in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withFetchGraph in interface SearchStream<X,Root<X>>name - name of fetch graphRootStream<X> fetch(SingularAttribute<? super X,?> attribute)
SearchStream
Equivalent to fetch(attribute, JoinType.INNER).
fetch in interface ExprStream<X,Root<X>>fetch in interface FromStream<X,Root<X>>fetch in interface PathStream<X,Root<X>>fetch in interface SearchStream<X,Root<X>>attribute - associated propertyRootStream<X> fetch(SingularAttribute<? super X,?> attribute, JoinType joinType)
SearchStream
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.
fetch in interface ExprStream<X,Root<X>>fetch in interface FromStream<X,Root<X>>fetch in interface PathStream<X,Root<X>>fetch in interface SearchStream<X,Root<X>>attribute - associated propertyjoinType - join typeRootStream<X> fetch(PluralAttribute<? super X,?,?> attribute)
SearchStream
Equivalent to fetch(attribute, JoinType.INNER).
fetch in interface ExprStream<X,Root<X>>fetch in interface FromStream<X,Root<X>>fetch in interface PathStream<X,Root<X>>fetch in interface SearchStream<X,Root<X>>attribute - associated propertyRootStream<X> fetch(PluralAttribute<? super X,?,?> attribute, JoinType joinType)
SearchStream
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.
fetch in interface ExprStream<X,Root<X>>fetch in interface FromStream<X,Root<X>>fetch in interface PathStream<X,Root<X>>fetch in interface SearchStream<X,Root<X>>attribute - associated propertyjoinType - join typeCopyright © 2023. All rights reserved.