public interface RootValue<X> extends FromValue<X,Root<X>>, RootStream<X>
RootStream that is guaranteed to return at most a single result.QueryStream.Builder| Modifier and Type | Method and Description |
|---|---|
RootValue<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.
|
RootValue<X> |
filter(Function<? super Root<X>,? extends Expression<Boolean>> predicateBuilder)
Filter results using the boolean expression produced by the given function.
|
RootValue<X> |
filter(SingularAttribute<? super X,Boolean> attribute)
Filter results using the specified boolean property.
|
RootValue<X> |
peek(Consumer<? super Root<X>> peeker)
Peek at the items in this stream.
|
RootValue<X> |
withFetchGraph(String name)
Configure a fetch graph for this query.
|
RootValue<X> |
withFlushMode(FlushModeType flushMode)
Set the
FlushModeType associated with this query. |
RootValue<X> |
withHint(String name,
Object value)
Associate a hint with this query.
|
RootValue<X> |
withHints(Map<String,Object> hints)
Associate hints with this query.
|
RootValue<X> |
withLoadGraph(String name)
Configure a load graph for this query.
|
RootValue<X> |
withLockMode(LockModeType lockMode)
Set the
LockModeType associated with this query. |
RootValue<X> |
withParam(Parameter<Calendar> parameter,
Calendar value,
TemporalType temporalType)
Bind the value of a query parameter of type
Calendar. |
RootValue<X> |
withParam(Parameter<Date> parameter,
Date value,
TemporalType temporalType)
Bind the value of a query parameter of type
Date. |
<T> RootValue<X> |
withParam(Parameter<T> parameter,
T value)
Bind the value of a query parameter.
|
RootValue<X> |
withParams(Iterable<? extends ParamBinding<?>> params)
Associate parameter bindings with this query.
|
map, map, map, map, mapToDouble, mapToDouble, mapToExpr, mapToFrom, mapToInt, mapToInt, mapToLong, mapToLong, mapToPathifPresent, isPresent, mapToSelection, orElse, orElseGet, orElseThrow, toOptional, valueaddRoot, cast, distinct, fetch, fetch, fetch, fetch, findAny, findFirst, findSingle, groupBy, groupBy, groupBy, groupByMulti, having, limit, orderBy, orderBy, orderBy, orderBy, orderBy, orderBy, orderByMulti, skip, thenOrderBy, thenOrderBy, thenOrderBy, thenOrderByasSubquery, 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, mapToRef, mapToRef, mapToRef, mapToRef, mapToRoot, noneMatch, noneMatchgetEntityManager, getFirstResult, getFlushMode, getHints, getLockMode, getMaxResults, getParams, newBuilder, toCriteriaQuery, toQueryconfigureRootValue<X> bind(Ref<X,? super Root<X>> ref)
QueryStreambind in interface ExprStream<X,Root<X>>bind in interface ExprValue<X,Root<X>>bind in interface FromStream<X,Root<X>>bind in interface FromValue<X,Root<X>>bind in interface PathStream<X,Root<X>>bind in interface PathValue<X,Root<X>>bind in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>bind in interface RootStream<X>bind in interface SearchStream<X,Root<X>>bind in interface SearchValue<X,Root<X>>ref - unbound referencerefRootValue<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 ExprValue<X,Root<X>>peek in interface FromStream<X,Root<X>>peek in interface FromValue<X,Root<X>>peek in interface PathStream<X,Root<X>>peek in interface PathValue<X,Root<X>>peek in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>peek in interface RootStream<X>peek in interface SearchStream<X,Root<X>>peek in interface SearchValue<X,Root<X>>peeker - peeker into stream<X2,S2 extends Selection<X2>> RootValue<X> bind(Ref<X2,? super S2> ref, Function<? super Root<X>,? extends S2> refFunction)
QueryStreambind in interface ExprStream<X,Root<X>>bind in interface ExprValue<X,Root<X>>bind in interface FromStream<X,Root<X>>bind in interface FromValue<X,Root<X>>bind in interface PathStream<X,Root<X>>bind in interface PathValue<X,Root<X>>bind in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>bind in interface RootStream<X>bind in interface SearchStream<X,Root<X>>bind in interface SearchValue<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 valuerefRootValue<X> filter(SingularAttribute<? super X,Boolean> attribute)
QueryStreamAdds to any previously specified filters.
filter in interface ExprStream<X,Root<X>>filter in interface ExprValue<X,Root<X>>filter in interface FromStream<X,Root<X>>filter in interface FromValue<X,Root<X>>filter in interface PathStream<X,Root<X>>filter in interface PathValue<X,Root<X>>filter in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>filter in interface RootStream<X>filter in interface SearchStream<X,Root<X>>filter in interface SearchValue<X,Root<X>>attribute - boolean propertyRootValue<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 ExprValue<X,Root<X>>filter in interface FromStream<X,Root<X>>filter in interface FromValue<X,Root<X>>filter in interface PathStream<X,Root<X>>filter in interface PathValue<X,Root<X>>filter in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>filter in interface RootStream<X>filter in interface SearchStream<X,Root<X>>filter in interface SearchValue<X,Root<X>>predicateBuilder - function mapping this stream's item to a boolean ExpressionRootValue<X> withFlushMode(FlushModeType flushMode)
QueryStreamFlushModeType associated with this query.withFlushMode in interface ExprStream<X,Root<X>>withFlushMode in interface ExprValue<X,Root<X>>withFlushMode in interface FromStream<X,Root<X>>withFlushMode in interface FromValue<X,Root<X>>withFlushMode in interface PathStream<X,Root<X>>withFlushMode in interface PathValue<X,Root<X>>withFlushMode in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withFlushMode in interface RootStream<X>withFlushMode in interface SearchStream<X,Root<X>>withFlushMode in interface SearchValue<X,Root<X>>flushMode - new flush modeQuery.setFlushMode(javax.persistence.FlushModeType)RootValue<X> withLockMode(LockModeType lockMode)
QueryStreamLockModeType associated with this query.withLockMode in interface ExprStream<X,Root<X>>withLockMode in interface ExprValue<X,Root<X>>withLockMode in interface FromStream<X,Root<X>>withLockMode in interface FromValue<X,Root<X>>withLockMode in interface PathStream<X,Root<X>>withLockMode in interface PathValue<X,Root<X>>withLockMode in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withLockMode in interface RootStream<X>withLockMode in interface SearchStream<X,Root<X>>withLockMode in interface SearchValue<X,Root<X>>lockMode - new lock modeQuery.setLockMode(javax.persistence.LockModeType)RootValue<X> withHint(String name, Object value)
QueryStreamwithHint in interface ExprStream<X,Root<X>>withHint in interface ExprValue<X,Root<X>>withHint in interface FromStream<X,Root<X>>withHint in interface FromValue<X,Root<X>>withHint in interface PathStream<X,Root<X>>withHint in interface PathValue<X,Root<X>>withHint in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withHint in interface RootStream<X>withHint in interface SearchStream<X,Root<X>>withHint in interface SearchValue<X,Root<X>>name - name of hintvalue - value of hintQuery.setHint(java.lang.String, java.lang.Object)RootValue<X> withHints(Map<String,Object> hints)
QueryStreamwithHints in interface ExprStream<X,Root<X>>withHints in interface ExprValue<X,Root<X>>withHints in interface FromStream<X,Root<X>>withHints in interface FromValue<X,Root<X>>withHints in interface PathStream<X,Root<X>>withHints in interface PathValue<X,Root<X>>withHints in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withHints in interface RootStream<X>withHints in interface SearchStream<X,Root<X>>withHints in interface SearchValue<X,Root<X>>hints - hints to addQuery.setHint(java.lang.String, java.lang.Object)<T> RootValue<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 ExprValue<X,Root<X>>withParam in interface FromStream<X,Root<X>>withParam in interface FromValue<X,Root<X>>withParam in interface PathStream<X,Root<X>>withParam in interface PathValue<X,Root<X>>withParam in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withParam in interface RootStream<X>withParam in interface SearchStream<X,Root<X>>withParam in interface SearchValue<X,Root<X>>T - parameter value typeparameter - the parameter to setvalue - parameter valueQuery.setParameter(javax.persistence.Parameter, Object)RootValue<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 ExprValue<X,Root<X>>withParam in interface FromStream<X,Root<X>>withParam in interface FromValue<X,Root<X>>withParam in interface PathStream<X,Root<X>>withParam in interface PathValue<X,Root<X>>withParam in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withParam in interface RootStream<X>withParam in interface SearchStream<X,Root<X>>withParam in interface SearchValue<X,Root<X>>parameter - the parameter to setvalue - parameter valuetemporalType - temporal type for valueQuery.setParameter(javax.persistence.Parameter, Date, TemporalType)RootValue<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 ExprValue<X,Root<X>>withParam in interface FromStream<X,Root<X>>withParam in interface FromValue<X,Root<X>>withParam in interface PathStream<X,Root<X>>withParam in interface PathValue<X,Root<X>>withParam in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withParam in interface RootStream<X>withParam in interface SearchStream<X,Root<X>>withParam in interface SearchValue<X,Root<X>>parameter - the parameter to setvalue - parameter valuetemporalType - temporal type for valueQuery.setParameter(javax.persistence.Parameter, Calendar, TemporalType)RootValue<X> withParams(Iterable<? extends ParamBinding<?>> params)
QueryStreamReplaces any previous bindings of the same parameters.
withParams in interface ExprStream<X,Root<X>>withParams in interface ExprValue<X,Root<X>>withParams in interface FromStream<X,Root<X>>withParams in interface FromValue<X,Root<X>>withParams in interface PathStream<X,Root<X>>withParams in interface PathValue<X,Root<X>>withParams in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withParams in interface RootStream<X>withParams in interface SearchStream<X,Root<X>>withParams in interface SearchValue<X,Root<X>>params - bindings to addQuery.setParameter(javax.persistence.Parameter, Object)RootValue<X> withLoadGraph(String name)
QueryStream
Equivalent to withHint("javax.persistence.loadgraph", name).
withLoadGraph in interface ExprStream<X,Root<X>>withLoadGraph in interface ExprValue<X,Root<X>>withLoadGraph in interface FromStream<X,Root<X>>withLoadGraph in interface FromValue<X,Root<X>>withLoadGraph in interface PathStream<X,Root<X>>withLoadGraph in interface PathValue<X,Root<X>>withLoadGraph in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withLoadGraph in interface RootStream<X>withLoadGraph in interface SearchStream<X,Root<X>>withLoadGraph in interface SearchValue<X,Root<X>>name - name of load graphRootValue<X> withFetchGraph(String name)
QueryStream
Equivalent to withHint("javax.persistence.fetchgraph", name).
withFetchGraph in interface ExprStream<X,Root<X>>withFetchGraph in interface ExprValue<X,Root<X>>withFetchGraph in interface FromStream<X,Root<X>>withFetchGraph in interface FromValue<X,Root<X>>withFetchGraph in interface PathStream<X,Root<X>>withFetchGraph in interface PathValue<X,Root<X>>withFetchGraph in interface QueryStream<X,Root<X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withFetchGraph in interface RootStream<X>withFetchGraph in interface SearchStream<X,Root<X>>withFetchGraph in interface SearchValue<X,Root<X>>name - name of fetch graphCopyright © 2023. All rights reserved.