public final class HierarchyOperand<T extends HierarchicalEntityId> extends Object
Predicate
instances through hierarchy-specific operators.Modifier and Type | Class and Description |
---|---|
static class |
HierarchyOperand.PathElementReferenceValue |
static class |
HierarchyOperand.PathIdsReferenceValue |
Constructor and Description |
---|
HierarchyOperand(QueryParameter pathQueryParameter,
QueryParameter parentQueryParameter,
QueryParameter idQueryParameter)
Creates a new operand instance.
|
Modifier and Type | Method and Description |
---|---|
Predicate |
childOf(T expectedId)
Builds a predicate representing
queryParameter child of expectedId comparison. |
Predicate |
childrenOf(Collection<? extends T> expectedIds)
Builds a predicate representing
queryParameter child of any of expectedIds comparison. |
Predicate |
descendantOf(T expectedId)
Builds a predicate representing
queryParameter descendant of expectedId comparison. |
Predicate |
descendantOfOrEq(List<? extends T> expectedPathIds)
Builds a predicate representing
queryParameter descendant of expectedPathIds or queryParameter = expectedPathIds comparison. |
Predicate |
descendantOfOrEq(T expectedId)
Builds a predicate representing
queryParameter descendant of expectedId or queryParameter = expectedId comparison. |
public HierarchyOperand(QueryParameter pathQueryParameter, QueryParameter parentQueryParameter, QueryParameter idQueryParameter)
pathQueryParameter
- the left operand for all path predicates to be builtparentQueryParameter
- the left operand for all parent predicates to be builtidQueryParameter
- the left operand of the predicate to be built for the inner select statement that determines the path of a given root objectpublic Predicate descendantOf(T expectedId)
queryParameter descendant of expectedId
comparison.expectedId
- the expected id of the comparison, i.e. the id expected to be the (direct or indirect) parentpublic Predicate descendantOfOrEq(T expectedId)
queryParameter descendant of expectedId or queryParameter = expectedId
comparison.expectedId
- the expected id of the comparison, i.e. the id expected to be the (direct or indirect) parent or the element itselfpublic Predicate descendantOfOrEq(List<? extends T> expectedPathIds)
queryParameter descendant of expectedPathIds or queryParameter = expectedPathIds
comparison.expectedPathIds
- the expected path ids of the comparison, i.e. the path ids expected to be the (direct or indirect) parent or the element itselfpublic Predicate childOf(T expectedId)
queryParameter child of expectedId
comparison.expectedId
- the expected id of the comparison, i.e. the id expected to be the direct parentpublic Predicate childrenOf(Collection<? extends T> expectedIds)
queryParameter child of any of expectedIds
comparison.expectedIds
- the possible expected ids, i.e. one of the ids expected to be the direct parentCopyright © 2010 - 2018 edorasware ag. All Rights Reserved.