Package mondrian.olap
Class Query.ScopedNamedSet
- java.lang.Object
-
- mondrian.olap.Query.ScopedNamedSet
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.olap.OlapElement
OlapElement.LocalizedProperty
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceOlapElement
-
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 interfaceNamedSet
-
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.
-
getExp
public Exp getExp()
Description copied from interface:NamedSet
Returns the expression used to derive this named set.
-
setExp
public void setExp(Exp expr)
-
setName
public void setName(String newName)
Description copied from interface:NamedSet
Sets the name of this named set.
-
getType
public Type getType()
Description copied from interface:NamedSet
Returns the type of this named set.
-
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 interfaceAnnotated
- Returns:
- Map from annotation name to annotations.
-
getUniqueName
public String getUniqueName()
- Specified by:
getUniqueName
in interfaceOlapElement
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceOlapElement
-
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
-
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
-
getCaption
public String getCaption()
- Specified by:
getCaption
in interfaceOlapElement
-
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 interfaceOlapElement
- Returns:
- Whether this element is visible
-
getHierarchy
public Hierarchy getHierarchy()
- Specified by:
getHierarchy
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
-
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 interfaceOlapElement
locale
- Locale- Returns:
- Localized caption or description
-
-