Home > Class Reference > %SYS namespace > %ZHSLIB.PackageManager.Core.ComparisonAdaptor

%ZHSLIB.PackageManager.Core.ComparisonAdaptor

abstract class %ZHSLIB.PackageManager.Core.ComparisonAdaptor

Handles code generation of a grab bag of useful functions to be code generated, such as the following: - Comparison functions that compare instances of a class by comparing their properties.

Method Inventory

Parameters

parameter SkipCodeGeneration = 0;
Set to true to skip code generation in this class

Methods

method %CompareTo(pObj As %ZHSLIB.PackageManager.Core.ComparisonAdaptor, pIgnorePropertyList As %Library.List = "", Output pDifferingPropertyArray As %Library.List) as %Boolean [ Language = objectscript ]
Compares the properties of the existing object to the provided object of the same type.
If comparison of certain properties is to be skipped, the property names can be listed in pIgnorePropertyList.
Returns 1 if all properties match. Else 0. pDifferingPropertyArray returns in an array, the values of the properties that differed in the following format:
pDifferingPropertyArray("property name", "any nested property names or indices/keys for iterable properties") = $ListBuild("value in calling object", "value in pObj").
final classmethod CompareToSkipCondition(pCompiledProperty As %Dictionary.CompiledProperty) as %Boolean [ Language = objectscript ]
Condition under which a given property is skipped when generating code for the CompareTo(). The instance of the compiled property is provided in pCompiledProperty.
This is intended to be used only if the properties to be skipped match a certain pattern. To hardcode specific properties to be skipped, use the property parameters.
Returns 1 if the property should be skipped. 0 otherwise.
classmethod FindAllSuperClasses(pClassname As %Dictionary.Classname) as %Library.List [ Language = objectscript ]
Returns a list of all super classes for a given class pClassname
classmethod IgnoreKeywordList() as %Library.List [ Language = objectscript ]
Returns a list of keywords such that, if a property contains any of these, code generation of the property is ignored. @API.Overrideable

Subclasses

FeedbackOpens in a new window