mondrian.olap.fun
Class FunUtil

java.lang.Object
  extended by org.eigenbase.xom.XMLUtil
      extended by org.eigenbase.xom.XOMUtil
          extended by mondrian.olap.Util
              extended by mondrian.olap.fun.FunUtil
Direct Known Subclasses:
FunDefBase, MultiResolver, ResolverBase

public class FunUtil
extends Util

FunUtil contains a set of methods useful within the mondrian.olap.fun package.

Since:
1.0
Author:
jhyde
 

Nested Class Summary
(package private) static class FunUtil.SetWrapper
           
 
Nested classes/interfaces inherited from class mondrian.olap.Util
Util.ErrorCellValue, Util.PropertyList
 
Field Summary
static boolean BooleanNull
          Null value in three-valued boolean logic.
static double DoubleEmpty
          Special value which indicates that a double computation has returned the MDX EMPTY value.
static double DoubleNull
          Special value which indicates that a double computation has returned the MDX null value.
(package private) static String[] emptyStringArray
           
static int IntegerNull
          Special value which indicates that an int computation has returned the MDX null value.
static mondrian.olap.fun.FunUtil.NullMember NullMember
           
 
Fields inherited from class mondrian.olap.Util
EmptyValue, JdbcVersion, nl, nullValue, PreJdk15, Retrowoven
 
Constructor Summary
FunUtil()
           
 
Method Summary
(package private) static List<Member> addMembers(SchemaReader schemaReader, List<Member> members, Hierarchy hierarchy)
           
(package private) static List<Member> addMembers(SchemaReader schemaReader, List<Member> members, Level level)
           
(package private) static
<T> void
addUnique(List<T> left, List<T> right, Set<Object> set)
          Adds every element of right which is not in set to both set and left.
(package private) static Member ancestor(Evaluator evaluator, Member member, int distance, Level targetLevel)
          Returns the ancestor of member at the given level or distance.
(package private) static void appendTuple(StringBuilder buf, Member[] members)
           
static Object avg(Evaluator evaluator, List members, Calc calc)
           
(package private) static void checkCompatible(Exp left, Exp right, FunDef funDef)
          Throws an error if the expressions don't have the same hierarchy.
(package private) static boolean checkFlag(int value, int mask, boolean strict)
          Returns true if the mask in flag is set.
static void checkIterListResultStyles(Calc calc)
           
static void checkListResultStyles(Calc calc)
           
static int compareHierarchically(Member m1, Member m2, boolean post)
          Compares a pair of members according to their positions in a prefix-order (or postfix-order, if post is true) walk over a hierarchy.
static int compareSiblingMembers(Member m1, Member m2)
          Compares two members which are known to have the same parent.
static int compareValues(double d1, double d2)
          Compares double-precision values according to MDX semantics.
static int compareValues(int i, int j)
           
static int compareValues(Object value0, Object value1)
          Compares two cell values.
(package private) static double correlation(Evaluator evaluator, List memberList, Calc exp1, Calc exp2)
           
static int count(Evaluator evaluator, Iterable iterable, boolean includeEmpty)
           
(package private) static Member cousin(SchemaReader schemaReader, Member member, Member ancestorMember)
          Returns the member under ancestorMember having the same relative position under member's parent.
(package private) static Object covariance(Evaluator evaluator, List members, Calc exp1, Calc exp2, boolean biased)
           
(package private) static FunDef createDummyFunDef(Resolver resolver, int returnCategory, Exp[] args)
           
static int decodeCategory(String flags, int offset)
          Decodes the offsetth character of an encoded method signature into a type category.
static int[] decodeParameterCategories(String flags)
          Decodes a string of parameter types into an array of type codes.
static int decodeReturnCategory(String flags)
          Decodes the signature of a function into a category code which describes the return type of the operator.
static Syntax decodeSyntacticType(String flags)
          Decodes the syntactic type of an operator.
(package private) static List<Member> dimensionMembers(Dimension dimension, Evaluator evaluator, boolean includeCalcMembers)
           
(package private) static boolean equalTuple(Member[] members0, Member[] members1)
          Returns whether two tuples are equal.
(package private) static Map<Member,Object> evaluateMembers(Evaluator evaluator, Calc exp, List<Member> members, boolean parentsToo)
          For each member in a list, evaluate an expression and create a map from members to values.
(package private) static Map<Member,Object> evaluateMembers(Evaluator evaluator, List<Member> members, boolean parentsToo)
           
