class %DeepSee.ComputedDimension.Base
extends %RegisteredObject
This is the base class for DeepSee computed dimension classes.
A computed dimension class defines the behavior for a level within a hierarchy within
a DeepSee computed dimension.
parameter DIMTYPE = "text";
Type reported back to the UI. This determines what type of control to display
for filters based on this class.
property %baseCube
as %DeepSee.Datatype.string;
Name of the base cube the computed level belongs to, if ..%cube is a subject area.
Otherwise, this property is set to the same value as ..%cube.
property %cube
as %DeepSee.Datatype.string;
Name of the cube the computed level belongs to.
property %dimNumber
as %Integer;
Dimension # of the computed level.
property %factName
as %String;
Fact Name associated with the computed level.
This is the name of the fact that contains the default search data.
property %factNumber
as %Integer;
Fact # of the computed level.
property %hierNumber
as %Integer;
Hierarchy # of the computed level.
property %levelNumber
as %Integer;
Level # of the computed level.
final method %ComputeBitset(pSpec As %String, Output pIndexKey As %String)
as %Status
Build the bitset that corresponds to the given computed dimension "spec".
method %ComputeIndexKey(pMemberKey As %String)
as %String
Compute a hash key for a given member member.
classmethod %Count(pCube As %String, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer)
as %Integer
Return number of members.
classmethod %Create(pCube As %String, pFactNo As %Integer, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer)
as %DeepSee.ComputedDimension.Base
Create a instance of this dimension class.
method %CreateIndexFromSQL(pSQL As %String, pIndexKey As %String)
as %Status
Utility method.
Prepare and execute the given SQL statement and build an index from it.
classmethod %Eval(pExpr As %String, Output pErrorMsg As %String)
as %String
Evaluate the given ObjectScript expression.
final method %GetComputedMembers(ByRef pMemberList, pRollupKey As %String = "", ByRef pRange As %String = "")
as %Status
Find the set of members for this computed dimension object.
pMemberList may contain a set of members defined in the cube model:
pMemberList(n) = $LB(id,name,key)
If so, use this list, otherwise compute one.
pRollupKey and pRange can be used to filter the computed
members returned, if applicable for this computed dimension.
classmethod %GetDimType()
as %String
Return the type of this class (used by UI components).
method %GetFactTable()
as %String
Return the (SQL) name of the fact table for the current cube.
method %MemberSearch(pSearchKey As %String, Output pList As %List)
as %Status
Execute a search for members.
Return a list of the form:
pList(n) = $LB(value,key)
method %OnComputeBitset(pSpec As %String, pIndexKey As %String)
as %Status
Do the actual work of building the bitset.
Implemented in subclasses.
method %OnGetComputedMembers(ByRef pMemberList)
as %Status
Find the set of members for this computed dimension object.
pMemberList(n) = $LB(id,name,key)
This can be implemented by subclasses.
This method is deprecated, implement %OnGetComputedMembersFiltered
instead.
method %OnGetComputedMembersFiltered(ByRef pMemberList, pRollupKey As %String = "", ByRef pRange As %String = "")
as %Status
Find the set of members for this computed dimension object satisfying
pRollupKey and pRange (if applicable for this implementation).
pMemberList(n) = $LB(id,name,key)
This can be implemented by subclasses.
method %ProcessSQL(pSQL As %String, ByRef pSubstList, Output pFirstToken As %String, Output pErrorMsg As %String)
as %String
Apply substitutions to an SQL query string used within a computed dimension expression.
pSubstList is an array of $$$ substitution values, e.g.:
pSubstList("TABLE") = table name
pSubstList("FACT") = fact name
{} can be used to enclose an ObjectScript expression that is evaluated and whose
results become part of the SQL text of the query.
[dim].[mbr] can be used to refer to a specific cube element (such as a measure). This is replaced
with the fact name that corresponds to the element.
method %ResolveKey(pSpec As %String, Output pRKey As %String)
as %Status
Resolve any special tokens or expression in a key value and return the result.