Package com.sap.cds.ql.hana
Interface HierarchySubset
- All Superinterfaces:
CqnHierarchy
,CqnHierarchySubset
,CqnSource
,CqnTableFunction
,CqnToken
,JSONizable
,Source<StructuredType<?>>
,TableFunction
A function to compute the subset of a source hierarchy, which contains all
nodes relative (ancestors or descendants) to a set of start nodes.
The function adds the element
hierarchy_distance : Int32
to
the result, which indicates the distance of the retained node from the start
node.
Nodes can occur multiple times in the result if they are reachable from
multiple start nodes.-
Method Summary
Modifier and TypeMethodDescriptionCreates a copy of this hierarchy subset function with the given source.distance
(int distanceFromStart, boolean keepStart) Specifies a maximum absolute HIERARCHY_DISTANCEdistance
(int from, int to) Specifies a minimum and a maximum HIERARCHY_DISTANCEfrom
(int from) Specifies a minimum HIERARCHY_DISTANCEstartWhere
(CqnPredicate startWhere) Specifies a filter condition that identifies the start nodes of this hierarchy subset function.to
(int to) Specifies a maximum HIERARCHY_DISTANCEMethods inherited from interface com.sap.cds.ql.hana.CqnHierarchy
asGenerator, asTableFunction, isGenerator, isTableFunction
Methods inherited from interface com.sap.cds.ql.hana.CqnHierarchySubset
asHierarchySubset, from, isAncestors, isDescendants, isHierarchySubset, startWhere, to
Methods inherited from interface com.sap.cds.ql.cqn.CqnSource
asJoin, asRef, asSelect, isJoin, isRef, isSelect
Methods inherited from interface com.sap.cds.CqnTableFunction
name, rowType, source
Methods inherited from interface com.sap.cds.JSONizable
toJson
-
Method Details
-
copy
Creates a copy of this hierarchy subset function with the given source.- Specified by:
copy
in interfaceTableFunction
- Parameters:
source
- the hierarchy source- Returns:
- new hierarchy subset function with given source
-
startWhere
Specifies a filter condition that identifies the start nodes of this hierarchy subset function.- Parameters:
startWhere
- the filter condition that specifies the start nodes- Returns:
- this hierarchy subset function
-
distance
Specifies a minimum and a maximum HIERARCHY_DISTANCE- Parameters:
from
- the minimum distanceto
- the maximum distance- Returns:
- this hierarchy subset function
-
from
Specifies a minimum HIERARCHY_DISTANCE- Parameters:
from
- the minimum distance- Returns:
- this hierarchy subset function
-
to
Specifies a maximum HIERARCHY_DISTANCE- Parameters:
to
- the maximum distance- Returns:
- this hierarchy subset function
-
distance
Specifies a maximum absolute HIERARCHY_DISTANCE- Parameters:
distanceFromStart
- the maximum absolute HIERARCHY_DISTANCEkeepStart
- whether the start nodes should be included- Returns:
- this hierarchy subset function
-