Esempio n. 1
0
 public boolean dependsOn(Hierarchy hierarchy) {
   if (super.dependsOn(hierarchy)) {
     return true;
   }
   for (Type type : ((TupleType) tupleCalc.getType()).elementTypes) {
     // If the expression definitely includes the dimension (in this
     // case, that means it is a member of that dimension) then we
     // do not depend on the dimension. For example, the scalar value of
     //   ([Store].[USA], [Gender].[F])
     // does not depend on [Store].
     //
     // If the dimensionality of the expression is unknown, then the
     // expression MIGHT include the dimension, so to be safe we have to
     // say that it depends on the given dimension. For example,
     //   (Dimensions(3).CurrentMember.Parent, [Gender].[F])
     // may depend on [Store].
     if (type.usesHierarchy(hierarchy, true)) {
       return false;
     }
   }
   return true;
 }