Class DescendantsFunDef

  • All Implemented Interfaces:
    FunDef

    class DescendantsFunDef
    extends FunDefBase
    Definition of the Descendants MDX function.
    Since:
    Mar 23, 2006
    Author:
    jhyde
    • Constructor Detail

      • DescendantsFunDef

        public DescendantsFunDef​(FunDef dummyFunDef)
    • Method Detail

      • compileCall

        public Calc compileCall​(ResolvedFunCall call,
                                ExpCompiler compiler)
        Description copied from interface: FunDef
        Converts a call to this function into executable objects.

        The result must implement the appropriate interface for the result type. For example, a function which returns an integer must return an object which implements IntegerCalc.

        Specified by:
        compileCall in interface FunDef
        Overrides:
        compileCall in class FunDefBase
      • descendantsByLevel

        static void descendantsByLevel​(SchemaReader schemaReader,
                                       Member ancestor,
                                       Level level,
                                       List<Member> result,
                                       boolean before,
                                       boolean self,
                                       boolean after,
                                       boolean leaves,
                                       Evaluator context)
        Finds all descendants of a member which are before/at/after a level, and/or are leaves (have no descendants) and adds them to a result list.
        Parameters:
        schemaReader - Member reader
        ancestor - Member to find descendants of
        level - Level relative to which to filter, must not be null
        result - Result list
        before - Whether to output members above level
        self - Whether to output members at level
        after - Whether to output members below level
        leaves - Whether to output members which are leaves
        context - Evaluation context; determines criteria by which the result set should be filtered