Package mondrian.olap

Class SetBase

All Implemented Interfaces:
Annotated, NamedSet, OlapElement

public class SetBase extends OlapElementBase implements NamedSet
Skeleton implementation of NamedSet interface.
Since:
6 August, 2001
Author:
jhyde
  • Method Details

    • getAnnotationMap

      public Map<String,Annotation> getAnnotationMap()
      Description copied from interface: Annotated
      Returns a list of annotations.

      The map may be empty, never null.

      Specified by:
      getAnnotationMap in interface Annotated
      Returns:
      Map from annotation name to annotations.
    • getNameUniqueWithinQuery

      public String getNameUniqueWithinQuery()
      Description copied from interface: NamedSet
      Returns 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:
      getNameUniqueWithinQuery in interface NamedSet
    • isDynamic

      public boolean isDynamic()
      Description copied from interface: NamedSet
      Returns 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.
      Specified by:
      isDynamic in interface NamedSet
      Returns:
      Whether this named set is dynamic
    • clone

      public Object clone()
      Overrides:
      clone in class OlapElementBase
    • getLogger

      protected org.apache.logging.log4j.Logger getLogger()
      Specified by:
      getLogger in class OlapElementBase
    • getUniqueName

      public String getUniqueName()
      Specified by:
      getUniqueName in interface OlapElement
    • getName

      public String getName()
      Specified by:
      getName in interface OlapElement
    • 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 interface OlapElement
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface OlapElement
    • getDisplayFolder

      public String getDisplayFolder()
    • getHierarchies

      public List<Hierarchy> getHierarchies()
    • getHierarchy

      public Hierarchy getHierarchy()
      Specified by:
      getHierarchy in interface OlapElement
    • 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:

       [Sales].children
       
      has dimension [Sales].

      Example 2:

       order(except([Promotion Media].[Media Type].members,
                    {[Promotion Media].[Media Type].[No Media]}),
             [Measures].[Unit Sales], DESC)
       
      has dimension [Promotion Media].

      Example 3:

       CrossJoin([Product].[Product Department].members,
                 [Gender].members)
       
      has no dimension (well, actually it is [Product] x [Gender], but we can't represent that, so we return null);

      Specified by:
      getDimension in interface OlapElement
    • 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 interface OlapElement
    • setName

      public void setName(String name)
      Description copied from interface: NamedSet
      Sets the name of this named set.
      Specified by:
      setName in interface NamedSet
    • setDescription

      public void setDescription(String description)
    • setDisplayFolder

      public void setDisplayFolder(String displayFolder)
    • setAnnotationMap

      public void setAnnotationMap(Map<String,Annotation> annotationMap)
    • getExp

      public Exp getExp()
      Description copied from interface: NamedSet
      Returns the expression used to derive this named set.
      Specified by:
      getExp in interface NamedSet
    • validate

      public NamedSet validate(Validator validator)
      Specified by:
      validate in interface NamedSet
    • getType

      public Type getType()
      Description copied from interface: NamedSet
      Returns the type of this named set.
      Specified by:
      getType in interface NamedSet