Package mondrian.mdx

Class UnresolvedFunCall

  • All Implemented Interfaces:
    Exp, FunCall

    public class UnresolvedFunCall
    extends ExpBase
    implements FunCall
    An expression consisting of a named function or operator applied to a set of arguments. The syntax determines whether this is called infix, with function call syntax, and so forth.
    Since:
    Sep 28, 2005
    Author:
    jhyde
    • Constructor Detail

      • UnresolvedFunCall

        public UnresolvedFunCall​(String name,
                                 Exp[] args)
        Creates a function call with Syntax.Function syntax.
      • UnresolvedFunCall

        public UnresolvedFunCall​(String name,
                                 Syntax syntax,
                                 Exp[] args)
        Creates a function call.
    • Method Detail

      • getCategory

        public int getCategory()
        Description copied from interface: Exp
        Returns the Category of the expression.
        Specified by:
        getCategory in interface Exp
      • getType

        public Type getType()
        Description copied from interface: Exp
        Returns the type of this expression. Never null.
        Specified by:
        getType in interface Exp
      • unparse

        public void unparse​(PrintWriter pw)
        Description copied from class: QueryPart
        Writes a string representation of this parse tree node to the given writer.
        Specified by:
        unparse in interface Exp
        Overrides:
        unparse in class QueryPart
        Parameters:
        pw - writer
      • accept

        public Object accept​(MdxVisitor visitor)
        Description copied from interface: Exp
        Accepts a visitor to this Exp. The implementation should generally dispatches to the MdxVisitor.visit(mondrian.olap.Query) method appropriate to the type of expression.
        Specified by:
        accept in interface Exp
        Parameters:
        visitor - Visitor
      • accept

        public Exp accept​(Validator validator)
        Description copied from interface: Exp
        Validates this expression. The validator acts in the role of 'visitor' (see Gang of Four 'visitor pattern'), and an expression in the role of 'visitee'.
        Specified by:
        accept in interface Exp
        Parameters:
        validator - Validator contains validation context
        Returns:
        The validated expression; often but not always the same as this expression
      • accept

        public Calc accept​(ExpCompiler compiler)
        Description copied from interface: Exp
        Converts this expression into an a tree of expressions which can be efficiently evaluated.
        Specified by:
        accept in interface Exp
        Overrides:
        accept in class ExpBase
        Returns:
        A compiled expression
      • getFunName

        public String getFunName()
        Returns the function name.
        Specified by:
        getFunName in interface FunCall
        Returns:
        function name
      • getSyntax

        public Syntax getSyntax()
        Returns the syntax of this function call.
        Specified by:
        getSyntax in interface FunCall
        Returns:
        the syntax of the call
      • getArg

        public Exp getArg​(int index)
        Returns the Exp argument at the specified index.
        Specified by:
        getArg in interface FunCall
        Parameters:
        index - the index of the Exp.
        Returns:
        the Exp at the specified index of this array of Exp. The first Exp is at index 0.
        See Also:
        getArgs()
      • getArgs

        public Exp[] getArgs()
        Returns the internal array of Exp arguments.

        Note: this does NOT do a copy.

        Specified by:
        getArgs in interface FunCall
        Returns:
        the array of expressions
      • getArgCount

        public final int getArgCount()
        Returns the number of arguments.
        Specified by:
        getArgCount in interface FunCall
        Returns:
        number of arguments.
        See Also:
        getArgs()