Skip to main content

%DeepSee.Time.AbstractLevel

abstract class %DeepSee.Time.AbstractLevel extends %Library.RegisteredObject

This is the base class for the family of DeepSee time hierarchy level classes.
A time hierarchy class defines the behavior for a level within a hierarchy within a DeepSee dimension.
The class (non-package) part of a level class *must* be unique. You will get an error when you attempt to compile a cube definition is this is not the case.

Method Inventory

Parameters

parameter CALENDAR = gregorian;
parameter DIMTYPE;
Type reported back to the UI. This determines what type of control to display for filters based on this class.
parameter DOMAIN = %DeepSee;
parameter OPTIONLIST;
This is a comma-delimited list of user-settable options for this time function.
Options can be defined within a DeepSee cube definition.

Methods

classmethod %BaseRangeToKey(Output pKey As %String, pStart As %Date, pEnd As %Date, pOffset As %String = "") as %Status
Given a pair of base values (in $H format) find a key value that lies within the range.
classmethod %Convert(pTime As %DeepSee.Datatype.dateTime, pOffset As %String = "") as %Integer
Convert a $H value to the logical value used for this level. This is used within the computed field logic for properties within a fact table based on this level.
. This is implemented by subclasses.
A subclass may extend this function and add additional arguments that correspond to user-settable options. Option values will be supplied when DeepSee invokes this method.
pTimeOffset is a time offset (interval) applied to the value.
classmethod %Count(pCube As %String, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer) as %Integer
Return the total number of members within this level.
classmethod %FormatToZDTCode(pFormat As %String, pDefault As %Integer) as %Integer
Utility method: Convert a time format string to a $ZDT format number. [Previously private]
classmethod %GetAllMembers(Output pList As %List, pCube As %String, pFact As %String, pStartRange As %Date, pEndRange As %Date, pFormat As %String = "") as %Status
Pull out all members of this level from the Fact table index.
classmethod %GetCalendar() as %String
Return the calendar that this class uses to calculate the members of the level
classmethod %GetDimType() as %String
Return the type of this level class (used by UI components).
classmethod %GetLevelMembers(Output pList As %List, pCube As %String, pFact As %String, pStartRange As %Date, pEndRange As %Date, pTimeOffset As %String = "", pFormat As %String = "") as %Status
Return an array of members of this level.
classmethod %GetName() as %String
Return the user-visible name of this level.
final classmethod %GetNthKey(Output pKey As %String, pCube As %String, pFact As %String, pRelation As %String, pOffset As %Integer = 0) as %Status
Pull out the Nth (non-null) member (key) of this level from the Fact table index where N is pIndex. pRelation is "first" or "last" If pOffset offset from the start or end.
final classmethod %GetOptionList(Output pList As %String)
Return set of possible options for this function. This is return as an array subscripted by option name.
classmethod %GetPeriodLength() as %Integer
Return the number of seconds in one unit of this time level.
classmethod %GetRelatedKey(Output pRelatedKey As %String, pCube As %String, pFact As %String, pKey As %String, pRelation As %String, pOffset As %Integer = "", pEndKey As %String = "", pTimeOffset As %String = "") as %Status
Return, via pRelatedKey a key within this level related to pKey.
pRelation describes the relation: "lead","lag","first","last"
"lead" and "lag" are relative to pKey
"first" and "last" are relative to the first and last members of the level.
pEndKey is the end of the time period implied by the parent level (if applicable). This is used by "first" and "last".
pOffset is an optional offset to apply (in the direction of the relation).
Note: pKey and pEndKey are key values and not $H values.
classmethod %IsIndependent() as %Boolean
Return true if this time level is independent of the actual date. For example a Month Number is independent of the actual month while a YearMonth is not.
classmethod %KeyToBaseRange(pKey As %String, Output pStart As %Date, Output pEnd As %Date, pOffset As %String = "") as %Status
Convert a level key value into starting and ending base values (in $H format).
classmethod %KeyToValue(pKey As %Integer, pFormat As %String = "", pOffset As %String = "") as %String
Convert a level key (logical) value to a display value. pKey is the logical value (the format is up to the implementer of the class, but it must match that returned by the %Convert() method.)
Format is an optional format value. This is specified by the Format option when this level is specified within a cube definition. The possible Format values are determined by the class implementor.
classmethod %SupportsNOW() as %Boolean
Return true if this level supports a NOW member.
classmethod %ValueToKey(pValue As %String, pFormat As %String = "", pOffset As %String = "") as %Integer
Convert a level display value to its corresponding key value. The format of the logical and display values are up to the class implementor.
Format is an optional format value. This is specified by the Format option when this level is specified within a cube definition.
The possible Format values are determined by the class implementor.
Return "" if there is no corresponding key.

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab