001 /* 002 // $Id: //open/mondrian/src/main/mondrian/olap/Level.java#14 $ 003 // This software is subject to the terms of the Common Public License 004 // Agreement, available at the following URL: 005 // http://www.opensource.org/licenses/cpl.html. 006 // Copyright (C) 1999-2002 Kana Software, Inc. 007 // Copyright (C) 2001-2006 Julian Hyde and others 008 // All Rights Reserved. 009 // You must accept the terms of that agreement to use this software. 010 // 011 // jhyde, 1 March, 1999 012 */ 013 014 package mondrian.olap; 015 016 /** 017 * A <code>Level</code> is a group of {@link Member}s in a {@link Hierarchy}, 018 * all with the same attributes and at the same depth in the hierarchy. 019 */ 020 public interface Level extends OlapElement { 021 022 /** 023 * Returns the depth of this level. 024 * 025 * <p>Note #1: In an access-controlled context, the first visible level of 026 * a hierarchy (as returned by {@link SchemaReader#getHierarchyLevels}) may 027 * not have a depth of 0.</p> 028 * 029 * <p>Note #2: In a parent-child hierarchy, the depth of a member (as 030 * returned by {@link SchemaReader#getMemberDepth}) may not be the same as 031 * the depth of its level. 032 */ 033 int getDepth(); 034 Hierarchy getHierarchy(); 035 036 Level getChildLevel(); 037 Level getParentLevel(); 038 boolean isAll(); 039 boolean areMembersUnique(); 040 LevelType getLevelType(); 041 042 /** Returns properties defined against this level. */ 043 Property[] getProperties(); 044 /** Returns properties defined against this level and parent levels. */ 045 Property[] getInheritedProperties(); 046 047 /** @return the MemberFormatter 048 */ 049 MemberFormatter getMemberFormatter(); 050 051 /** 052 * Returns the approximate number of members in this level, or 053 * {@link Integer#MIN_VALUE} if no approximation is known. 054 */ 055 int getApproxRowCount(); 056 } 057 058 // End Level.java