(package private) static FunUtil.SetWrapper evaluateSet(Evaluator evaluator, Iterable members, Calc calc)
          Evaluates exp (if defined) over members to generate a List of FunUtil.SetWrapper objects, which contains a Double value and meta information, unlike evaluateMembers(mondrian.olap.Evaluator, mondrian.calc.Calc, java.util.List, boolean), which only produces values.
(package private) static FunUtil.SetWrapper[] evaluateSet(Evaluator evaluator, List members, DoubleCalc[] calcs, boolean isTuples)
          Evaluates one or more expressions against the member list returning a SetWrapper array.
(package private) static Map<Object,Object> evaluateTuples(Evaluator evaluator, Calc exp, List<Member[]> members)
          For each tuple in a list, evaluates an expression and creates a map from tuples to values.
(package private) static
<E extends Enum<E>>
E
getLiteralArg(ResolvedFunCall call, int i, E defaultValue, Class<E> allowedValues)
          Returns the ordinal of a literal argument.
(package private) static String getLiteralArg(ResolvedFunCall call, int i, String defaultValue, String[] allowedValues)
          Returns an argument whose value is a literal.
(package private) static List<Member> getNonEmptyLevelMembers(Evaluator evaluator, Level level, boolean includeCalcMembers)
          Returns members of a level which are not empty (according to the criteria expressed by the evaluator).
static List<Member> getNonEmptyMemberChildren(Evaluator evaluator, Member member)
           
static void hierarchize(List members, boolean post)
           
(package private) static List<Member> hierarchyMembers(Hierarchy hierarchy, Evaluator evaluator, boolean includeCalcMembers)
           
(package private) static boolean isAncestorOf(Member m0, Member m1, boolean strict)
          Returns whether m0 is an ancestor of m1.
static boolean isMemberType(Calc calc)
           
(package private) static List<Member> levelMembers(Level level, Evaluator evaluator, boolean includeCalcMembers)
           
(package private) static Member makeNullMember(MemberType memberType)
           
static Member[] makeNullTuple(TupleType tupleType)
           
static Object max(Evaluator evaluator, List members, Calc exp)
           
(package private) static List<Member> memberRange(Evaluator evaluator, Member startMember, Member endMember)
           
static Object min(Evaluator evaluator, List members, Calc calc)
           
static RuntimeException newEvalException(FunDef funDef, String message)
          Creates an exception which indicates that an error has occurred while executing a given function.
static RuntimeException newEvalException(Throwable throwable)
          Creates an exception which indicates that an error has occurred while executing a given function.
(package private) static double percentile(Evaluator evaluator, List members, Calc exp, double p)
           
(package private) static List<Member> periodsToDate(Evaluator evaluator, Level level, Member member)
           
protected static double quartile(Evaluator evaluator, List members, Calc exp, int range)
          Returns the member which lies upon a particular quartile according to a given expression.
(package private) static List<Member> removeCalculatedMembers(List<Member> memberList)
          Removes every member from a list which is calculated.
static FunDef resolveFunArgs(Validator validator, Exp[] args, Exp[] newArgs, String name, Syntax syntax)
          Validates the arguments to a function and resolves the function.
static int searchValuesDesc(Object[] values, Object value)
          Binary searches an array of values.
(package private) static int sign(double d)
           
(package private) static void sortMembers(Evaluator evaluator, List<Member> members, Calc exp, boolean desc, boolean brk)
          Helper function to sortMembers a list of members according to an expression.
static void sortTuples(Evaluator evaluator, List<Member[]> tuples, Calc exp, boolean desc, boolean brk, int arity)
          Helper function to sortMembers a list of members according to an expression.
static void sortValuesDesc(Object[] values)
          Sorts an array of values.
(package private) static Object stdev(Evaluator evaluator, List members, Calc exp, boolean biased)
           
static Object sum(Evaluator evaluator, List members, Calc exp)
           
static double sumDouble(Evaluator evaluator, Iterable iterable, Calc exp)
           
static double sumDouble(Evaluator evaluator, List members, Calc exp)
           
(package private) static void toPercent(List members, Map mapMemberToValue, boolean isMember)
          Turns the mapped values into relative values (percentages) for easy use by the general topOrBottom function.
(package private) static boolean tupleContainsNullMember(Member[] tuple)
          Returns whether one of the members in a tuple is null.
