Skip to main content

%DeepSee.CubeVersion.Utils

Class %DeepSee.CubeVersion.Utils Extends %RegisteredObject

Utility container for the management of cube versions

Parameters

DEPRECATED

Parameter DEPRECATED = "deprecated";

ACTIVE

Parameter ACTIVE = "active";

PENDING

Parameter PENDING = "pending";

Methods

%GetVersionedCubeName

ClassMethod %GetVersionedCubeName(pCubeGenericName As %String = "", pVersion As %Integer = "", pSC As %Status) As %String

If a cube has different versions, get the name of the version currently active given the reference name pCubeGenericName. If a cube does not use cube versioning this will return the upper-case cube index.

%GetGenericCubeName

ClassMethod %GetGenericCubeName(pCubeVersionName As %String = "", pSC As %Status) As %String

If a cube has different versions, get the reference name given a version name pCubeName. If the cube was not produced using cube versioning this will return the upper-case cube index.

%ActivatePendingCubeVersion

ClassMethod %ActivatePendingCubeVersion(pCubeGenericName As %String, pRemoveDeprecated As %Boolean = 1, pVerbose As %Boolean = 1) As %Status

%DeprecateCubeVersion

ClassMethod %DeprecateCubeVersion(pCubeGenericName As %String = "", pVersion As %Integer) As %Status

Mark a cube version as deprecated. Once deprecated, a version is ready for removal.

%RemoveCubeVersion

ClassMethod %RemoveCubeVersion(pCubeGenericName As %String = "", pVersion As %Integer) As %Status

Completely remove all components of a cube version from the system. This cannot be performed on a cube version marked "active".

%GetActiveCubeVersion

ClassMethod %GetActiveCubeVersion(pCubeGenericName As %String) As %Integer

Return the active version number for pCubeGenericName

%GetPendingCubeVersion

ClassMethod %GetPendingCubeVersion(pCubeGenericName As %String = "") As %String

Return the pending version number for pCubeGenericName. An empty string indicates there is no pending version.

%GetDeprecatedVersionList

ClassMethod %GetDeprecatedVersionList(pCubeGenericName As %String = "", ByRef pList) As %Status

Given the generic name of a versioned cube, collect the list of deprecated versions currently on the system.

%GetCubeVersionStatus

ClassMethod %GetCubeVersionStatus(pCubeGenericName As %String, pVersion As %Integer) As %String

Return the current promotion status of version pVersion the cube pCubeGenericName.

%IsVersion

ClassMethod %IsVersion(pCubeName As %String, Output pCubeGenericName, Output pVersion) As %Boolean

It is valid to manually write a cube logical name that can look like a version when it is not. Verify the cube name entered in pCubeName is a true version of a generic cube definition. Optionally return the decomposition of the original cube name into its genericName and version parts. If a non-versioned cube is entered as pCubeName, then:
pCubeGenericName = pCubeName pVersion = ""

%IsActiveVersion

ClassMethod %IsActiveVersion(pCubeVersionName As %String) As %Boolean

Test whether the current cube pCubeVersionName is the active version.

%IsPendingVersion

ClassMethod %IsPendingVersion(pCubeVersionName As %String) As %Boolean

Test whether the current cube pCubeVersionName is the pending version.

%IsDeprecatedVersion

ClassMethod %IsDeprecatedVersion(pCubeVersionName As %String) As %Boolean

Test whether the current cube pCubeVersionName is deprecated.

%SetActiveCubeVersion

ClassMethod %SetActiveCubeVersion(pCubeGenericName As %String, pVersion As %Integer) As %Status [ Internal ]

Performs the actual work of marking a specific version as the active version that will be used when the generic name pCubeGenericName is used. This will remove the "active" flag from any other version of pCubeGenericName.

%SetPendingCubeVersion

ClassMethod %SetPendingCubeVersion(pCubeGenericName As %String, pVersion As %Integer) As %Status [ Internal ]

Performs the actual work of marking a specific version as the pending version for the cube pCubeGenericName. This will remove the "pending" flag from any other version of pCubeGenericName.

%SetCubeVersionStatus

ClassMethod %SetCubeVersionStatus(pCubeGenericName As %String, pVersion As %Integer, pNewCubeStatus As %String) As %Status [ Internal ]

Performs the actual work of storing the current promotion status of version pVersion for the cube pCubeGenericName. This will only accept valid status strings: "active","pending","deprecated".

%KillTasksForCube

ClassMethod %KillTasksForCube(pCubeName As %String) [ Internal ]

Kill all active tasks for a cube. This is used just before activating a pending cube to clear any queries that are running.

%CreateCubeVersionDefinition

ClassMethod %CreateCubeVersionDefinition(pClassName As %String = "", pCube As %DeepSee.Model.cube, Output pNewClassName, Output pNewCubeIndex) As %Status [ Internal ]

Called by the %GetModel generator - do not call this directly.
Create a new definition class for a cube which contains a copy of the cube definition class currently being compiled. The new class will have the name

<pClassName>.Version<pCube.version>

The pClassName must be the name of a cube definition class with the parameter USECUBEVERSIONS=1 and the corresponding cube model pCube must be the cube defined in that class. Additionally, pCube must have the "version" attribute set to a valid integer value.

The generated model will have USECUBEVERSIONS and version attributes removed to prevent recursion in the compiler. The pCube object is unchanged after this call.