public interface IntValue extends ExprValue<Integer,Expression<Integer>>, IntStream
ExprValue.QueryStream.Builder| Modifier and Type | Method and Description |
|---|---|
IntValue |
bind(Ref<Integer,? super Expression<Integer>> ref)
Bind an unbound reference to the items in this stream.
|
<X2,S2 extends Selection<X2>> |
bind(Ref<X2,? super S2> ref,
Function<? super Expression<Integer>,? extends S2> refFunction)
Bind an unbound reference to the result of applying the given function to the items in this stream.
|
IntValue |
filter(Function<? super Expression<Integer>,? extends Expression<Boolean>> predicateBuilder)
Filter results using the boolean expression produced by the given function.
|
default int |
intValue()
Build and evaluate a JPA query based on this instance and return the single non-NULL result.
|
IntValue |
peek(Consumer<? super Expression<Integer>> peeker)
Peek at the items in this stream.
|
IntValue |
withFetchGraph(String name)
Configure a fetch graph for this query.
|
IntValue |
withFlushMode(FlushModeType flushMode)
Set the
FlushModeType associated with this query. |
IntValue |
withHint(String name,
Object value)
Associate a hint with this query.
|
IntValue |
withHints(Map<String,Object> hints)
Associate hints with this query.
|
IntValue |
withLoadGraph(String name)
Configure a load graph for this query.
|
IntValue |
withLockMode(LockModeType lockMode)
Set the
LockModeType associated with this query. |
IntValue |
withParam(Parameter<Calendar> parameter,
Calendar value,
TemporalType temporalType)
Bind the value of a query parameter of type
Calendar. |
IntValue |
withParam(Parameter<Date> parameter,
Date value,
TemporalType temporalType)
Bind the value of a query parameter of type
Date. |
<T> IntValue |
withParam(Parameter<T> parameter,
T value)
Bind the value of a query parameter.
|
IntValue |
withParams(Iterable<? extends ParamBinding<?>> params)
Associate parameter bindings with this query.
|
filter, map, map, map, map, mapToDouble, mapToDouble, mapToExpr, mapToFrom, mapToInt, mapToInt, mapToLong, mapToLong, mapToPathifPresent, isPresent, mapToSelection, orElse, orElseGet, orElseThrow, toOptional, valueaddRoot, asDoubleStream, asLongStream, average, distinct, findAny, findFirst, findSingle, groupBy, groupBy, groupByMulti, having, limit, max, min, orderBy, orderBy, orderBy, orderByMulti, skip, sum, thenOrderBy, thenOrderBy, thenOrderByasSubquery, count, countDistinct, exists, fetch, fetch, fetch, fetch, groupBy, orderBy, orderBy, orderBy, 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, toQueryconfiguredefault int intValue()
This variant of SearchValue.value() is useful when it is known that NULL won't be returned.
NoResultException - if the query returns NULLIntValue bind(Ref<Integer,? super Expression<Integer>> ref)
QueryStreambind in interface ExprStream<Integer,Expression<Integer>>bind in interface ExprValue<Integer,Expression<Integer>>bind in interface IntStreambind in interface QueryStream<Integer,Expression<Integer>,AbstractQuery<?>,CriteriaQuery<Integer>,TypedQuery<Integer>>bind in interface SearchStream<Integer,Expression<Integer>>bind in interface SearchValue<Integer,Expression<Integer>>ref - unbound referencerefIntValue peek(Consumer<? super Expression<Integer>> 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<Integer,Expression<Integer>>peek in interface ExprValue<Integer,Expression<Integer>>peek in interface IntStreampeek in interface QueryStream<Integer,Expression<Integer>,AbstractQuery<?>,CriteriaQuery<Integer>,TypedQuery<Integer>>peek in interface SearchStream<Integer,Expression<Integer>>peek in interface SearchValue<Integer,Expression<Integer>>peeker - peeker into stream<X2,S2 extends Selection<X2>> IntValue bind(Ref<X2,? super S2> ref, Function<? super Expression<Integer>,? extends S2> refFunction)
QueryStreambind in interface ExprStream<Integer,Expression<Integer>>bind in interface ExprValue<Integer,Expression<Integer>>bind in interface IntStreambind in interface QueryStream<Integer,Expression<Integer>,AbstractQuery<?>,CriteriaQuery<Integer>,TypedQuery<Integer>>bind in interface SearchStream<Integer,Expression<Integer>>bind in interface SearchValue<Integer,Expression<Integer>>X2 - type of the bound valueS2 - criteria type of the bound valueref - unbound referencerefFunction - function mapping this stream's Selection to the reference valuerefIntValue filter(Function<? super Expression<Integer>,? extends Expression<Boolean>> predicateBuilder)
QueryStreamAdds to any previously specified filters.
filter in interface ExprStream<Integer,Expression<Integer>>filter in interface ExprValue<Integer,Expression<Integer>>filter in interface IntStreamfilter in interface QueryStream<Integer,Expression<Integer>,AbstractQuery<?>,CriteriaQuery<Integer>,TypedQuery<Integer>>filter in interface SearchStream<Integer,Expression<Integer>>filter in interface SearchValue<Integer,Expression<Integer>>predicateBuilder - function mapping this stream's item to a boolean ExpressionIntValue withFlushMode(FlushModeType flushMode)
QueryStreamFlushModeType associated with this query.withFlushMode in interface ExprStream<Integer,Expression<Integer>>withFlushMode in interface ExprValue<Integer,Expression<Integer>>withFlushMode in interface IntStreamwithFlushMode in interface QueryStream<Integer,Expression<Integer>,AbstractQuery<?>,CriteriaQuery<Integer>,TypedQuery<Integer>>withFlushMode in interface SearchStream<Integer,Expression<Integer>>withFlushMode in interface SearchValue<Integer,Expression<Integer>>flushMode - new flush modeQuery.setFlushMode(javax.persistence.FlushModeType)IntValue withLockMode(LockModeType lockMode)
QueryStreamLockModeType associated with this query.withLockMode in interface ExprStream<Integer,Expression<Integer>>withLockMode in interface ExprValue<Integer,Expression<Integer>>withLockMode in interface IntStreamwithLockMode in interface QueryStream<Integer,Expression<Integer>,AbstractQuery<?>,CriteriaQuery<Integer>,TypedQuery<Integer>>withLockMode in interface SearchStream<Integer,Expression<Integer>>withLockMode in interface SearchValue<Integer,Expression<Integer>>lockMode - new lock modeQuery.setLockMode(javax.persistence.LockModeType)IntValue withHint(String name, Object value)
QueryStreamwithHint in interface ExprStream<Integer,Expression<Integer>>withHint in interface ExprValue<Integer,Expression<Integer>>withHint in interface IntStreamwithHint in interface QueryStream<Integer,Expression<Integer>,AbstractQuery<?>,CriteriaQuery<Integer>,TypedQuery<Integer>>withHint in interface SearchStream<Integer,Expression<Integer>>withHint in interface SearchValue<Integer,Expression<Integer>>name - name of hintvalue - value of hintQuery.setHint(java.lang.String, java.lang.Object)IntValue withHints(Map<String,Object> hints)
QueryStreamwithHints in interface ExprStream<Integer,Expression<Integer>>withHints in interface ExprValue<Integer,Expression<Integer>>withHints in interface IntStreamwithHints in interface QueryStream<Integer,Expression<Integer>,AbstractQuery<?>,CriteriaQuery<Integer>,TypedQuery<Integer>>withHints in interface SearchStream<Integer,Expression<Integer>>withHints in interface SearchValue<Integer,Expression<Integer>>hints - hints to addQuery.setHint(java.lang.String, java.lang.Object)<T> IntValue withParam(Parameter<T> parameter, T value)
QueryStreamReplaces any previous binding of the same parameter.
withParam in interface ExprStream<Integer,Expression<Integer>>withParam in interface ExprValue<Integer,Expression<Integer>>withParam in interface IntStreamwithParam in interface QueryStream<Integer,Expression<Integer>,AbstractQuery<?>,CriteriaQuery<Integer>,TypedQuery<Integer>>withParam in interface SearchStream<Integer,Expression<Integer>>withParam in interface SearchValue<Integer,Expression<Integer>>T - parameter value typeparameter - the parameter to setvalue - parameter valueQuery.setParameter(javax.persistence.Parameter, Object)IntValue withParam(Parameter<Date> parameter, Date value, TemporalType temporalType)
QueryStreamDate.
Replaces any previous binding of the same parameter.
withParam in interface ExprStream<Integer,Expression<Integer>>withParam in interface ExprValue<Integer,Expression<Integer>>withParam in interface IntStreamwithParam in interface QueryStream<Integer,Expression<Integer>,AbstractQuery<?>,CriteriaQuery<Integer>,TypedQuery<Integer>>withParam in interface SearchStream<Integer,Expression<Integer>>withParam in interface SearchValue<Integer,Expression<Integer>>parameter - the parameter to setvalue - parameter valuetemporalType - temporal type for valueQuery.setParameter(javax.persistence.Parameter, Date, TemporalType)IntValue withParam(Parameter<Calendar> parameter, Calendar value, TemporalType temporalType)
QueryStreamCalendar.
Replaces any previous binding of the same parameter.
withParam in interface ExprStream<Integer,Expression<Integer>>withParam in interface ExprValue<Integer,Expression<Integer>>withParam in interface IntStreamwithParam in interface QueryStream<Integer,Expression<Integer>,AbstractQuery<?>,CriteriaQuery<Integer>,TypedQuery<Integer>>withParam in interface SearchStream<Integer,Expression<Integer>>withParam in interface SearchValue<Integer,Expression<Integer>>parameter - the parameter to setvalue - parameter valuetemporalType - temporal type for valueQuery.setParameter(javax.persistence.Parameter, Calendar, TemporalType)IntValue withParams(Iterable<? extends ParamBinding<?>> params)
QueryStreamReplaces any previous bindings of the same parameters.
withParams in interface ExprStream<Integer,Expression<Integer>>withParams in interface ExprValue<Integer,Expression<Integer>>withParams in interface IntStreamwithParams in interface QueryStream<Integer,Expression<Integer>,AbstractQuery<?>,CriteriaQuery<Integer>,TypedQuery<Integer>>withParams in interface SearchStream<Integer,Expression<Integer>>withParams in interface SearchValue<Integer,Expression<Integer>>params - bindings to addQuery.setParameter(javax.persistence.Parameter, Object)IntValue withLoadGraph(String name)
QueryStream
Equivalent to withHint("javax.persistence.loadgraph", name).
withLoadGraph in interface ExprStream<Integer,Expression<Integer>>withLoadGraph in interface ExprValue<Integer,Expression<Integer>>withLoadGraph in interface IntStreamwithLoadGraph in interface QueryStream<Integer,Expression<Integer>,AbstractQuery<?>,CriteriaQuery<Integer>,TypedQuery<Integer>>withLoadGraph in interface SearchStream<Integer,Expression<Integer>>withLoadGraph in interface SearchValue<Integer,Expression<Integer>>name - name of load graphIntValue withFetchGraph(String name)
QueryStream
Equivalent to withHint("javax.persistence.fetchgraph", name).
withFetchGraph in interface ExprStream<Integer,Expression<Integer>>withFetchGraph in interface ExprValue<Integer,Expression<Integer>>withFetchGraph in interface IntStreamwithFetchGraph in interface QueryStream<Integer,Expression<Integer>,AbstractQuery<?>,CriteriaQuery<Integer>,TypedQuery<Integer>>withFetchGraph in interface SearchStream<Integer,Expression<Integer>>withFetchGraph in interface SearchValue<Integer,Expression<Integer>>name - name of fetch graphCopyright © 2023. All rights reserved.