(package private) static Object var(Evaluator evaluator, List members, Calc exp, boolean biased)
           
 
Methods inherited from class mondrian.olap.Util
addDatabaseTime, addLevelCalculatedMembers, areOccurencesEqual, assertPostcondition, assertPostcondition, assertPrecondition, assertPrecondition, assertTrue, assertTrue, badValue, camelToUpper, caseSensitiveCompareName, cast, cast, checkCJResultLimit, commaList, compareKey, compareName, convertStackToString, createExpr, createRandom, createSimpleValidator, createUdf, dbTimeMillis, deprecated, enumSetAllOf, enumSetNoneOf, enumSetOf, equal, equalName, equals, equals, getAnnotation, getErrorMessage, getErrorMessage, getFirstDescendantOnLevel, getMemberOrdinalInParent, hash, hash, hashArray, implode, isEmpty, isNull, isSorted, isValidProperty, lookup, lookup, lookup, lookup, lookupCompound, lookupCompound, lookupHierarchyLevel, lookupHierarchyRootMember, lookupHierarchyRootMember, lookupProperty, makeBigDecimalFromDouble, makeFqName, makeFqName, makeFqName, maskVersion, mdxEncodeString, needToImplement, newError, newError, newInternal, newInternal, nonDbTimeMillis, normalizeName, parseCommaList, parseConnectString, parseIdentifier, printMemory, printMemory, quoteForMdx, quoteMdxIdentifier, quoteMdxIdentifier, quoteMdxIdentifier, quoteMdxIdentifier, quotePattern, readFully, readURL, readURL, readURL, readURL, replace, replace, replaceProperties, singleQuoteString, singleQuoteString, toMap, toURL, unexpected, union, union, uniquify, unparse, unparse, wildcardToRegexp
 
Methods inherited from class org.eigenbase.xom.XOMUtil
addAll, addAll, addChild, addChild, addChildren, addElement, concatenate, createDefaultParser, discard, discard, discard, discard, discard, discard, discard, discard, discard, getFirstInstance, toList, toVector, wrapperToXml
 
Methods inherited from class org.eigenbase.xom.XMLUtil
getFirstTagName, printAtt, printAtt, printAtt, printAtt, printPCDATA, printPCDATA, printPCDATA, quoteAtt, quoteAtt, quoteAtt, quoteAtt, quotePCDATA, stringEncodeXML, stringHasXMLSpecials
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

emptyStringArray

static final String[] emptyStringArray

NullMember

public static final mondrian.olap.fun.FunUtil.NullMember NullMember

DoubleNull

public static final double DoubleNull
Special value which indicates that a double computation has returned the MDX null value. See DoubleCalc.

See Also:
Constant Field Values

DoubleEmpty

public static final double DoubleEmpty
Special value which indicates that a double computation has returned the MDX EMPTY value. See DoubleCalc.

See Also:
Constant Field Values

IntegerNull

public static final int IntegerNull
Special value which indicates that an int computation has returned the MDX null value. See IntegerCalc.

See Also:
Constant Field Values

BooleanNull

public static final boolean BooleanNull
Null value in three-valued boolean logic. Actually, a placeholder until we actually implement 3VL.

See Also:
Constant Field Values
Constructor Detail

FunUtil

public FunUtil()
Method Detail

newEvalException

public static RuntimeException newEvalException(FunDef funDef,
                                                String message)
Creates an exception which indicates that an error has occurred while executing a given function.


newEvalException

public static RuntimeException newEvalException(Throwable throwable)
Creates an exception which indicates that an error has occurred while executing a given function.


isMemberType

public static boolean isMemberType(Calc calc)

checkIterListResultStyles

public static void checkIterListResultStyles(Calc calc)

checkListResultStyles

public static void checkListResultStyles(Calc calc)

getLiteralArg

static String getLiteralArg(ResolvedFunCall call,
                            int i,
                            String defaultValue,
                            String[] allowedValues)
Returns an argument whose value is a literal.


getLiteralArg

static <E extends Enum<E>> E getLiteralArg(ResolvedFunCall call,
                                           int i,
                                           E defaultValue,
                                           Class<E> allowedValues)
Returns the ordinal of a literal argument. If the argument does not belong to the supplied enumeration, returns -1.


checkCompatible

static void checkCompatible(Exp left,
                            Exp right,
                            FunDef funDef)
Throws an error if the expressions don't have the same hierarchy.

