Interface DescendantQueryBuilder<T extends DataObject>
- Type Parameters:
T
- Query result type
- All Superinterfaces:
StructuralBuilder<QueryExpression<T>>
@Beta
public interface DescendantQueryBuilder<T extends DataObject>
extends StructuralBuilder<QueryExpression<T>>
Intermediate Query builder stage, which allows the specification of the query result type to be built up via
extractChild(Class)
and extractChild(Class, Class)
methods. Once completed, use either
build()
to create a simple query, or matching()
to transition to specify predicates.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns instance of the product.<N extends Identifiable<K> & ChildOf<? super T>,
K extends Identifier<N>>
@NonNull DescendantQueryBuilder<N>extractChild
(Class<@NonNull N> listItem, K listKey) Add a child path component to the specification of what needs to be extracted, specifying an exact match in a keyed list.<C extends ChoiceIn<? super T> & DataObject,
N extends ChildOf<? super C>>
@NonNull DescendantQueryBuilder<N>extractChild
(Class<C> caseClass, Class<N> childClass) Add a child path component to the specification of what needs to be extracted.<N extends ChildOf<? super T>>
@NonNull DescendantQueryBuilder<N>extractChild
(Class<N> childClass) Add a child path component to the specification of what needs to be extracted.@NonNull MatchBuilderPath<T,
T> matching()
Start specifying type match predicates.
-
Method Details
-
extractChild
Add a child path component to the specification of what needs to be extracted. This method, along with its alternatives, can be used to specify which object type to select from the root path.- Type Parameters:
N
- Container type- Parameters:
childClass
- child container class- Returns:
- This builder
- Throws:
NullPointerException
- if childClass is null
-
extractChild
<N extends Identifiable<K> & ChildOf<? super T>,K extends Identifier<N>> @NonNull DescendantQueryBuilder<N> extractChild(Class<@NonNull N> listItem, K listKey) Add a child path component to the specification of what needs to be extracted, specifying an exact match in a keyed list. This method, along with its alternatives, can be used to specify which object type to select from the root path.- Type Parameters:
N
- List typeK
- Key type- Parameters:
listKey
- List key- Returns:
- This builder
- Throws:
NullPointerException
- if childClass is null
-
extractChild
<C extends ChoiceIn<? super T> & DataObject,N extends ChildOf<? super C>> @NonNull DescendantQueryBuilder<N> extractChild(Class<C> caseClass, Class<N> childClass) Add a child path component to the specification of what needs to be extracted. This method, along with its alternatives, can be used to specify which object type to select from the root path.- Type Parameters:
C
- Case typeN
- Container type- Parameters:
caseClass
- child case classchildClass
- child container class- Returns:
- This builder
- Throws:
NullPointerException
- if any argument is null
-
matching
@NonNull MatchBuilderPath<T,T> matching()Start specifying type match predicates.- Returns:
- A predicate match builder based on current result type
-
build
QueryExpression<T> build()Description copied from interface:StructuralBuilder
Returns instance of the product. Multiple calls to this method are not required to return same instance if the state of the builder has changed.- Specified by:
build
in interfaceStructuralBuilder<T extends DataObject>
- Returns:
- A newly-built instance
-