- All Superinterfaces:
DoubleStream,ExprStream<Double,,jakarta.persistence.criteria.Expression<Double>> ExprValue<Double,,jakarta.persistence.criteria.Expression<Double>> QueryConfigurer<jakarta.persistence.criteria.AbstractQuery<?>,,Double, jakarta.persistence.criteria.Expression<Double>> QueryStream<Double,,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> SearchStream<Double,,jakarta.persistence.criteria.Expression<Double>> SearchValue<Double,jakarta.persistence.criteria.Expression<Double>>
public interface DoubleValue
extends ExprValue<Double,jakarta.persistence.criteria.Expression<Double>>, DoubleStream
A double
ExprValue.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.dellroad.querystream.jpa.QueryStream
QueryStream.Builder -
Method Summary
Modifier and TypeMethodDescriptionBind an unbound reference to the items in this stream.<X2,S2 extends jakarta.persistence.criteria.Selection<X2>>
DoubleValuebind(Ref<X2, ? super S2> ref, Function<? super jakarta.persistence.criteria.Expression<Double>, ? extends S2> refFunction) Bind an unbound reference to the result of applying the given function to the items in this stream.default doubleBuild and evaluate a JPA query based on this instance and return the single non-NULL result.filter(Function<? super jakarta.persistence.criteria.Expression<Double>, ? extends jakarta.persistence.criteria.Expression<Boolean>> predicateBuilder) Filter results using the boolean expression produced by the given function.Peek at the items in this stream.withFetchGraph(String name) Configure a fetch graph for this query.withFlushMode(jakarta.persistence.FlushModeType flushMode) Set theFlushModeTypeassociated with this query.Associate a hint with this query.Associate hints with this query.withLoadGraph(String name) Configure a load graph for this query.withLockMode(jakarta.persistence.LockModeType lockMode) Set theLockModeTypeassociated with this query.withParam(jakarta.persistence.Parameter<Calendar> parameter, Calendar value, jakarta.persistence.TemporalType temporalType) Bind the value of a query parameter of typeCalendar.withParam(jakarta.persistence.Parameter<Date> parameter, Date value, jakarta.persistence.TemporalType temporalType) Bind the value of a query parameter of typeDate.<T> DoubleValuewithParam(jakarta.persistence.Parameter<T> parameter, T value) Bind the value of a query parameter.withParams(Iterable<? extends ParamBinding<?>> params) Associate parameter bindings with this query.Methods inherited from interface org.dellroad.querystream.jpa.DoubleStream
addRoot, average, distinct, findAny, findFirst, findSingle, groupBy, groupBy, groupByMulti, having, limit, max, min, orderBy, orderBy, orderBy, orderByMulti, skip, sum, thenOrderBy, thenOrderBy, thenOrderByMethods inherited from interface org.dellroad.querystream.jpa.ExprStream
asSubquery, count, countDistinct, exists, fetch, fetch, fetch, fetch, filter, groupBy, orderBy, orderBy, orderBy, thenOrderByMethods inherited from interface org.dellroad.querystream.jpa.ExprValue
filter, map, map, map, map, mapToDouble, mapToDouble, mapToExpr, mapToFrom, mapToInt, mapToInt, mapToLong, mapToLong, mapToPathMethods inherited from interface org.dellroad.querystream.jpa.QueryConfigurer
configureMethods inherited from interface org.dellroad.querystream.jpa.QueryStream
getEntityManager, getFirstResult, getFlushMode, getHints, getLockMode, getMaxResults, getParams, toCriteriaQuery, toQueryMethods inherited from interface org.dellroad.querystream.jpa.SearchStream
allMatch, 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, noneMatchMethods inherited from interface org.dellroad.querystream.jpa.SearchValue
ifPresent, isPresent, mapToSelection, orElse, orElseGet, orElseThrow, toOptional, value
-
Method Details
-
doubleValue
default double doubleValue()Build and evaluate a JPA query based on this instance and return the single non-NULL result.This variant of
SearchValue.value()is useful when it is known that NULL won't be returned.- Returns:
- result of executed query
- Throws:
jakarta.persistence.NoResultException- if the query returns NULL
-
bind
Description copied from interface:QueryStreamBind an unbound reference to the items in this stream.- Specified by:
bindin interfaceDoubleStream- Specified by:
bindin interfaceExprStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
bindin interfaceExprValue<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
bindin interfaceQueryStream<Double,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> - Specified by:
bindin interfaceSearchStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
bindin interfaceSearchValue<Double,jakarta.persistence.criteria.Expression<Double>> - Parameters:
ref- unbound reference- Returns:
- new stream that binds
ref
-
peek
Description copied from interface:QueryStreamPeek at the items in this stream.This is useful in cases where the selection can be modified, e.g., setting join
ONconditions usingJoin.on().- Specified by:
peekin interfaceDoubleStream- Specified by:
peekin interfaceExprStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
peekin interfaceExprValue<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
peekin interfaceQueryStream<Double,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> - Specified by:
peekin interfaceSearchStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
peekin interfaceSearchValue<Double,jakarta.persistence.criteria.Expression<Double>> - Parameters:
peeker- peeker into stream- Returns:
- new stream that peeks into this stream
-
bind
<X2,S2 extends jakarta.persistence.criteria.Selection<X2>> DoubleValue bind(Ref<X2, ? super S2> ref, Function<? super jakarta.persistence.criteria.Expression<Double>, ? extends S2> refFunction) Description copied from interface:QueryStreamBind an unbound reference to the result of applying the given function to the items in this stream.- Specified by:
bindin interfaceDoubleStream- Specified by:
bindin interfaceExprStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
bindin interfaceExprValue<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
bindin interfaceQueryStream<Double,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> - Specified by:
bindin interfaceSearchStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
bindin interfaceSearchValue<Double,jakarta.persistence.criteria.Expression<Double>> - Type Parameters:
X2- type of the bound valueS2- criteria type of the bound value- Parameters:
ref- unbound referencerefFunction- function mapping this stream'sSelectionto the reference value- Returns:
- new stream that binds
ref
-
filter
DoubleValue filter(Function<? super jakarta.persistence.criteria.Expression<Double>, ? extends jakarta.persistence.criteria.Expression<Boolean>> predicateBuilder) Description copied from interface:QueryStreamFilter results using the boolean expression produced by the given function.Adds to any previously specified filters.
- Specified by:
filterin interfaceDoubleStream- Specified by:
filterin interfaceExprStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
filterin interfaceExprValue<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
filterin interfaceQueryStream<Double,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> - Specified by:
filterin interfaceSearchStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
filterin interfaceSearchValue<Double,jakarta.persistence.criteria.Expression<Double>> - Parameters:
predicateBuilder- function mapping this stream's item to a booleanExpression- Returns:
- new filtered stream
-
withFlushMode
Description copied from interface:QueryStreamSet theFlushModeTypeassociated with this query.- Specified by:
withFlushModein interfaceDoubleStream- Specified by:
withFlushModein interfaceExprStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withFlushModein interfaceExprValue<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withFlushModein interfaceQueryStream<Double,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> - Specified by:
withFlushModein interfaceSearchStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withFlushModein interfaceSearchValue<Double,jakarta.persistence.criteria.Expression<Double>> - Parameters:
flushMode- new flush mode- Returns:
- new stream with the specified flush mode configured
- See Also:
-
Query.setFlushMode(jakarta.persistence.FlushModeType)
-
withLockMode
Description copied from interface:QueryStreamSet theLockModeTypeassociated with this query.- Specified by:
withLockModein interfaceDoubleStream- Specified by:
withLockModein interfaceExprStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withLockModein interfaceExprValue<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withLockModein interfaceQueryStream<Double,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> - Specified by:
withLockModein interfaceSearchStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withLockModein interfaceSearchValue<Double,jakarta.persistence.criteria.Expression<Double>> - Parameters:
lockMode- new lock mode- Returns:
- new stream with the specified lock mode configured
- See Also:
-
Query.setLockMode(jakarta.persistence.LockModeType)
-
withHint
Description copied from interface:QueryStreamAssociate a hint with this query.- Specified by:
withHintin interfaceDoubleStream- Specified by:
withHintin interfaceExprStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withHintin interfaceExprValue<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withHintin interfaceQueryStream<Double,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> - Specified by:
withHintin interfaceSearchStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withHintin interfaceSearchValue<Double,jakarta.persistence.criteria.Expression<Double>> - Parameters:
name- name of hintvalue- value of hint- Returns:
- new stream with the specified hint configured
- See Also:
-
Query.setHint(java.lang.String, java.lang.Object)
-
withHints
Description copied from interface:QueryStreamAssociate hints with this query.- Specified by:
withHintsin interfaceDoubleStream- Specified by:
withHintsin interfaceExprStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withHintsin interfaceExprValue<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withHintsin interfaceQueryStream<Double,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> - Specified by:
withHintsin interfaceSearchStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withHintsin interfaceSearchValue<Double,jakarta.persistence.criteria.Expression<Double>> - Parameters:
hints- hints to add- Returns:
- new stream with the specified hints added
- See Also:
-
Query.setHint(java.lang.String, java.lang.Object)
-
withParam
Description copied from interface:QueryStreamBind the value of a query parameter.Replaces any previous binding of the same parameter.
- Specified by:
withParamin interfaceDoubleStream- Specified by:
withParamin interfaceExprStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withParamin interfaceExprValue<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withParamin interfaceQueryStream<Double,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> - Specified by:
withParamin interfaceSearchStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withParamin interfaceSearchValue<Double,jakarta.persistence.criteria.Expression<Double>> - Type Parameters:
T- parameter value type- Parameters:
parameter- the parameter to setvalue- parameter value- Returns:
- new stream with the specified parameter value set
- See Also:
-
Query.setParameter(Parameter, Object)
-
withParam
DoubleValue withParam(jakarta.persistence.Parameter<Date> parameter, Date value, jakarta.persistence.TemporalType temporalType) Description copied from interface:QueryStreamBind the value of a query parameter of typeDate.Replaces any previous binding of the same parameter.
- Specified by:
withParamin interfaceDoubleStream- Specified by:
withParamin interfaceExprStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withParamin interfaceExprValue<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withParamin interfaceQueryStream<Double,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> - Specified by:
withParamin interfaceSearchStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withParamin interfaceSearchValue<Double,jakarta.persistence.criteria.Expression<Double>> - Parameters:
parameter- the parameter to setvalue- parameter valuetemporalType- temporal type forvalue- Returns:
- new stream with the specified parameter value set
- See Also:
-
Query.setParameter(Parameter, Date, TemporalType)
-
withParam
DoubleValue withParam(jakarta.persistence.Parameter<Calendar> parameter, Calendar value, jakarta.persistence.TemporalType temporalType) Description copied from interface:QueryStreamBind the value of a query parameter of typeCalendar.Replaces any previous binding of the same parameter.
- Specified by:
withParamin interfaceDoubleStream- Specified by:
withParamin interfaceExprStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withParamin interfaceExprValue<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withParamin interfaceQueryStream<Double,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> - Specified by:
withParamin interfaceSearchStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withParamin interfaceSearchValue<Double,jakarta.persistence.criteria.Expression<Double>> - Parameters:
parameter- the parameter to setvalue- parameter valuetemporalType- temporal type forvalue- Returns:
- new stream with the specified parameter value set
- See Also:
-
Query.setParameter(Parameter, Calendar, TemporalType)
-
withParams
Description copied from interface:QueryStreamAssociate parameter bindings with this query.Replaces any previous bindings of the same parameters.
- Specified by:
withParamsin interfaceDoubleStream- Specified by:
withParamsin interfaceExprStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withParamsin interfaceExprValue<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withParamsin interfaceQueryStream<Double,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> - Specified by:
withParamsin interfaceSearchStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withParamsin interfaceSearchValue<Double,jakarta.persistence.criteria.Expression<Double>> - Parameters:
params- bindings to add- Returns:
- new stream with the specified parameter bindings added
- See Also:
-
Query.setParameter(Parameter, Object)
-
withLoadGraph
Description copied from interface:QueryStreamConfigure a load graph for this query.Equivalent to
withHint("jakarta.persistence.loadgraph", name).- Specified by:
withLoadGraphin interfaceDoubleStream- Specified by:
withLoadGraphin interfaceExprStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withLoadGraphin interfaceExprValue<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withLoadGraphin interfaceQueryStream<Double,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> - Specified by:
withLoadGraphin interfaceSearchStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withLoadGraphin interfaceSearchValue<Double,jakarta.persistence.criteria.Expression<Double>> - Parameters:
name- name of load graph- Returns:
- new stream with the specified load graph configured
-
withFetchGraph
Description copied from interface:QueryStreamConfigure a fetch graph for this query.Equivalent to
withHint("jakarta.persistence.fetchgraph", name).- Specified by:
withFetchGraphin interfaceDoubleStream- Specified by:
withFetchGraphin interfaceExprStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withFetchGraphin interfaceExprValue<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withFetchGraphin interfaceQueryStream<Double,jakarta.persistence.criteria.Expression<Double>, jakarta.persistence.criteria.AbstractQuery<?>, jakarta.persistence.criteria.CriteriaQuery<Double>, jakarta.persistence.TypedQuery<Double>> - Specified by:
withFetchGraphin interfaceSearchStream<Double,jakarta.persistence.criteria.Expression<Double>> - Specified by:
withFetchGraphin interfaceSearchValue<Double,jakarta.persistence.criteria.Expression<Double>> - Parameters:
name- name of fetch graph- Returns:
- new stream with the specified fetch graph configured
-