Throws:
MondrianEvaluationException - if expressions don't have the same hierarchy
Parameters:
left -
right -

checkFlag

static boolean checkFlag(int value,
                         int mask,
                         boolean strict)
Returns true if the mask in flag is set.

Parameters:
value - The value to check.
mask - The mask within value to look for.
strict - If true all the bits in mask must be set. If false the method will return true if any of the bits in mask are set.
Returns:
true if the correct bits in mask are set.

addUnique

static <T> void addUnique(List<T> left,
                          List<T> right,
                          Set<Object> set)
Adds every element of right which is not in set to both set and left.


addMembers

static List<Member> addMembers(SchemaReader schemaReader,
                               List<Member> members,
                               Hierarchy hierarchy)

addMembers

static List<Member> addMembers(SchemaReader schemaReader,
                               List<Member> members,
                               Level level)

removeCalculatedMembers

static List<Member> removeCalculatedMembers(List<Member> memberList)
Removes every member from a list which is calculated. The list must not be null, and must consist only of members.

Parameters:
memberList - Member list
Returns:
List of non-calculated members

isAncestorOf

static boolean isAncestorOf(Member m0,
                            Member m1,
                            boolean strict)
Returns whether m0 is an ancestor of m1.

Parameters:
strict - if true, a member is not an ancestor of itself

evaluateMembers

static Map<Member,Object> evaluateMembers(Evaluator evaluator,
                                          Calc exp,
                                          List<Member> members,
                                          boolean parentsToo)
For each member in a list, evaluate an expression and create a map from members to values.

If the list contains tuples, use evaluateTuples(mondrian.olap.Evaluator, mondrian.calc.Calc, java.util.List).

Pre-condition:
exp != null, exp.getType() instanceof ScalarType
Parameters:
evaluator - Evaluation context
exp - Expression to evaluate
members - List of members
parentsToo - If true, evaluate the expression for all ancestors of the members as well

evaluateTuples

static Map<Object,Object> evaluateTuples(Evaluator evaluator,
                                         Calc exp,
                                         List<Member[]> members)
For each tuple in a list, evaluates an expression and creates a map from tuples to values.

Pre-condition:
exp != null, exp.getType() instanceof ScalarType
Parameters:
evaluator - Evaluation context
exp - Expression to evaluate
members - List of members (or List of Member[] tuples)

evaluateMembers

static Map<Member,Object> evaluateMembers(Evaluator evaluator,
                                          List<Member> members,
                                          boolean parentsToo)

sortMembers

static void sortMembers(Evaluator evaluator,
                        List<Member> members,
                        Calc exp,
                        boolean desc,
                        boolean brk)
Helper function to sortMembers a list of members according to an expression.

NOTE: This function does not preserve the contents of the validator.


sortTuples

public static void sortTuples(Evaluator evaluator,
                              List<Member[]> tuples,
                              Calc exp,
                              boolean desc,
                              boolean brk,
                              int arity)
Helper function to sortMembers a list of members according to an expression.

NOTE: This function does not preserve the contents of the validator.


hierarchize

public static void hierarchize(List members,
                               boolean post)

sign

static int sign(double d)

compareValues

public static int compareValues(double d1,
                                double d2)
Compares double-precision values according to MDX semantics.

MDX requires a total order:

    -inf < NULL < ... < -1 < ... < 0 < ... < NaN < +inf
 
but this is different than Java semantics, specifically with regard to Double.NaN.


compareValues

public static int compareValues(int i,
                                int j)

compareValues

public static int compareValues(Object value0,
                                Object value1)
Compares two cell values.

Nulls compare last, exceptions (including the object which indicates the the cell is not in the cache yet) next, then numbers and strings are compared by value.

Parameters:
value0 - First cell value
value1 - Second cell value
Returns:
-1, 0, or 1, depending upon whether first cell value is less than, equal to, or greater than the second

toPercent

static void toPercent(List members,
                      Map mapMemberToValue,
                      boolean isMember)
Turns the mapped values into relative values (percentages) for easy use by the general topOrBottom function. This might also be a useful function in itself.


decodeSyntacticType

public static Syntax decodeSyntacticType(String flags)
Decodes the syntactic type of an operator.

Parameters:
flags - A encoded string which represents an operator signature, as used by the flags parameter used to construct a FunDefBase.
Returns:
A Syntax

decodeReturnCategory

public static int decodeReturnCategory(String flags)
Decodes the signature of a function into a category code which describes the return type of the operator.

