mondrian.olap
Class Query.ScopedNamedSet

java.lang.Object
  extended by mondrian.olap.Query.ScopedNamedSet
All Implemented Interfaces:
Annotated, NamedSet, OlapElement
Enclosing class:
Query

public static class Query.ScopedNamedSet
extends Object
implements NamedSet


Nested Class Summary
 
Nested classes/interfaces inherited from interface mondrian.olap.OlapElement
OlapElement.LocalizedProperty
 
Method Summary
 Map<String,Annotation> getAnnotationMap()
          Returns a list of annotations.
 String getCaption()
           
 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()
           
 String getLocalized(OlapElement.LocalizedProperty prop, Locale locale)
          Returns the value of a property (caption or description) of this element in the given locale.
 String getName()
           
 String getNameUniqueWithinQuery()
          Returns a name for this set that is unique within the query.
 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()
           
 boolean isDynamic()
          Returns whether this named set is dynamic.
 boolean isVisible()
          Returns whether this element is visible to end-users.
 OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
          Looks up a child element, returning null if it does not exist.
 void setExp(Exp expr)
           
 void setName(String newName)
          Sets the name of this named set.
 NamedSet validate(Validator validator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

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

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:

Specified by:
isDynamic in interface NamedSet
Returns:
Whether this named set is dynamic

getExp

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

Specified by:
getExp in interface NamedSet

setExp

public void setExp(Exp expr)

setName

public void setName(String newName)
Description copied from interface: NamedSet
Sets the name of this named set.

Specified by:
setName 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

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.

validate

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

getUniqueName

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

getDescription

public String getDescription()
Specified by:
getDescription 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

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

getCaption

public String getCaption()
Specified by:
getCaption in interface OlapElement

isVisible

public boolean isVisible()
Description copied from interface: OlapElement
Returns whether this element is visible to end-users.

Visibility is a hint for client applications. An element's visibility does not affect how it is treated when MDX queries are evaluated.

Specified by:
isVisible in interface OlapElement
Returns:
Whether this element is visible

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

getLocalized

public String getLocalized(OlapElement.LocalizedProperty prop,
                           Locale locale)
Description copied from interface: OlapElement
Returns the value of a property (caption or description) of this element in the given locale.

Specified by:
getLocalized in interface OlapElement
locale - Locale
Returns:
Localized caption or description

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads