Package org.dellroad.querystream.jpa
Interface FromValue<X,S extends From<?,X>>
- All Superinterfaces:
ExprStream<X,
,S> ExprValue<X,
,S> FromStream<X,
,S> PathStream<X,
,S> PathValue<X,
,S> QueryConfigurer<AbstractQuery<?>,
,X, S> QueryStream<X,
,S, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> SearchStream<X,
,S> SearchValue<X,
S>
- All Known Subinterfaces:
RootValue<X>
A
FromStream
that is guaranteed to return at most a single result.-
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.Bind an unbound reference to the result of applying the given function to the items in this stream.filter
(SingularAttribute<? super X, Boolean> attribute) Filter results using the specified boolean property.filter
(Function<? super S, ? extends Expression<Boolean>> predicateBuilder) Filter results using the boolean expression produced by the given function.join
(SingularAttribute<? super X, Y> attribute) Add a singular inner join to this stream.join
(SingularAttribute<? super X, Y> attribute, JoinType joinType) Add a singular join to this stream using the specified join type.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.Peek at the items in this stream.withFetchGraph
(String name) Configure a fetch graph for this query.withFlushMode
(FlushModeType flushMode) Set theFlushModeType
associated 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
(LockModeType lockMode) Set theLockModeType
associated with this query.withParam
(Parameter<Calendar> parameter, Calendar value, TemporalType temporalType) Bind the value of a query parameter of typeCalendar
.withParam
(Parameter<Date> parameter, Date value, TemporalType temporalType) Bind the value of a query parameter of typeDate
.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.ExprStream
asSubquery, count, countDistinct, exists
Methods inherited from interface org.dellroad.querystream.jpa.ExprValue
map, map, map, map, mapToDouble, mapToDouble, mapToExpr, mapToFrom, mapToInt, mapToInt, mapToLong, mapToLong, mapToPath
Methods inherited from interface org.dellroad.querystream.jpa.FromStream
addRoot, 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, thenOrderBy
Methods inherited from interface org.dellroad.querystream.jpa.PathStream
cast
Methods inherited from interface org.dellroad.querystream.jpa.QueryConfigurer
configure
Methods inherited from interface org.dellroad.querystream.jpa.QueryStream
getEntityManager, getFirstResult, getFlushMode, getHints, getLockMode, getMaxResults, getParams, toCriteriaQuery, toQuery
Methods 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, mapToRef, mapToRef, mapToRef, mapToRef, mapToRoot, noneMatch, noneMatch
Methods inherited from interface org.dellroad.querystream.jpa.SearchValue
ifPresent, isPresent, mapToSelection, orElse, orElseGet, orElseThrow, toOptional, value
-
Method Details
-
join
Description copied from interface:SearchStream
Add a singular inner join to this stream.Equivalent to
join(attribute, JoinType.INNER)
. -
join
default <Y> FromValue<Y,From<X, joinY>> (SingularAttribute<? super X, Y> attribute, JoinType joinType) Description copied from interface:SearchStream
Add a singular join to this stream using the specified join type.Equivalent to
join(attribute, JoinType.INNER, join -> null)
. -
join
default <Y> FromValue<Y,From<X, joinY>> (SingularAttribute<? super X, Y> attribute, JoinType joinType, Function<? super Join<X, Y>, ? extends Expression<Boolean>> on) Description copied from interface:SearchStream
Add a singular join to this stream using the specified join type and ON condition. -
bind
Description copied from interface:QueryStream
Bind an unbound reference to the items in this stream.- Specified by:
bind
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
bind
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
bind
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
bind
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
bind
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
bind
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
bind
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
bind
in interfaceSearchValue<X,
S extends From<?, X>> - Parameters:
ref
- unbound reference- Returns:
- new stream that binds
ref
-
peek
Description copied from interface:QueryStream
Peek at the items in this stream.This is useful in cases where the selection can be modified, e.g., setting join
ON
conditions usingJoin.on()
.- Specified by:
peek
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
peek
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
peek
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
peek
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
peek
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
peek
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
peek
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
peek
in interfaceSearchValue<X,
S extends From<?, X>> - Parameters:
peeker
- peeker into stream- Returns:
- new stream that peeks into this stream
-
bind
<X2,S2 extends Selection<X2>> FromValue<X,S> bind(Ref<X2, ? super S2> ref, Function<? super S, ? extends S2> refFunction) Description copied from interface:QueryStream
Bind an unbound reference to the result of applying the given function to the items in this stream.- Specified by:
bind
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
bind
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
bind
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
bind
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
bind
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
bind
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
bind
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
bind
in interfaceSearchValue<X,
S extends From<?, X>> - Type Parameters:
X2
- type of the bound valueS2
- criteria type of the bound value- Parameters:
ref
- unbound referencerefFunction
- function mapping this stream'sSelection
to the reference value- Returns:
- new stream that binds
ref
-
filter
Description copied from interface:QueryStream
Filter results using the specified boolean property.Adds to any previously specified filters.
- Specified by:
filter
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
filter
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
filter
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
filter
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
filter
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
filter
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
filter
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
filter
in interfaceSearchValue<X,
S extends From<?, X>> - Parameters:
attribute
- boolean property- Returns:
- new filtered stream
-
filter
Description copied from interface:QueryStream
Filter results using the boolean expression produced by the given function.Adds to any previously specified filters.
- Specified by:
filter
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
filter
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
filter
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
filter
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
filter
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
filter
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
filter
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
filter
in interfaceSearchValue<X,
S extends From<?, X>> - Parameters:
predicateBuilder
- function mapping this stream's item to a booleanExpression
- Returns:
- new filtered stream
-
withFlushMode
Description copied from interface:QueryStream
Set theFlushModeType
associated with this query.- Specified by:
withFlushMode
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
withFlushMode
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
withFlushMode
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
withFlushMode
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
withFlushMode
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
withFlushMode
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
withFlushMode
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
withFlushMode
in interfaceSearchValue<X,
S extends From<?, X>> - Parameters:
flushMode
- new flush mode- Returns:
- new stream with the specified flush mode configured
- See Also:
-
withLockMode
Description copied from interface:QueryStream
Set theLockModeType
associated with this query.- Specified by:
withLockMode
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
withLockMode
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
withLockMode
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
withLockMode
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
withLockMode
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
withLockMode
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
withLockMode
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
withLockMode
in interfaceSearchValue<X,
S extends From<?, X>> - Parameters:
lockMode
- new lock mode- Returns:
- new stream with the specified lock mode configured
- See Also:
-
withHint
Description copied from interface:QueryStream
Associate a hint with this query.- Specified by:
withHint
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
withHint
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
withHint
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
withHint
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
withHint
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
withHint
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
withHint
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
withHint
in interfaceSearchValue<X,
S extends From<?, X>> - Parameters:
name
- name of hintvalue
- value of hint- Returns:
- new stream with the specified hint configured
- See Also:
-
withHints
Description copied from interface:QueryStream
Associate hints with this query.- Specified by:
withHints
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
withHints
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
withHints
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
withHints
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
withHints
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
withHints
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
withHints
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
withHints
in interfaceSearchValue<X,
S extends From<?, X>> - Parameters:
hints
- hints to add- Returns:
- new stream with the specified hints added
- See Also:
-
withParam
Description copied from interface:QueryStream
Bind the value of a query parameter.Replaces any previous binding of the same parameter.
- Specified by:
withParam
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
withParam
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
withParam
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
withParam
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
withParam
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
withParam
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
withParam
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
withParam
in interfaceSearchValue<X,
S extends From<?, X>> - 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:
-
withParam
Description copied from interface:QueryStream
Bind the value of a query parameter of typeDate
.Replaces any previous binding of the same parameter.
- Specified by:
withParam
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
withParam
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
withParam
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
withParam
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
withParam
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
withParam
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
withParam
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
withParam
in interfaceSearchValue<X,
S extends From<?, X>> - Parameters:
parameter
- the parameter to setvalue
- parameter valuetemporalType
- temporal type forvalue
- Returns:
- new stream with the specified parameter value set
- See Also:
-
withParam
Description copied from interface:QueryStream
Bind the value of a query parameter of typeCalendar
.Replaces any previous binding of the same parameter.
- Specified by:
withParam
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
withParam
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
withParam
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
withParam
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
withParam
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
withParam
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
withParam
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
withParam
in interfaceSearchValue<X,
S extends From<?, X>> - Parameters:
parameter
- the parameter to setvalue
- parameter valuetemporalType
- temporal type forvalue
- Returns:
- new stream with the specified parameter value set
- See Also:
-
withParams
Description copied from interface:QueryStream
Associate parameter bindings with this query.Replaces any previous bindings of the same parameters.
- Specified by:
withParams
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
withParams
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
withParams
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
withParams
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
withParams
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
withParams
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
withParams
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
withParams
in interfaceSearchValue<X,
S extends From<?, X>> - Parameters:
params
- bindings to add- Returns:
- new stream with the specified parameter bindings added
- See Also:
-
withLoadGraph
Description copied from interface:QueryStream
Configure a load graph for this query.Equivalent to
withHint
("jakarta.persistence.loadgraph", name)
.- Specified by:
withLoadGraph
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
withLoadGraph
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
withLoadGraph
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
withLoadGraph
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
withLoadGraph
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
withLoadGraph
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
withLoadGraph
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
withLoadGraph
in interfaceSearchValue<X,
S extends From<?, X>> - Parameters:
name
- name of load graph- Returns:
- new stream with the specified load graph configured
-
withFetchGraph
Description copied from interface:QueryStream
Configure a fetch graph for this query.Equivalent to
withHint
("jakarta.persistence.fetchgraph", name)
.- Specified by:
withFetchGraph
in interfaceExprStream<X,
S extends From<?, X>> - Specified by:
withFetchGraph
in interfaceExprValue<X,
S extends From<?, X>> - Specified by:
withFetchGraph
in interfaceFromStream<X,
S extends From<?, X>> - Specified by:
withFetchGraph
in interfacePathStream<X,
S extends From<?, X>> - Specified by:
withFetchGraph
in interfacePathValue<X,
S extends From<?, X>> - Specified by:
withFetchGraph
in interfaceQueryStream<X,
S extends From<?, X>, AbstractQuery<?>, CriteriaQuery<X>, TypedQuery<X>> - Specified by:
withFetchGraph
in interfaceSearchStream<X,
S extends From<?, X>> - Specified by:
withFetchGraph
in interfaceSearchValue<X,
S extends From<?, X>> - Parameters:
name
- name of fetch graph- Returns:
- new stream with the specified fetch graph configured
-