For example, decodeReturnType("fnx") returns Category.Numeric, indicating this function has a numeric return value.

Parameters:
flags - The signature of an operator, as used by the flags parameter used to construct a FunDefBase.
Returns:
An array Category codes.

decodeCategory

public static int decodeCategory(String flags,
                                 int offset)
Decodes the offsetth character of an encoded method signature into a type category.

The codes are:

aCategory.Array
dCategory.Dimension
hCategory.Hierarchy
lCategory.Level
bCategory.Logical
mCategory.Member
NConstant Category.Numeric
nCategory.Numeric
xCategory.Set
#Constant Category.String
SCategory.String
tCategory.Tuple
vCategory.Value
yCategory.Symbol

Parameters:
flags - Encoded signature string
offset - 0-based offset of character within string
Returns:
A Category

decodeParameterCategories

public static int[] decodeParameterCategories(String flags)
Decodes a string of parameter types into an array of type codes.

Each character is decoded using decodeCategory(String, int). For example, decodeParameterTypes("nx") returns {Category.Numeric, Category.Set}.

Parameters:
flags - The signature of an operator, as used by the flags parameter used to construct a FunDefBase.
Returns:
An array Category codes.

sortValuesDesc

public static void sortValuesDesc(Object[] values)
Sorts an array of values.


searchValuesDesc

public static int searchValuesDesc(Object[] values,
                                   Object value)
Binary searches an array of values.


percentile

static double percentile(Evaluator evaluator,
                         List members,
                         Calc exp,
                         double p)

quartile

protected static double quartile(Evaluator evaluator,
                                 List members,
                                 Calc exp,
                                 int range)
Returns the member which lies upon a particular quartile according to a given expression.

Pre-condition:
range >= 1 && range <= 3
Parameters:
evaluator - Evaluator
members - List of members
exp - Expression to rank members
range - Quartile (1, 2 or 3)

min

public static Object min(Evaluator evaluator,
                         List members,
                         Calc calc)

max

public static Object max(Evaluator evaluator,
                         List members,
                         Calc exp)

var

static Object var(Evaluator evaluator,
                  List members,
                  Calc exp,
                  boolean biased)

correlation

static double correlation(Evaluator evaluator,
                          List memberList,
                          Calc exp1,
                          Calc exp2)

covariance

static Object covariance(Evaluator evaluator,
                         List members,
                         Calc exp1,
                         Calc exp2,
                         boolean biased)

stdev

static Object stdev(Evaluator evaluator,
                    List members,
                    Calc exp,
                    boolean biased)

avg

public static Object avg(Evaluator evaluator,
                         List members,
                         Calc calc)

sum

public static Object sum(Evaluator evaluator,
                         List members,
                         Calc exp)

sumDouble

public static double sumDouble(Evaluator evaluator,
                               List members,
                               Calc exp)

sumDouble

public static double sumDouble(Evaluator evaluator,
                               Iterable iterable,
                               Calc exp)

count

public static int count(Evaluator evaluator,
                        Iterable iterable,
                        boolean includeEmpty)

evaluateSet

static FunUtil.SetWrapper evaluateSet(Evaluator evaluator,
                                      Iterable members,
                                      Calc calc)
Evaluates exp (if defined) over members to generate a List of FunUtil.SetWrapper objects, which contains a Double value and meta information, unlike evaluateMembers(mondrian.olap.Evaluator, mondrian.calc.Calc, java.util.List, boolean), which only produces values.

Pre-condition:
exp != null

evaluateSet

static FunUtil.SetWrapper[] evaluateSet(Evaluator evaluator,
                                        List members,
                                        DoubleCalc[] calcs,
                                        boolean isTuples)
