Package org.dellroad.querystream.jpa
Interface Ref<X,S extends Selection<X>>
- Type Parameters:
X
- stream item typeS
- criteria type for stream item
public interface Ref<X,S extends Selection<X>>
A reference to items in a
QueryStream
.
Ref
s are created and then bound to the items in a QueryStream
via QueryStream.bind()
. Once bound, they may be accessed
in a subsequent filter predicate, subquery QueryStream
, etc., via get()
.
-
Method Summary
-
Method Details
-
bind
Bind the given value to this reference.- Parameters:
value
- value to bind- Returns:
- same
value
- Throws:
IllegalStateException
- if another value is already boundIllegalArgumentException
- ifvalue
is null
-
get
S get()Get the bound value.- Returns:
- bound value
- Throws:
IllegalStateException
- if this instance is not bound
-
unbind
void unbind()Unbind the bound value, if any. -
isBound
boolean isBound()Determine if this instance is bound.- Returns:
- true if this instance is bound, otherwise false
-