public interface FromValue<X,S extends From<?,X>> extends PathValue<X,S>, FromStream<X,S>
FromStream that is guaranteed to return at most a single result.QueryStream.Builder| Modifier and Type | Method and Description |
|---|---|
FromValue<X,S> |
bind(Ref<X,? super S> ref)
Bind an unbound reference to the items in this stream.
|
<X2,S2 extends Selection<X2>> |
bind(Ref<X2,? super S2> ref,
Function<? super S,? extends S2> refFunction)
Bind an unbound reference to the result of applying the given function to the items in this stream.
|
FromValue<X,S> |
filter(Function<? super S,? extends Expression<Boolean>> predicateBuilder)
Filter results using the boolean expression produced by the given function.
|
FromValue<X,S> |
filter(SingularAttribute<? super X,Boolean> attribute)
Filter results using the specified boolean property.
|
default <Y> FromValue<Y,From<X,Y>> |
join(SingularAttribute<? super X,Y> attribute)
Add a singular inner join to this stream.
|
default <Y> FromValue<Y,From<X,Y>> |
join(SingularAttribute<? super X,Y> attribute,
JoinType joinType)
Add a singular join to this stream using the specified join type.
|
default <Y> FromValue<Y,From<X,Y>> |
join(SingularAttribute<? super X,Y> attribute,
JoinType joinType,
Function<? super Join<X,Y>,? extends Expression<Boolean>> on)
Add a singular join to this stream using the specified join type and ON condition.
|
FromValue<X,S> |
peek(Consumer<? super S> peeker)
Peek at the items in this stream.
|
FromValue<X,S> |
withFetchGraph(String name)
Configure a fetch graph for this query.
|
FromValue<X,S> |
withFlushMode(FlushModeType flushMode)
Set the
FlushModeType associated with this query. |
FromValue<X,S> |
withHint(String name,
Object value)
Associate a hint with this query.
|
FromValue<X,S> |
withHints(Map<String,Object> hints)
Associate hints with this query.
|
FromValue<X,S> |
withLoadGraph(String name)
Configure a load graph for this query.
|
FromValue<X,S> |
withLockMode(LockModeType lockMode)
Set the
LockModeType associated with this query. |
FromValue<X,S> |
withParam(Parameter<Calendar> parameter,
Calendar value,
TemporalType temporalType)
Bind the value of a query parameter of type
Calendar. |
FromValue<X,S> |
withParam(Parameter<Date> parameter,
Date value,
TemporalType temporalType)
Bind the value of a query parameter of type
Date. |
<T> FromValue<X,S> |
withParam(Parameter<T> parameter,
T value)
Bind the value of a query parameter.
|
FromValue<X,S> |
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, 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, thenOrderBycastasSubquery, 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, toQueryconfiguredefault <Y> FromValue<Y,From<X,Y>> join(SingularAttribute<? super X,Y> attribute)
SearchStream
Equivalent to join(attribute, JoinType.INNER).
default <Y> FromValue<Y,From<X,Y>> join(SingularAttribute<? super X,Y> attribute, JoinType joinType)
SearchStream
Equivalent to join(attribute, JoinType.INNER, join -> null).
default <Y> FromValue<Y,From<X,Y>> join(SingularAttribute<? super X,Y> attribute, JoinType joinType, Function<? super Join<X,Y>,? extends Expression<Boolean>> on)
SearchStreamFromValue<X,S> bind(Ref<X,? super S> ref)
QueryStreambind in interface ExprStream<X,S extends From<?,X>>bind in interface ExprValue<X,S extends From<?,X>>bind in interface FromStream<X,S extends From<?,X>>bind in interface PathStream<X,S extends From<?,X>>bind in interface PathValue<X,S extends From<?,X>>bind in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>bind in interface SearchStream<X,S extends From<?,X>>bind in interface SearchValue<X,S extends From<?,X>>ref - unbound referencerefFromValue<X,S> peek(Consumer<? super S> 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,S extends From<?,X>>peek in interface ExprValue<X,S extends From<?,X>>peek in interface FromStream<X,S extends From<?,X>>peek in interface PathStream<X,S extends From<?,X>>peek in interface PathValue<X,S extends From<?,X>>peek in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>peek in interface SearchStream<X,S extends From<?,X>>peek in interface SearchValue<X,S extends From<?,X>>peeker - peeker into stream<X2,S2 extends Selection<X2>> FromValue<X,S> bind(Ref<X2,? super S2> ref, Function<? super S,? extends S2> refFunction)
QueryStreambind in interface ExprStream<X,S extends From<?,X>>bind in interface ExprValue<X,S extends From<?,X>>bind in interface FromStream<X,S extends From<?,X>>bind in interface PathStream<X,S extends From<?,X>>bind in interface PathValue<X,S extends From<?,X>>bind in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>bind in interface SearchStream<X,S extends From<?,X>>bind in interface SearchValue<X,S extends From<?,X>>X2 - type of the bound valueS2 - criteria type of the bound valueref - unbound referencerefFunction - function mapping this stream's Selection to the reference valuerefFromValue<X,S> filter(SingularAttribute<? super X,Boolean> attribute)
QueryStreamAdds to any previously specified filters.
filter in interface ExprStream<X,S extends From<?,X>>filter in interface ExprValue<X,S extends From<?,X>>filter in interface FromStream<X,S extends From<?,X>>filter in interface PathStream<X,S extends From<?,X>>filter in interface PathValue<X,S extends From<?,X>>filter in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>filter in interface SearchStream<X,S extends From<?,X>>filter in interface SearchValue<X,S extends From<?,X>>attribute - boolean propertyFromValue<X,S> filter(Function<? super S,? extends Expression<Boolean>> predicateBuilder)
QueryStreamAdds to any previously specified filters.
filter in interface ExprStream<X,S extends From<?,X>>filter in interface ExprValue<X,S extends From<?,X>>filter in interface FromStream<X,S extends From<?,X>>filter in interface PathStream<X,S extends From<?,X>>filter in interface PathValue<X,S extends From<?,X>>filter in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>filter in interface SearchStream<X,S extends From<?,X>>filter in interface SearchValue<X,S extends From<?,X>>predicateBuilder - function mapping this stream's item to a boolean ExpressionFromValue<X,S> withFlushMode(FlushModeType flushMode)
QueryStreamFlushModeType associated with this query.withFlushMode in interface ExprStream<X,S extends From<?,X>>withFlushMode in interface ExprValue<X,S extends From<?,X>>withFlushMode in interface FromStream<X,S extends From<?,X>>withFlushMode in interface PathStream<X,S extends From<?,X>>withFlushMode in interface PathValue<X,S extends From<?,X>>withFlushMode in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withFlushMode in interface SearchStream<X,S extends From<?,X>>withFlushMode in interface SearchValue<X,S extends From<?,X>>flushMode - new flush modeQuery.setFlushMode(javax.persistence.FlushModeType)FromValue<X,S> withLockMode(LockModeType lockMode)
QueryStreamLockModeType associated with this query.withLockMode in interface ExprStream<X,S extends From<?,X>>withLockMode in interface ExprValue<X,S extends From<?,X>>withLockMode in interface FromStream<X,S extends From<?,X>>withLockMode in interface PathStream<X,S extends From<?,X>>withLockMode in interface PathValue<X,S extends From<?,X>>withLockMode in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withLockMode in interface SearchStream<X,S extends From<?,X>>withLockMode in interface SearchValue<X,S extends From<?,X>>lockMode - new lock modeQuery.setLockMode(javax.persistence.LockModeType)FromValue<X,S> withHint(String name, Object value)
QueryStreamwithHint in interface ExprStream<X,S extends From<?,X>>withHint in interface ExprValue<X,S extends From<?,X>>withHint in interface FromStream<X,S extends From<?,X>>withHint in interface PathStream<X,S extends From<?,X>>withHint in interface PathValue<X,S extends From<?,X>>withHint in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withHint in interface SearchStream<X,S extends From<?,X>>withHint in interface SearchValue<X,S extends From<?,X>>name - name of hintvalue - value of hintQuery.setHint(java.lang.String, java.lang.Object)FromValue<X,S> withHints(Map<String,Object> hints)
QueryStreamwithHints in interface ExprStream<X,S extends From<?,X>>withHints in interface ExprValue<X,S extends From<?,X>>withHints in interface FromStream<X,S extends From<?,X>>withHints in interface PathStream<X,S extends From<?,X>>withHints in interface PathValue<X,S extends From<?,X>>withHints in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withHints in interface SearchStream<X,S extends From<?,X>>withHints in interface SearchValue<X,S extends From<?,X>>hints - hints to addQuery.setHint(java.lang.String, java.lang.Object)<T> FromValue<X,S> withParam(Parameter<T> parameter, T value)
QueryStreamReplaces any previous binding of the same parameter.
withParam in interface ExprStream<X,S extends From<?,X>>withParam in interface ExprValue<X,S extends From<?,X>>withParam in interface FromStream<X,S extends From<?,X>>withParam in interface PathStream<X,S extends From<?,X>>withParam in interface PathValue<X,S extends From<?,X>>withParam in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withParam in interface SearchStream<X,S extends From<?,X>>withParam in interface SearchValue<X,S extends From<?,X>>T - parameter value typeparameter - the parameter to setvalue - parameter valueQuery.setParameter(javax.persistence.Parameter, Object)FromValue<X,S> withParam(Parameter<Date> parameter, Date value, TemporalType temporalType)
QueryStreamDate.
Replaces any previous binding of the same parameter.
withParam in interface ExprStream<X,S extends From<?,X>>withParam in interface ExprValue<X,S extends From<?,X>>withParam in interface FromStream<X,S extends From<?,X>>withParam in interface PathStream<X,S extends From<?,X>>withParam in interface PathValue<X,S extends From<?,X>>withParam in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withParam in interface SearchStream<X,S extends From<?,X>>withParam in interface SearchValue<X,S extends From<?,X>>parameter - the parameter to setvalue - parameter valuetemporalType - temporal type for valueQuery.setParameter(javax.persistence.Parameter, Date, TemporalType)FromValue<X,S> withParam(Parameter<Calendar> parameter, Calendar value, TemporalType temporalType)
QueryStreamCalendar.
Replaces any previous binding of the same parameter.
withParam in interface ExprStream<X,S extends From<?,X>>withParam in interface ExprValue<X,S extends From<?,X>>withParam in interface FromStream<X,S extends From<?,X>>withParam in interface PathStream<X,S extends From<?,X>>withParam in interface PathValue<X,S extends From<?,X>>withParam in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withParam in interface SearchStream<X,S extends From<?,X>>withParam in interface SearchValue<X,S extends From<?,X>>parameter - the parameter to setvalue - parameter valuetemporalType - temporal type for valueQuery.setParameter(javax.persistence.Parameter, Calendar, TemporalType)FromValue<X,S> withParams(Iterable<? extends ParamBinding<?>> params)
QueryStreamReplaces any previous bindings of the same parameters.
withParams in interface ExprStream<X,S extends From<?,X>>withParams in interface ExprValue<X,S extends From<?,X>>withParams in interface FromStream<X,S extends From<?,X>>withParams in interface PathStream<X,S extends From<?,X>>withParams in interface PathValue<X,S extends From<?,X>>withParams in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withParams in interface SearchStream<X,S extends From<?,X>>withParams in interface SearchValue<X,S extends From<?,X>>params - bindings to addQuery.setParameter(javax.persistence.Parameter, Object)FromValue<X,S> withLoadGraph(String name)
QueryStream
Equivalent to withHint("javax.persistence.loadgraph", name).
withLoadGraph in interface ExprStream<X,S extends From<?,X>>withLoadGraph in interface ExprValue<X,S extends From<?,X>>withLoadGraph in interface FromStream<X,S extends From<?,X>>withLoadGraph in interface PathStream<X,S extends From<?,X>>withLoadGraph in interface PathValue<X,S extends From<?,X>>withLoadGraph in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withLoadGraph in interface SearchStream<X,S extends From<?,X>>withLoadGraph in interface SearchValue<X,S extends From<?,X>>name - name of load graphFromValue<X,S> withFetchGraph(String name)
QueryStream
Equivalent to withHint("javax.persistence.fetchgraph", name).
withFetchGraph in interface ExprStream<X,S extends From<?,X>>withFetchGraph in interface ExprValue<X,S extends From<?,X>>withFetchGraph in interface FromStream<X,S extends From<?,X>>withFetchGraph in interface PathStream<X,S extends From<?,X>>withFetchGraph in interface PathValue<X,S extends From<?,X>>withFetchGraph in interface QueryStream<X,S extends From<?,X>,AbstractQuery<?>,CriteriaQuery<X>,TypedQuery<X>>withFetchGraph in interface SearchStream<X,S extends From<?,X>>withFetchGraph in interface SearchValue<X,S extends From<?,X>>name - name of fetch graphCopyright © 2023. All rights reserved.