Home > Class Reference > %SYS namespace > %iKnow.Metrics.MetricDefinition
Private  

%iKnow.Metrics.MetricDefinition

deprecatedabstract class %iKnow.Metrics.MetricDefinition extends %RegisteredObject

The %iKnow.Metrics infrastructure is deprecated in favour of the more SQL-oriented approach offered through %iKnow.Tables.Utils, where you can add computed fields at different levels and choose whether they need to be persisted or not.

Use a Metric Definition to declare any custom metrics you wish to use in an application by creating a subclass of this class and supplying a Metrics XData block detailing the properties of these custom metrics. To be able to use a metric in a particular domain, use the Register method.

Unless custom metrics are only assigned on an individual basis (such as a "reader score" metric), a metric will refer to a Builder Class that is responsible for implementing the logic to calculate the appropriate values for a custom metric. See also %iKnow.Metrics.MetricBuilder for more details.

Note: metric definitions can also transparently be included in a domain definition, with no further need to call Register. See also %iKnow.DomainDefinition.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
2

Summary

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
Register UnRegister

Methods

final classmethod Register(pDomainId As %Integer, pVerbose As %Boolean = 1) as %Status
Registers all Metrics, their properties and targets, as defined in the Metrics XData block, in the domain pDomainId.
final classmethod UnRegister(pDomainId As %Integer, pVerbose As %Boolean = 1) as %Status
Drops all metrics defined in the Metrics XData block from domain pDomainId.