Interface CqnTopLevelsTransformation
- All Superinterfaces:
CqnHierarchyTransformation
,CqnTransformation
,JSONizable
Transformation that determines top level instances that belong to a recursive
hierarchy.
The hierarchy is defined by the
hierarchy
reference
and the hierarchy qualifier
.
The transformation takes an input set consisting of instances that belong to
the hierarchy. The output retains nodes of the top n levels()
,
i.e. nodes with less then n ancestors.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.sap.cds.ql.cqn.transformation.CqnTransformation
CqnTransformation.Kind
-
Field Summary
Fields inherited from interface com.sap.cds.ql.cqn.transformation.CqnTransformation
IDENTITY
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
accept
(CqnTransformationVisitor visitor) Returns nodes to be expanded The expand levels are represented as a map.default CqnTransformation.Kind
kind()
Returns the kind of this transformationlong
levels()
Returns the number of levels, which the output set should containMethods inherited from interface com.sap.cds.ql.cqn.transformation.CqnHierarchyTransformation
hierarchyQualifier, hierarchyReference, nodeProperty
Methods inherited from interface com.sap.cds.ql.cqn.transformation.CqnTransformation
rowType, toJson
-
Method Details
-
levels
long levels()Returns the number of levels, which the output set should contain- Returns:
- the number of levels or -1 if unlimited
-
expandLevels
Returns nodes to be expanded The expand levels are represented as a map. Identifier of a node to be expanded mapped to number of levels to be expanded.null
means all levels, 0 means collapsed.- Returns:
- a map that relates the node ID to the required expand level
-
kind
Description copied from interface:CqnTransformation
Returns the kind of this transformation- Specified by:
kind
in interfaceCqnTransformation
- Returns:
- the kind of this transformation
-
accept
- Specified by:
accept
in interfaceCqnTransformation
-