Examples of evaluateMember()


Examples of mondrian.calc.MemberCalc.evaluateMember()

    public Object evaluate(Evaluator evaluator) {
        Member[] members = new Member[memberCalcs.length];
        for (int i = 0; i < memberCalcs.length; i++) {
            MemberCalc memberCalc = memberCalcs[i];
            final Member member = memberCalc.evaluateMember(evaluator);
            if (member == null
                || member.isNull())
            {
                // This method needs to leave the evaluator in the same state
                // it found it.
View Full Code Here

Examples of mondrian.calc.MemberCalc.evaluateMember()

        return new AbstractMemberCalc(
            call,
            new Calc[] {memberCalc, integerCalc})
        {
            public Member evaluateMember(Evaluator evaluator) {
                Member member = memberCalc.evaluateMember(evaluator);
                int n = integerCalc.evaluateInteger(evaluator);
                if (lag) {
                    if (n == Integer.MIN_VALUE) {
                        // Bump up lagValue by one, otherwise -n (used
                        // in the getLeadMember call below) is out of
View Full Code Here

Examples of mondrian.calc.MemberCalc.evaluateMember()

            final MemberCalc memberCalc =
                    compiler.compileMember(call.getArg(0));
            return new AbstractStringCalc(call, new Calc[] {memberCalc}) {
                public String evaluateString(Evaluator evaluator) {
                    final Member member =
                            memberCalc.evaluateMember(evaluator);
                    if (member.isNull()) {
                        return "";
                    }
                    StringBuilder buf = new StringBuilder();
                    buf.append(member.getUniqueName());
View Full Code Here

Examples of mondrian.calc.MemberCalc.evaluateMember()

                } else {
                    level = levelCalc.evaluateLevel(evaluator);
                    if (memberCalc == null) {
                        member = evaluator.getContext(level.getHierarchy());
                    } else {
                        member = memberCalc.evaluateMember(evaluator);
                    }
                }
                return periodsToDate(evaluator, level, member);
            }
View Full Code Here

Examples of mondrian.calc.MemberCalc.evaluateMember()

    public Calc compileCall(ResolvedFunCall call, ExpCompiler compiler) {
        assert call.getArgCount() == 1;
        final MemberCalc memberCalc = compiler.compileMember(call.getArg(0));
        return new AbstractBooleanCalc(call, new Calc[]{memberCalc}) {
            public boolean evaluateBoolean(Evaluator evaluator) {
                Member member = memberCalc.evaluateMember(evaluator);
                return member.isNull();
            }
        };
    }
}
View Full Code Here

Examples of mondrian.calc.MemberCalc.evaluateMember()

        return new AbstractListCalc(
            call, new Calc[] {memberCalc, indexValueCalc})
        {
            public List evaluateList(Evaluator evaluator) {
                Member member = memberCalc.evaluateMember(evaluator);
                int indexValue = indexValueCalc.evaluateInteger(evaluator);

                return lastPeriods(member, evaluator, indexValue);
            }
        };
View Full Code Here

Examples of mondrian.calc.MemberCalc.evaluateMember()

    public Object evaluate(Evaluator evaluator) {
        final int savepoint = evaluator.savepoint();
        try {
            for (int i = 0; i < memberCalcs.length; i++) {
                MemberCalc memberCalc = memberCalcs[i];
                final Member member = memberCalc.evaluateMember(evaluator);
                if (member == null
                        || member.isNull())
                {
                    return null;
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.