public class HierarchyOperandImpl extends Object implements HierarchyOperand
Default implementation of the HierarchyOperand
interface.
Modifier and Type | Class and Description |
---|---|
static class |
HierarchyOperandImpl.PathIdsReferenceValue |
Constructor and Description |
---|
HierarchyOperandImpl(QueryParameter pathQueryParameter,
QueryParameter parentQueryParameter,
QueryParameter idQueryParameter)
Creates a new operand instance.
|
Modifier and Type | Method and Description |
---|---|
Predicate |
childOf(String expectedId)
Builds a predicate matching direct children of object with the given ID.
|
Predicate |
childrenOf(Collection<String> expectedIds)
Builds a predicate matching direct children of the objects with the given IDs.
|
Predicate |
descendantOf(String expectedId)
Builds a predicate matching all descendants of the object with the given ID.
|
Predicate |
descendantOfOrEq(String expectedId)
Builds a predicate matching all descendants of the object with the given ID, including the parent object.
|
Predicate |
isRoot()
Builds a predicate matching objects at the root of the hierarchy (i.e. with no parent).
|
Ordering |
orderAsc()
Builds an ordering criterion which sorts by the operand value in ascending order.
|
Ordering |
orderDesc()
Builds an ordering criterion which sorts by the operand value in descending order.
|
public HierarchyOperandImpl(QueryParameter pathQueryParameter, QueryParameter parentQueryParameter, QueryParameter idQueryParameter)
Creates a new operand instance.
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(String expectedId)
HierarchyOperand
Builds a predicate matching all descendants of the object with the given ID.
descendantOf
in interface HierarchyOperand
expectedId
- the id of the (direct or indirect) parent objectpublic Predicate descendantOfOrEq(String expectedId)
HierarchyOperand
Builds a predicate matching all descendants of the object with the given ID, including the parent object.
descendantOfOrEq
in interface HierarchyOperand
expectedId
- the id of the (direct or indirect) parent objectpublic Predicate childOf(String expectedId)
HierarchyOperand
Builds a predicate matching direct children of object with the given ID.
childOf
in interface HierarchyOperand
expectedId
- the id of the direct parent objectpublic Predicate childrenOf(Collection<String> expectedIds)
HierarchyOperand
Builds a predicate matching direct children of the objects with the given IDs.
childrenOf
in interface HierarchyOperand
expectedIds
- the ids of the direct parent objectspublic Predicate isRoot()
HierarchyOperand
Builds a predicate matching objects at the root of the hierarchy (i.e. with no parent).
isRoot
in interface HierarchyOperand
public final Ordering orderAsc()
HierarchyOperand
Builds an ordering criterion which sorts by the operand value in ascending order.
orderAsc
in interface HierarchyOperand
public final Ordering orderDesc()
HierarchyOperand
Builds an ordering criterion which sorts by the operand value in descending order.
orderDesc
in interface HierarchyOperand
Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.