Package mondrian.olap
Class SetBase
- java.lang.Object
-
- mondrian.olap.OlapElementBase
-
- mondrian.olap.SetBase
-
- All Implemented Interfaces:
Annotated,NamedSet,OlapElement
public class SetBase extends OlapElementBase implements NamedSet
Skeleton implementation ofNamedSetinterface.- Since:
- 6 August, 2001
- Author:
- jhyde
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.olap.OlapElement
OlapElement.LocalizedProperty
-
-
Field Summary
-
Fields inherited from class mondrian.olap.OlapElementBase
caption, visible
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()Map<String,Annotation>getAnnotationMap()Returns a list of annotations.StringgetDescription()DimensiongetDimension()Returns the dimension of a this expression, or null if no dimension is defined.ExpgetExp()Returns the expression used to derive this named set.HierarchygetHierarchy()protected org.apache.logging.log4j.LoggergetLogger()StringgetName()StringgetNameUniqueWithinQuery()Returns a name for this set that is unique within the query.StringgetQualifiedName()Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".TypegetType()Returns the type of this named set.StringgetUniqueName()booleanisDynamic()Returns whether this named set is dynamic.OlapElementlookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)Looks up a child element, returning null if it does not exist.voidsetAnnotationMap(Map<String,Annotation> annotationMap)voidsetDescription(String description)voidsetName(String name)Sets the name of this named set.NamedSetvalidate(Validator validator)-
Methods inherited from class mondrian.olap.OlapElementBase
computeHashCode, equals, equals, getCaption, getLocalized, hashCode, isVisible, setCaption, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface mondrian.olap.OlapElement
getCaption, getLocalized, isVisible
-
-
-
-
Method Detail
-
getAnnotationMap
public Map<String,Annotation> getAnnotationMap()
Description copied from interface:AnnotatedReturns a list of annotations.The map may be empty, never null.
- Specified by:
getAnnotationMapin interfaceAnnotated- Returns:
- Map from annotation name to annotations.
-
getNameUniqueWithinQuery
public String getNameUniqueWithinQuery()
Description copied from interface:NamedSetReturns a name for this set that is unique within the query.This is necessary when there are several 'AS' expressions, or an 'AS' expression overrides a named set defined using 'WITH MEMBER' clause or against a cube.
- Specified by:
getNameUniqueWithinQueryin interfaceNamedSet
-
isDynamic
public boolean isDynamic()
Description copied from interface:NamedSetReturns whether this named set is dynamic.Evaluation rules:
- A dynamic set is evaluated each time it is used, and inherits the context in which it is evaluated.
- A static set is evaluated only on first use, in the base context of the cube.
-
clone
public Object clone()
- Overrides:
clonein classOlapElementBase
-
getLogger
protected org.apache.logging.log4j.Logger getLogger()
- Specified by:
getLoggerin classOlapElementBase
-
getUniqueName
public String getUniqueName()
- Specified by:
getUniqueNamein interfaceOlapElement
-
getName
public String getName()
- Specified by:
getNamein interfaceOlapElement
-
getQualifiedName
public String getQualifiedName()
Description copied from interface:OlapElementReturns the name of this element qualified by its class, for example "hierarchy 'Customers'".- Specified by:
getQualifiedNamein interfaceOlapElement
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceOlapElement
-
getHierarchy
public Hierarchy getHierarchy()
- Specified by:
getHierarchyin interfaceOlapElement
-
getDimension
public Dimension getDimension()
Description copied from interface:OlapElementReturns 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:
getDimensionin interfaceOlapElement
-
lookupChild
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
Description copied from interface:OlapElementLooks up a child element, returning null if it does not exist.- Specified by:
lookupChildin interfaceOlapElement
-
setName
public void setName(String name)
Description copied from interface:NamedSetSets the name of this named set.
-
setDescription
public void setDescription(String description)
-
setAnnotationMap
public void setAnnotationMap(Map<String,Annotation> annotationMap)
-
getExp
public Exp getExp()
Description copied from interface:NamedSetReturns the expression used to derive this named set.
-
-