mondrian.olap
Class SetBase

java.lang.Object
  extended by mondrian.olap.OlapElementBase
      extended by mondrian.olap.SetBase
All Implemented Interfaces:
NamedSet, OlapElement

 class SetBase
extends OlapElementBase
implements NamedSet

Skeleton implementation of NamedSet interface.

Since:
6 August, 2001
Author:
jhyde
 

Field Summary
 
Fields inherited from class mondrian.olap.OlapElementBase
caption
 
Constructor Summary
SetBase(String name, Exp exp)
           
 
Method Summary
 Object clone()
           
 String getDescription()
           
 Dimension getDimension()
          Returns the dimension of a this expression, or null if no dimension is defined.
 Exp getExp()
          Returns the expression used to derive this named set.
 Hierarchy getHierarchy()
           
protected  org.apache.log4j.Logger getLogger()
           
 String getName()
           
 String getQualifiedName()
          Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".
 Type getType()
          Returns the type of this named set.
 String getUniqueName()
           
 OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s)
          Looks up a child element, returning null if it does not exist.
 OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
           
 void setName(String name)
          Sets the name of this named set.
 NamedSet validate(Validator validator)
           
 
Methods inherited from class mondrian.olap.OlapElementBase
computeHashCode, equals, equals, getCaption, hashCode, setCaption, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface mondrian.olap.OlapElement
getCaption
 

Constructor Detail

SetBase

SetBase(String name,
        Exp exp)
Method Detail

clone

public Object clone()
Overrides:
clone in class OlapElementBase

getLogger

protected org.apache.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

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)
Description copied from interface: OlapElement
Looks up a child element, returning null if it does not exist.

Specified by:
lookupChild in interface OlapElement

lookupChild

public OlapElement lookupChild(SchemaReader schemaReader,
                               Id.Segment s,
                               MatchType matchType)
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

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

SourceForge.net_Logo