public interface BooleanValue extends ExprValue<Boolean,Expression<Boolean>>
ExprValue.QueryStream.Builder| Modifier and Type | Method and Description |
|---|---|
BooleanValue |
bind(Ref<Boolean,? super Expression<Boolean>> ref)
Bind an unbound reference to the items in this stream.
|
default boolean |
booleanValue()
Build and evaluate a JPA query based on this instance and return the single non-NULL result.
|
BooleanValue |
filter(Function<? super Expression<Boolean>,? extends Expression<Boolean>> predicateBuilder)
Filter results using the boolean expression produced by the given function.
|
BooleanValue |
not()
Invert this instance.
|
BooleanValue |
peek(Consumer<? super Expression<Boolean>> peeker)
Peek at the items in this stream.
|
BooleanValue |
withFetchGraph(String name)
Configure a fetch graph for this query.
|
BooleanValue |
withFlushMode(FlushModeType flushMode)
Set the
FlushModeType associated with this query. |
BooleanValue |
withHint(String name,
Object value)
Associate a hint with this query.
|
BooleanValue |
withHints(Map<String,Object> hints)
Associate hints with this query.
|
BooleanValue |
withLoadGraph(String name)
Configure a load graph for this query.
|
BooleanValue |
withLockMode(LockModeType lockMode)
Set the
LockModeType associated with this query. |
BooleanValue |
withParam(Parameter<Calendar> parameter,
Calendar value,
TemporalType temporalType)
Bind the value of a query parameter of type
Calendar. |
BooleanValue |
withParam(Parameter<Date> parameter,
Date value,
TemporalType temporalType)
Bind the value of a query parameter of type
Date. |
<T> BooleanValue |
withParam(Parameter<T> parameter,
T value)
Bind the value of a query parameter.
|
BooleanValue |
withParams(Iterable<? extends ParamBinding<?>> params)
Associate parameter bindings with this query.
|
bind, filter, map, map, map, map, mapToDouble, mapToDouble, mapToExpr, mapToFrom, mapToInt, mapToInt, mapToLong, mapToLong, mapToPathifPresent, isPresent, mapToSelection, orElse, orElseGet, orElseThrow, toOptional, valueaddRoot, asSubquery, count, countDistinct, distinct, exists, fetch, fetch, fetch, fetch, findAny, findFirst, findSingle, groupBy, groupBy, groupBy, groupByMulti, having, limit, orderBy, orderBy, orderBy, orderBy, orderBy, orderBy, orderByMulti, skip, thenOrderBy, thenOrderBy, thenOrderBy, thenOrderByallMatch, 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, mapToRef, mapToRef, mapToRef, mapToRef, mapToRoot, noneMatch, noneMatchgetEntityManager, getFirstResult, getFlushMode, getHints, getLockMode, getMaxResults, getParams, newBuilder, toCriteriaQuery, toQueryconfigureBooleanValue not()
default boolean booleanValue()
This variant of SearchValue.value() is useful when it is known that NULL won't be returned.
NoResultException - if the query returns NULLBooleanValue bind(Ref<Boolean,? super Expression<Boolean>> ref)
QueryStreambind in interface ExprStream<Boolean,Expression<Boolean>>bind in interface ExprValue<Boolean,Expression<Boolean>>bind in interface QueryStream<Boolean,Expression<Boolean>,AbstractQuery<?>,CriteriaQuery<Boolean>,TypedQuery<Boolean>>bind in interface SearchStream<Boolean,Expression<Boolean>>bind in interface SearchValue<Boolean,Expression<Boolean>>ref - unbound referencerefBooleanValue peek(Consumer<? super Expression<Boolean>> 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<Boolean,Expression<Boolean>>peek in interface ExprValue<Boolean,Expression<Boolean>>peek in interface QueryStream<Boolean,Expression<Boolean>,AbstractQuery<?>,CriteriaQuery<Boolean>,TypedQuery<Boolean>>peek in interface SearchStream<Boolean,Expression<Boolean>>peek in interface SearchValue<Boolean,Expression<Boolean>>peeker - peeker into streamBooleanValue filter(Function<? super Expression<Boolean>,? extends Expression<Boolean>> predicateBuilder)
QueryStreamAdds to any previously specified filters.
filter in interface ExprStream<Boolean,Expression<Boolean>>filter in interface ExprValue<Boolean,Expression<Boolean>>filter in interface QueryStream<Boolean,Expression<Boolean>,AbstractQuery<?>,CriteriaQuery<Boolean>,TypedQuery<Boolean>>filter in interface SearchStream<Boolean,Expression<Boolean>>filter in interface SearchValue<Boolean,Expression<Boolean>>predicateBuilder - function mapping this stream's item to a boolean ExpressionBooleanValue withFlushMode(FlushModeType flushMode)
QueryStreamFlushModeType associated with this query.withFlushMode in interface ExprStream<Boolean,Expression<Boolean>>withFlushMode in interface ExprValue<Boolean,Expression<Boolean>>withFlushMode in interface QueryStream<Boolean,Expression<Boolean>,AbstractQuery<?>,CriteriaQuery<Boolean>,TypedQuery<Boolean>>withFlushMode in interface SearchStream<Boolean,Expression<Boolean>>withFlushMode in interface SearchValue<Boolean,Expression<Boolean>>flushMode - new flush modeQuery.setFlushMode(javax.persistence.FlushModeType)BooleanValue withLockMode(LockModeType lockMode)
QueryStreamLockModeType associated with this query.withLockMode in interface ExprStream<Boolean,Expression<Boolean>>withLockMode in interface ExprValue<Boolean,Expression<Boolean>>withLockMode in interface QueryStream<Boolean,Expression<Boolean>,AbstractQuery<?>,CriteriaQuery<Boolean>,TypedQuery<Boolean>>withLockMode in interface SearchStream<Boolean,Expression<Boolean>>withLockMode in interface SearchValue<Boolean,Expression<Boolean>>lockMode - new lock modeQuery.setLockMode(javax.persistence.LockModeType)BooleanValue withHint(String name, Object value)
QueryStreamwithHint in interface ExprStream<Boolean,Expression<Boolean>>withHint in interface ExprValue<Boolean,Expression<Boolean>>withHint in interface QueryStream<Boolean,Expression<Boolean>,AbstractQuery<?>,CriteriaQuery<Boolean>,TypedQuery<Boolean>>withHint in interface SearchStream<Boolean,Expression<Boolean>>withHint in interface SearchValue<Boolean,Expression<Boolean>>name - name of hintvalue - value of hintQuery.setHint(java.lang.String, java.lang.Object)BooleanValue withHints(Map<String,Object> hints)
QueryStreamwithHints in interface ExprStream<Boolean,Expression<Boolean>>withHints in interface ExprValue<Boolean,Expression<Boolean>>withHints in interface QueryStream<Boolean,Expression<Boolean>,AbstractQuery<?>,CriteriaQuery<Boolean>,TypedQuery<Boolean>>withHints in interface SearchStream<Boolean,Expression<Boolean>>withHints in interface SearchValue<Boolean,Expression<Boolean>>hints - hints to addQuery.setHint(java.lang.String, java.lang.Object)<T> BooleanValue withParam(Parameter<T> parameter, T value)
QueryStreamReplaces any previous binding of the same parameter.
withParam in interface ExprStream<Boolean,Expression<Boolean>>withParam in interface ExprValue<Boolean,Expression<Boolean>>withParam in interface QueryStream<Boolean,Expression<Boolean>,AbstractQuery<?>,CriteriaQuery<Boolean>,TypedQuery<Boolean>>withParam in interface SearchStream<Boolean,Expression<Boolean>>withParam in interface SearchValue<Boolean,Expression<Boolean>>T - parameter value typeparameter - the parameter to setvalue - parameter valueQuery.setParameter(javax.persistence.Parameter, Object)BooleanValue withParam(Parameter<Date> parameter, Date value, TemporalType temporalType)
QueryStreamDate.
Replaces any previous binding of the same parameter.
withParam in interface ExprStream<Boolean,Expression<Boolean>>withParam in interface ExprValue<Boolean,Expression<Boolean>>withParam in interface QueryStream<Boolean,Expression<Boolean>,AbstractQuery<?>,CriteriaQuery<Boolean>,TypedQuery<Boolean>>withParam in interface SearchStream<Boolean,Expression<Boolean>>withParam in interface SearchValue<Boolean,Expression<Boolean>>parameter - the parameter to setvalue - parameter valuetemporalType - temporal type for valueQuery.setParameter(javax.persistence.Parameter, Date, TemporalType)BooleanValue withParam(Parameter<Calendar> parameter, Calendar value, TemporalType temporalType)
QueryStreamCalendar.
Replaces any previous binding of the same parameter.
withParam in interface ExprStream<Boolean,Expression<Boolean>>withParam in interface ExprValue<Boolean,Expression<Boolean>>withParam in interface QueryStream<Boolean,Expression<Boolean>,AbstractQuery<?>,CriteriaQuery<Boolean>,TypedQuery<Boolean>>withParam in interface SearchStream<Boolean,Expression<Boolean>>withParam in interface SearchValue<Boolean,Expression<Boolean>>parameter - the parameter to setvalue - parameter valuetemporalType - temporal type for valueQuery.setParameter(javax.persistence.Parameter, Calendar, TemporalType)BooleanValue withParams(Iterable<? extends ParamBinding<?>> params)
QueryStreamReplaces any previous bindings of the same parameters.
withParams in interface ExprStream<Boolean,Expression<Boolean>>withParams in interface ExprValue<Boolean,Expression<Boolean>>withParams in interface QueryStream<Boolean,Expression<Boolean>,AbstractQuery<?>,CriteriaQuery<Boolean>,TypedQuery<Boolean>>withParams in interface SearchStream<Boolean,Expression<Boolean>>withParams in interface SearchValue<Boolean,Expression<Boolean>>params - bindings to addQuery.setParameter(javax.persistence.Parameter, Object)BooleanValue withLoadGraph(String name)
QueryStream
Equivalent to withHint("javax.persistence.loadgraph", name).
withLoadGraph in interface ExprStream<Boolean,Expression<Boolean>>withLoadGraph in interface ExprValue<Boolean,Expression<Boolean>>withLoadGraph in interface QueryStream<Boolean,Expression<Boolean>,AbstractQuery<?>,CriteriaQuery<Boolean>,TypedQuery<Boolean>>withLoadGraph in interface SearchStream<Boolean,Expression<Boolean>>withLoadGraph in interface SearchValue<Boolean,Expression<Boolean>>name - name of load graphBooleanValue withFetchGraph(String name)
QueryStream
Equivalent to withHint("javax.persistence.fetchgraph", name).
withFetchGraph in interface ExprStream<Boolean,Expression<Boolean>>withFetchGraph in interface ExprValue<Boolean,Expression<Boolean>>withFetchGraph in interface QueryStream<Boolean,Expression<Boolean>,AbstractQuery<?>,CriteriaQuery<Boolean>,TypedQuery<Boolean>>withFetchGraph in interface SearchStream<Boolean,Expression<Boolean>>withFetchGraph in interface SearchValue<Boolean,Expression<Boolean>>name - name of fetch graphCopyright © 2023. All rights reserved.