Skip to main content


abstract persistent class %ZHSLIB.PackageManager.Developer.Annotation.CosEntity extends %Library.Persistent, %XML.Adaptor

SQL Table Name: %ZHSLIB_PackageManager_Developer_Annotation.CosEntity

base class for proxy objects representing COS objects for annotations. This includes objects like Arguments which can be tagged using tags located in the comment blocks of a parent object (in this case, the argument's method). Therefore our model operates on the principle that any COS entity can be tagged, but only the subclass CommentableEntity represents entities with comment blocks (classes, methods, properties, etc.). Those comment blocks will be processed by the commented entity's proxy but the tags will be associated with the argument or whatever it is intended to modify.

Property Inventory

Method Inventory


parameter AcceptableAnchorTags;
tags that apply to the current entity, in addition to the universal ones (see CommonTags)
parameter CommonTags = API.Deprecated,API.Since;
tags that apply to (almost) every COS entity. Package name (%ZHSLIB.PackageManager.Developer.Annotation.Tag) is omitted


property CalculatedTags as list of %ZHSLIB.PackageManager.Developer.Annotation.Tag.AnchorTag (XMLIO = "OUT", XMLPROJECTION = "element", XMLTYPECONSTRAINT = "choice") [ Calculated ];
Property methods: CalculatedTagsCollectionToDisplay(), CalculatedTagsCollectionToOdbc(), CalculatedTagsDisplayToCollection(), CalculatedTagsOdbcToCollection()
property DatabaseGUID as %String (XMLPROJECTION = "none") [ Required ];
Property methods: DatabaseGUIDCompute(), DatabaseGUIDDisplayToLogical(), DatabaseGUIDGet(), DatabaseGUIDGetStored(), DatabaseGUIDIsValid(), DatabaseGUIDLogicalToDisplay(), DatabaseGUIDLogicalToOdbc(), DatabaseGUIDNormalize(), DatabaseGUIDSQLCompute(), DatabaseGUIDSet(), DatabaseGUIDSetT()
property IdentifierText as %String (MAXLEN = 500, XMLPROJECTION = "none") [ Calculated ];
Property methods: IdentifierTextCompute(), IdentifierTextDisplayToLogical(), IdentifierTextIsValid(), IdentifierTextLogicalToDisplay(), IdentifierTextLogicalToOdbc(), IdentifierTextNormalize(), IdentifierTextSQLCompute()
property ObjectCounter as %Integer (XMLPROJECTION = "none") [ Required ];
Property methods: ObjectCounterCompute(), ObjectCounterDisplayToLogical(), ObjectCounterGet(), ObjectCounterGetStored(), ObjectCounterIsValid(), ObjectCounterLogicalToDisplay(), ObjectCounterNormalize(), ObjectCounterSQLCompute(), ObjectCounterSet(), ObjectCounterSetT(), ObjectCounterXSDToLogical()
property OwnerClass as %ZHSLIB.PackageManager.Developer.Annotation.CosEntity.ClassProxy (XMLPROJECTION = "none") [ Calculated ];
reference to the class proxy object that the current COS entity is part of. For class proxy objects, this will return $this.
Property methods: OwnerClassCompute(), OwnerClassGet(), OwnerClassGetObject(), OwnerClassGetObjectId(), OwnerClassSQLCompute()
relationship Tags as array of %ZHSLIB.PackageManager.Developer.Annotation.Tag.AnchorTag (XMLIO = "IN", XMLPROJECTION = "element", XMLTYPECONSTRAINT = "choice") [ InitialExpression = $listbuild("%ZHSLIB.PackageManager.Developer.Annotation.Tag.AnchorTag","ParentCosEntity",+$this,"many",1,1) , Transient , Inverse = ParentCosEntity , Cardinality = many ];
Property methods: TagsGet(), TagsGetObject(), TagsGetObjectId(), TagsGetSwizzled(), TagsIsEmpty(), TagsIsValid(), TagsNewObject(), TagsRClose(), TagsRExec(), TagsRFetch(), TagsRelate(), TagsSQLCompute(), TagsSet(), TagsUnRelate()


classmethod AcceptableTagList() as %Library.List
method CalculatedTagsGet() as %Collection.AbstractListOfObj
Because the tags live in a relationship, we cannot expect the contents to have consistent output, which would result in some level of false positive "changes" in the API over time. The sequencing is needed to ensure that our API documentation can be used for change tracking. To avoid this issue, we use the following workaround which orders the tags using element name, which we assume to be unique within each COS entity proxy.
classmethod GetDatabaseGUID() as %String
method GetFriendlyIdentifier() as %String
a text string for identifying things in error messages and whatnot
classmethod GetIdentifierText(pID As %Integer) as %String
classmethod GetOwnerClassProxyID(pID As %Integer) as %Integer
method GetTagsAsArray(ByRef pInfoArray)
called on dummy object instances representing XML override info. Returns the relevant data as an array for later use.
method HasTag(pShortClassName As %String, Output pAvailability As %String = "", Output pVersionValue As %String = "") as %Boolean
method IdentifierTextGet() as %String
method InheritTags(ByRef pExtantTagList, ByRef pTagTally As %Integer, pSourceCosEntity As CosEntity, ByRef pTagOverrides, ByRef pOverridesFound)
method InitializeTagNameArray(ByRef pTagList, Output pTagCount As %Integer)
builds a simple array of the class names of all the tag objects connected to this entity
method ShouldRefuseTag(pCandidateTag As %ZHSLIB.PackageManager.Developer.Annotation.Tag.AnchorTag) as %Boolean
callback to give subclasses the opportunity to refuse to inherit a tag (supports the "DoesNotInheritTags" tag in CommentableEntity)
method StoreWarning(pWarningText As %String) as %Status
method SupplyMissingTags()
method ValidateTagForUse(pNewTag As %ZHSLIB.PackageManager.Developer.Annotation.Tag.AnchorTag) as %Status
method ValidateTags()
validates tags for object validity and also applies logic rules. no return value; throws exceptions if there are showstopper problems. Some non-critical issues may simply cause output warnings. The various overrides all call ##super and they are all called when we finish loading/building the info for a class (with all its contents) and we're about to save the class proxy and its entire object tree.


index (NamespaceAwareKey on DatabaseGUID,ObjectCounter) [IdKey, Type = key];
Index methods: NamespaceAwareKeyCheck(), NamespaceAwareKeyDelete(), NamespaceAwareKeyExists(), NamespaceAwareKeyOpen(), NamespaceAwareKeySQLCheckUnique(), NamespaceAwareKeySQLExists(), NamespaceAwareKeySQLFindPKeyByConstraint(), NamespaceAwareKeySQLFindRowIDByConstraint()

Inherited Members

Inherited Methods


Storage Model: Storage (%ZHSLIB.PackageManager.Developer.Annotation.CosEntity)

FeedbackOpens in a new tab