Package mondrian.olap
Class CubeBase
- java.lang.Object
-
- mondrian.olap.OlapElementBase
-
- mondrian.olap.CubeBase
-
- All Implemented Interfaces:
Annotated
,Cube
,OlapElement
- Direct Known Subclasses:
RolapCube
public abstract class CubeBase extends OlapElementBase implements Cube
CubeBase
is an abstract implementation ofCube
.- Since:
- 6 August, 2001
- Author:
- jhyde
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.olap.OlapElement
OlapElement.LocalizedProperty
-
-
Field Summary
Fields Modifier and Type Field Description static int
CATALOG_NAME
constraints indexes for adSchemaMembers http://msdn.microsoft.com/library/psdk/dasdk/mdx8h4k.htm check "Restrictions in the MEMBER Rowset" under MEMBER Rowset sectionstatic int
CUBE_NAME
static int
DIMENSION_UNIQUE_NAME
protected Dimension[]
dimensions
static int
HIERARCHY_UNIQUE_NAME
static int
LEVEL_NUMBER
static int
LEVEL_UNIQUE_NAME
static int
maxNofConstraintsForAdSchemaMember
static int
MDPROP_USERDEFINED0
static int
MDTREEOP_CHILDREN
static int
MDTREEOP_SELF
static int
MEMBER_CAPTION
static int
MEMBER_NAME
static int
MEMBER_TYPE
static int
MEMBER_UNIQUE_NAME
protected String
name
static int
SCHEMA_NAME
static int
Tree_Operator
-
Fields inherited from class mondrian.olap.OlapElementBase
caption, visible
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
Dimension
getDimension()
Returns the dimension of a this expression, or null if no dimension is defined.Dimension[]
getDimensions()
Returns the dimensions of this cube.Hierarchy
getHierarchy()
Level
getMonthLevel()
Return Month Level or null.String
getName()
String
getQualifiedName()
Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".Level
getQuarterLevel()
Return Quarter Level or null.String
getUniqueName()
Level
getWeekLevel()
Return Week Level or null.Level
getYearLevel()
Helper method that returns the Year Level or returns null if the Time Dimension does not exist or if Year is not defined in the Time Dimension.OlapElement
lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
Looks up a child element, returning null if it does not exist.Dimension
lookupDimension(Id.Segment s)
Looks up a dimension in this cube based on a component of its name.Hierarchy
lookupHierarchy(Id.NameSegment s, boolean unique)
Finds a hierarchy whose name (or unique name, ifunique
is true) equalss
.-
Methods inherited from class mondrian.olap.OlapElementBase
clone, computeHashCode, equals, equals, getCaption, getLocalized, getLogger, hashCode, isVisible, setCaption, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface mondrian.olap.Annotated
getAnnotationMap
-
Methods inherited from interface mondrian.olap.Cube
createCalculatedMember, getMembersForQuery, getNamedSets, getSchema, getSchemaReader, nonJoiningDimensions, nonJoiningDimensions
-
Methods inherited from interface mondrian.olap.OlapElement
getCaption, getLocalized, isVisible
-
-
-
-
Field Detail
-
CATALOG_NAME
public static final int CATALOG_NAME
constraints indexes for adSchemaMembers http://msdn.microsoft.com/library/psdk/dasdk/mdx8h4k.htm check "Restrictions in the MEMBER Rowset" under MEMBER Rowset section- See Also:
- Constant Field Values
-
SCHEMA_NAME
public static final int SCHEMA_NAME
- See Also:
- Constant Field Values
-
CUBE_NAME
public static final int CUBE_NAME
- See Also:
- Constant Field Values
-
DIMENSION_UNIQUE_NAME
public static final int DIMENSION_UNIQUE_NAME
- See Also:
- Constant Field Values
-
HIERARCHY_UNIQUE_NAME
public static final int HIERARCHY_UNIQUE_NAME
- See Also:
- Constant Field Values
-
LEVEL_UNIQUE_NAME
public static final int LEVEL_UNIQUE_NAME
- See Also:
- Constant Field Values
-
LEVEL_NUMBER
public static final int LEVEL_NUMBER
- See Also:
- Constant Field Values
-
MEMBER_NAME
public static final int MEMBER_NAME
- See Also:
- Constant Field Values
-
MEMBER_UNIQUE_NAME
public static final int MEMBER_UNIQUE_NAME
- See Also:
- Constant Field Values
-
MEMBER_CAPTION
public static final int MEMBER_CAPTION
- See Also:
- Constant Field Values
-
MEMBER_TYPE
public static final int MEMBER_TYPE
- See Also:
- Constant Field Values
-
Tree_Operator
public static final int Tree_Operator
- See Also:
- Constant Field Values
-
maxNofConstraintsForAdSchemaMember
public static final int maxNofConstraintsForAdSchemaMember
- See Also:
- Constant Field Values
-
MDTREEOP_SELF
public static final int MDTREEOP_SELF
- See Also:
- Constant Field Values
-
MDTREEOP_CHILDREN
public static final int MDTREEOP_CHILDREN
- See Also:
- Constant Field Values
-
MDPROP_USERDEFINED0
public static final int MDPROP_USERDEFINED0
- See Also:
- Constant Field Values
-
name
protected final String name
-
dimensions
protected Dimension[] dimensions
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceCube
- Specified by:
getName
in interfaceOlapElement
-
getUniqueName
public String getUniqueName()
- Specified by:
getUniqueName
in interfaceOlapElement
-
getQualifiedName
public String getQualifiedName()
Description copied from interface:OlapElement
Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".- Specified by:
getQualifiedName
in interfaceOlapElement
-
getDimension
public Dimension getDimension()
Description copied from interface:OlapElement
Returns the dimension of a this expression, or null if no dimension is defined. Applicable only to set expressions.Example 1:
has dimension[Sales].children
[Sales]
.Example 2:
has dimension [Promotion Media].order(except([Promotion Media].[Media Type].members, {[Promotion Media].[Media Type].[No Media]}), [Measures].[Unit Sales], DESC)
Example 3:
has no dimension (well, actually it is [Product] x [Gender], but we can't represent that, so we return null);CrossJoin([Product].[Product Department].members, [Gender].members)
- Specified by:
getDimension
in interfaceOlapElement
-
getHierarchy
public Hierarchy getHierarchy()
- Specified by:
getHierarchy
in interfaceOlapElement
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceOlapElement
-
getDimensions
public Dimension[] getDimensions()
Description copied from interface:Cube
Returns the dimensions of this cube.- Specified by:
getDimensions
in interfaceCube
-
lookupHierarchy
public Hierarchy lookupHierarchy(Id.NameSegment s, boolean unique)
Description copied from interface:Cube
Finds a hierarchy whose name (or unique name, ifunique
is true) equalss
.- Specified by:
lookupHierarchy
in interfaceCube
-
lookupChild
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
Description copied from interface:OlapElement
Looks up a child element, returning null if it does not exist.- Specified by:
lookupChild
in interfaceOlapElement
-
lookupDimension
public Dimension lookupDimension(Id.Segment s)
Looks up a dimension in this cube based on a component of its name.- Parameters:
s
- Name segment- Returns:
- Dimension, or null if not found
-
getYearLevel
public Level getYearLevel()
Description copied from interface:Cube
Helper method that returns the Year Level or returns null if the Time Dimension does not exist or if Year is not defined in the Time Dimension.- Specified by:
getYearLevel
in interfaceCube
- Returns:
- Level or null.
-
getQuarterLevel
public Level getQuarterLevel()
Description copied from interface:Cube
Return Quarter Level or null.- Specified by:
getQuarterLevel
in interfaceCube
- Returns:
- Quarter Level or null.
-
getMonthLevel
public Level getMonthLevel()
Description copied from interface:Cube
Return Month Level or null.- Specified by:
getMonthLevel
in interfaceCube
- Returns:
- Month Level or null.
-
getWeekLevel
public Level getWeekLevel()
Description copied from interface:Cube
Return Week Level or null.- Specified by:
getWeekLevel
in interfaceCube
- Returns:
- Week Level or null.
-
-