Exemple #1
0
  public JROlapMember ancestorMatch(JROlapMember member) {
    JROlapMember ancestor;
    int memberDepth = member.getDepth();

    if (depth == null) {
      ancestor = member;
    } else if (depth.getDepth() <= memberDepth) {
      ancestor = member;
      for (int i = depth.getDepth(); i < memberDepth && ancestor != null; ++i) {
        ancestor = ancestor.getParentMember();
      }
    } else {
      ancestor = null;
    }

    return ancestor;
  }
Exemple #2
0
  public boolean matches(JROlapMember member) {
    boolean match;
    int memberDepth = member.getDepth();

    if (depth == null) {
      match = true;
    } else {
      match = memberDepth == depth.getDepth();
    }
    return match;
  }