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 voidaccept(CqnTransformationVisitor visitor) Returns nodes to be expandeddefault CqnTransformation.Kindkind()Returns the kind of this transformationlonglevels()Returns the number of levels, which the output set should containMethods inherited from interface com.sap.cds.ql.cqn.transformation.CqnHierarchyTransformation
hierarchyQualifier, hierarchyReference, nodePropertyMethods 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 expandedThe expand levels are represented as a map. Identifier of a node to be expanded mapped to number of levels to be expanded.
nullmeans all levels, 0 means collapsed.- Returns:
- a map that relates the node ID to the required expand level
-
kind
Description copied from interface:CqnTransformationReturns the kind of this transformation- Specified by:
kindin interfaceCqnTransformation- Returns:
- the kind of this transformation
-
accept
- Specified by:
acceptin interfaceCqnTransformation
-