Evaluates one or more expressions against the member list returning a SetWrapper array. Where this differs very significantly from the above evaluateSet methods is how it count null values and Throwables; this method adds nulls to the SetWrapper Vector rather than not adding anything - as the above method does. The impact of this is that if, for example, one was creating a list of x,y values then each list will have the same number of values (though some might be null) - this allows higher level code to determine how to handle the lack of data rather than having a non-equal number (if one is plotting x,y values it helps to have the same number and know where a potential gap is the data is.


periodsToDate

static List<Member> periodsToDate(Evaluator evaluator,
                                  Level level,
                                  Member member)

memberRange

static List<Member> memberRange(Evaluator evaluator,
                                Member startMember,
                                Member endMember)

cousin

static Member cousin(SchemaReader schemaReader,
                     Member member,
                     Member ancestorMember)
Returns the member under ancestorMember having the same relative position under member's parent.

For exmaple, cousin([Feb 2001], [Q3 2001]) is [August 2001].

Parameters:
schemaReader - The reader to use
member - The member for which we'll find the cousin.
ancestorMember - The cousin's ancestor.
Returns:
The child of ancestorMember in the same position under ancestorMember as member is under its parent.

ancestor

static Member ancestor(Evaluator evaluator,
                       Member member,
                       int distance,
                       Level targetLevel)
Returns the ancestor of member at the given level or distance. It is assumed that any error checking required has been done prior to calling this function.

This method takes into consideration the fact that there may be intervening hidden members between member and the ancestor. If targetLevel is not null, then the method will only return a member if the level at distance from the member is actually the targetLevel specified.

Parameters:
evaluator - The evaluation context
member - The member for which the ancestor is to be found
distance - The distance up the chain the ancestor is to be found.
targetLevel - The desired targetLevel of the ancestor. If null, then the distance completely determines the desired ancestor.
Returns:
The ancestor member, or null if no such ancestor exists.

compareHierarchically

public static int compareHierarchically(Member m1,
                                        Member m2,
                                        boolean post)
Compares a pair of members according to their positions in a prefix-order (or postfix-order, if post is true) walk over a hierarchy.

Parameters:
m1 - First member
m2 - Second member
post - Whether to sortMembers in postfix order. If true, a parent will sortMembers immediately after its last child. If false, a parent will sortMembers immediately before its first child.
Returns:
-1 if m1 collates before m2, 0 if m1 equals m2, 1 if m1 collates after m2

compareSiblingMembers

public static int compareSiblingMembers(Member m1,
                                        Member m2)
Compares two members which are known to have the same parent. First, compare by ordinal. This is only valid now we know they're siblings, because ordinals are only unique within a parent. If the dimension does not use ordinals, both ordinals will be -1.

If the ordinals do not differ, compare using regular member comparison.

Parameters:
m1 - First member
m2 - Second member
Returns:
-1 if m1 collates less than m2, 1 if m1 collates after m2, 0 if m1 == m2.

tupleContainsNullMember

static boolean tupleContainsNullMember(Member[] tuple)
Returns whether one of the members in a tuple is null.


makeNullTuple

public static Member[] makeNullTuple(TupleType tupleType)

makeNullMember

static Member makeNullMember(MemberType memberType)

resolveFunArgs

public static FunDef resolveFunArgs(Validator validator,
                                    Exp[] args,
                                    Exp[] newArgs,
                                    String name,
                                    Syntax syntax)
Validates the arguments to a function and resolves the function.

Parameters:
validator - validator used to validate function arguments and resolve the function
args - arguments to the function
newArgs - returns the resolved arguments to the function
name - function name
syntax - syntax style used to invoke function
Returns:
resolved function definition

appendTuple

static void appendTuple(StringBuilder buf,
                        Member[] members)

equalTuple

static boolean equalTuple(Member[] members0,
                          Member[] members1)
Returns whether two tuples are equal.

The members are allowed to be in different positions. For example,

([Gender].[M], [Store].[USA]) IS ([Store].[USA], [Gender].[M])
returns true.


createDummyFunDef

static FunDef createDummyFunDef(Resolver resolver,
                                int returnCategory,
                                Exp[] args)

getNonEmptyMemberChildren

public static List<Member> getNonEmptyMemberChildren(Evaluator evaluator,
                                                     Member member)

getNonEmptyLevelMembers

static List<Member> getNonEmptyLevelMembers(Evaluator evaluator,
                                            Level level,
                                            boolean includeCalcMembers)
Returns members of a level which are not empty (according to the criteria expressed by the evaluator).

Parameters:
evaluator - Evaluator, determines non-empty criteria
level - Level
includeCalcMembers - Whether to include calculated members

levelMembers

static List<Member> levelMembers(Level level,
                                 Evaluator evaluator,
                                 boolean includeCalcMembers)

hierarchyMembers

static List<Member> hierarchyMembers(Hierarchy hierarchy,
                                     Evaluator evaluator,
                                     boolean includeCalcMembers)

dimensionMembers

static List<Member> dimensionMembers(Dimension dimension,
                                     Evaluator evaluator,
                                     boolean includeCalcMembers)

SourceForge.net_Logo