Skip to main content

%DeepSee.Query.member

Class %DeepSee.Query.member Extends %RegisteredObject [ Abstract, System = 3 ]

This class (or its subclass) is used by the DeepSee Query Engine to process members within a DeepSee query.
A member object is not a node within an MDX query graph.
Certain nodes (namely the memberSpec node) will create an instance of member object (based on the type of member) and delegate to it certain member-related tasks. This is how the difference between time and data dimensions is implemented.
This is an abstract class, the actual work is done by subclasses.

Properties

%cube

Property %cube As %DeepSee.Datatype.string;

Name of the cube this member belongs to.

%tuple

Property %tuple As %DeepSee.Query.tuple;

The tuple object that owns this member.

%memberSpec

Property %memberSpec As %List [ MultiDimensional ];

Array of known value/id/key triplets for each level.

%dimNumber

Property %dimNumber As %Integer;

Dimension # referred to by the tuple.

%hierNumber

Property %hierNumber As %Integer;

Hierarchy # referred to by the tuple.

%levelNumber

Property %levelNumber As %Integer;

Level # referred to by the tuple.

%allName

Property %allName As %DeepSee.Datatype.string;

Name for the all level for this member.

%name

Property %name As %DeepSee.Datatype.string;

Member name or value referred to by the tuple.

%memberId

Property %memberId As %DeepSee.Datatype.string;

Member id value (optional).

%memberKey

Property %memberKey As %DeepSee.Datatype.string;

Member key value (optional).

%type

Property %type As %DeepSee.Datatype.string;

Member type.
This indicates the context specified by the tuple expression.
The value can be one of the dst macros ($$$dstSet etc.).
This is used to determine which function can be applied to this tuple.

%aggregate

Property %aggregate As %DeepSee.Datatype.string;

Aggregate to apply to this measure (if applicable).

Methods

%CreateMember

ClassMethod %CreateMember(pClassName As %String, Output tSC As %Status, pCube As %String, pTuple As %DeepSee.Query.tuple, pDimNo As %Integer, pHierNo As %Integer, pAllName As %String = "") As %DeepSee.Query.member [ Final, Internal ]

Create an instance of %DeepSee.Query.member.

%SetLevelNo

Method %SetLevelNo(pLevelNo As %Integer) [ Final, Internal ]

Set the current level number context for this member.

%GetType

Method %GetType() As %String [ Final, Internal ]

Return the type of this member.

%ApplyState

Method %ApplyState(pType As %String) As %Status

Set the state of this member using the current meta data node.

%GetNodeInfo

ClassMethod %GetNodeInfo(pCubeName As %String, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer, Output pFact As %String, Output pStarClass As %String, Output pStarField As %String, Output pStarSort As %String, Output pRollup As %String, Output pSortDir As %String, Output pFormat As %String, Output pMemberList As %String, Output pStarKeyField As %String) As %Boolean [ Final, Internal ]

Helper method: Get information about the given level from the cube meta data.
As a side effect, set the dependency variable, %dsDepends.

%GetAllName

ClassMethod %GetAllName(pCubeName As %String, pDimNo As %Integer, Output pCaption As %String) As %String [ Final, Internal ]

Helper method: Get the ALL level name for dimension, if present. Also return the localized caption via pCaption.

%GetNullName

ClassMethod %GetNullName(pCubeName As %String, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer, Output pCaption As %String) As %String [ Final, Internal ]

Helper method: Get the Null Replacement value for the given level. Also return the localized caption via pCaption.

%GetTimeOffset

ClassMethod %GetTimeOffset(pCubeName As %String, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer, Output pFormat As %String) As %String [ Final, Internal ]

Helper method: Get the time offset and format values for the given level.

%ProcessMembers

Method %ProcessMembers(pParent As %Integer, Output pSet As %List) As %Status [ Internal ]

Process the member id, name, and key information for this member. Put the result into pSet.

%FindMemberByName

Method %FindMemberByName(pName As %String, pDim As %Integer, pHier As %Integer, Output pFlag As %Boolean, pLevel As %Integer = "", Output pMemberKey As %String) As %Status [ Internal ]

See if there is a member with the given name within the specified dimension,hierarchy, and/or level.
If pLevel is supplied, only look in that level.
Set pFlag true if a member is found.
On return, fills in memberSpec
memberSpec(level) = $LB(name,key)

memberSpec(0) = $LB("All Time")
memberSpec(1) = $LB(2006,2006)
memberSpec(2) = $LB("Quarter 1", "Q1 2006")
memberSpec(3) = $LB("January","Jan 2006")

%FindMemberByKey

Method %FindMemberByKey(pKey As %String, pDim As %Integer, pHier As %Integer, Output pFlag As %Boolean, Output pMemberValue As %String, pRecurse As %Boolean = 1) As %Status [ Internal ]

Find the member with the given key within the given hierarchy. If pRecurse is true, look at the current level and continue through higher levels until a match is found.

%GetMembers

ClassMethod %GetMembers(pCubeName As %String, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer, pRollupKey As %String, pParent As %Integer, pKey As %String, ByRef pNodeNo As %Integer, pRecurse As %Integer = 0, ByRef pRange As %String, ByRef pMemberList) As %Status

Get members and place them into the axis tree.
pRecurse, if 1, indicates that this function is to be called recursively to build a tree of members. If -1, include the All level (if present) and the top level (used by %TOPMEMBERS). pRange, if defined, is an array contains a starting and ending key value.
pMemberList, if defined, is an INLIST used for certain optimized member operations.

%GetRelatedMember

ClassMethod %GetRelatedMember(pCubeName As %String, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer, pRollupKey As %String, pParent As %Integer, Output pSet As %List, pKey As %String, pRelation As %String, pOffset As %Integer = 0, pValue As %String = "", pAllowMissing As %Integer = 0) As %Status [ Internal ]

Get one member and place it into pSet.
pKey, is the key for the base member to return. pRelation indicates how this member is related to the base member. "same","lead", "lag", etc.
pOffset, is an optional offset to apply to the relation.

%GetParentMember

ClassMethod %GetParentMember(pCubeName As %String, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer, pParent As %Integer, Output pSet As %List, pKey As %String) As %Status [ Internal ]

Get the parent of the current member and place it into pSet.

%GetNthChild

ClassMethod %GetNthChild(pCubeName As %String, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer, pParent As %Integer, Output pSet As %List, pKey As %String, pNumber As %Integer) As %Status [ Internal ]

Get the nth child of the current member and place it into pSet.
If pNumber is 1 return the first child; 2 for the second, etc.
If pNumber is -1 return the last child; -2 for the second from end, etc.

%GetPropertyValue

ClassMethod %GetPropertyValue(pCubeName As %String, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer, pProperty As %String, pParent As %Integer, Output pSet As %List, pKey As %String) As %Status [ Internal ]

Lookup the value of the given dimension property.

%GetRollupKey

Method %GetRollupKey(pLevelNo As %Integer, pKey As %String, Output pRollupKey As %String) As %Status [ Final, Internal ]

Find the rollup key for the specified level.

%GetMemberOffset

Method %GetMemberOffset(Output pOffset As %Integer, pKey As %String, Output pParentKey As %String) As %Status [ Internal ]

Return the ordinal position of this member within its parent group. For convenience, also return the parent key for this member.

%HasFeature

ClassMethod %HasFeature(pCubeName As %String, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer, pFeature As %String) As %Boolean

Test if this member supports the given feature. For example, "NOW".

%SupportsFunction

Method %SupportsFunction(pFunction As %String, Output pMessage As %String) As %Boolean

Test if this member supports the given function.