Home > Class Reference > ENSLIB namespace > %iKnow.Queries.MetadataQAPI

%iKnow.Queries.MetadataQAPI

class %iKnow.Queries.MetadataQAPI extends %iKnow.Queries.AbstractQAPI

This is an automatically generated class, offering a functionally equivalent set of methods and queries as %iKnow.Queries.MetadataAPI, exposed as SqlProc methods.

See the classdocs for %iKnow.Queries.MetadataAPI for more information.

This class was generated by : %iKnow.Queries.MetadataAPI.cls

Method Inventory (Including Private)

Methods (Including Private)

classmethod AddField(domainId As %Integer, fieldName As %String(MAXLEN=32767), supportedOperators As %String(MAXLEN=32767)=$lb($$$MDOPEQUAL), dataType As %String(MAXLEN=32767)=$$$MDDTSTRING, storage As %Integer = $$$MDSTNORMAL, caseSensitive As %Boolean = 0, lovId As %Integer = -1, validateLov As %Boolean = 1, hidden As %Boolean = 0, Output scText As %String = "") as %Library.Integer [ SQLProc = MetadataQAPI_AddField ]

Adds a field definition with the given name and properties.

  • The supportedOperators parameter specifies which operations (such as $$$MDOPEQUAL) will be available for filtering criteria
  • For dataType, choose either $$$MDDTSTRING, $$$MDDTNUMBER or $$$MDDTDATE ($horolog format)
  • Use storage to control how values are stored: $$$MDSTNORMAL for cases where you would use a normal Caché index, $$$MDSTBITMAP where you would use a Caché bitmap index (few different metadata values compared to total # of records)
  • If dataType is $$$MDDTSTRING, caseSensitive controls whether or not string values should be treated as case-sensitive.
  • The lovId and validateLov parameters define whether a List Of Values is available for this metadata field and whether input values should be verified against this list. See also AddListOfValues().
  • If hidden is set to true, the field will by default not appear in metadata field and value lists.
classmethod AddListOfValues(domainId As %Integer, lovName As %String(MAXLEN=32767), autoExtend As %Boolean = 1, Output scText As %String = "") as %Library.Integer [ SQLProc = MetadataQAPI_AddListOfValues ]

Adds a List Of Values to the domain, which can then be used as a list of allowable values for one or more metadata fields.

classmethod AddLovValue(domainId As %Integer, lovId As %Integer, value As %String(MAXLEN=32767), ByRef rank As %Integer = -1) as %Boolean [ SQLProc = MetadataQAPI_AddLovValue ]
Adds a new value to an existing List Of Values
classmethod CreateFilter(pDomainId As %Integer, pFieldName As %String(MAXLEN=32767), pOperator As %String(MAXLEN=32767), pValue As %String(MAXLEN=32767), Output scText As %String = "") as %iKnow.Filters.Filter [ SQLProc = MetadataQAPI_CreateFilter ]

Create a %iKnow.Filters.Filter instance that filters sources according to the given criteria, using the filter class compatible with this %iKnow.Queries.MetadataI implementation.

For the default MetadataAPI, this is a %iKnow.Filters.SimpleMetadataFilter instance.

classmethod GetFieldId(domainId As %Integer, fieldName As %String(MAXLEN=32767), Output scText As %String = "") as %Library.Integer [ SQLProc = MetadataQAPI_GetFieldId ]
Returns the metadata field ID corresponding to the supplied name, or "" if none exists in this domain.
classmethod GetMetaSpreadByEntities(pDomainId As %Integer, pFieldName As %String(MAXLEN=32767), pEntityList As %String(MAXLEN=32767), pFilter As %String(MAXLEN=32767)="", pSetOp As %Integer = $$$UNION, Output scText As %String = "") as %Library.Integer [ SQLProc = MetadataQAPI_GetMetaSpreadByEntities ]

Returns the "spread" of metadata values (number of distinct values) for field pFieldName for the entities in pEntityList, in the sources satisfying pFilter. When specifying multiple entities, sources (and their metadata values) are included based on the value of pSetOp: if pSetOp = $$$UNION, only one entity has to be present (default), if pSetOp = $$$INTERSECT, all of them need to be present.

classmethod GetMetaSpreadByEntityIds(pDomainId As %Integer, pFieldName As %String(MAXLEN=32767), pEntityIdList As %String(MAXLEN=32767), pFilter As %String(MAXLEN=32767)="", pSetOp As %Integer = $$$UNION, Output scText As %String = "") as %Library.Integer [ SQLProc = MetadataQAPI_GetMetaSpreadByEntityIds ]

Returns the "spread" of metadata values (number of distinct values) for field pFieldName for the entities in pEntityIdList, in the sources satisfying pFilter. When specifying multiple entities, sources (and their metadata values) are included based on the value of pSetOp: if pSetOp = $$$UNION, only one entity has to be present (default), if pSetOp = $$$INTERSECT, all of them need to be present.

classmethod GetMetaSpreadInternal(pDomainId As %Integer, pFieldId As %Integer, pType As %String(MAXLEN=32767)="ENTITY", pFilter As %String(MAXLEN=32767)="", pSetOp As %Integer = $$$UNION, Output scText As %String = "") as %Library.Integer [ SQLProc = MetadataQAPI_GetMetaSpreadInternal ]
classmethod GetUniValue(pDomainId As %Integer, pUniValueId As %Integer) as %Library.String [ SQLProc = MetadataQAPI_GetUniValue ]
Returns the unique metadata value corresponding to the supplied pUniValueId.
classmethod GetUniqueValueCount(pDomainId As %Integer, pFieldName As %String(MAXLEN=32767), pFilter As %String(MAXLEN=32767)="") as %Library.Integer [ SQLProc = MetadataQAPI_GetUniqueValueCount ]

Returns the number of unique metadata values for a given field pFieldName in the sources satisfying the supplied filter, after normalization based on the field specifications such as case sensitivity and data type.

classmethod GetValue(domainId As %Integer, fieldName As %String(MAXLEN=32767), externalId As %String(MAXLEN=32767), Output scText As %String = "") as %Library.String [ SQLProc = MetadataQAPI_GetValue ]
Returns the actual value for a given metadata field (by name) and source (by External ID).
classmethod GetValueById(domainId As %Integer, fieldId As %Integer, srcId As %Integer, Output scText As %String = "") as %Library.String [ SQLProc = MetadataQAPI_GetValueById ]
Returns the actual value for a given metadata field (by ID) and source (by Source ID).
classmethod RemoveField(domainId As %Integer, fieldName As %String(MAXLEN=32767)) as %Boolean [ SQLProc = MetadataQAPI_RemoveField ]
Removes a metadata field (by name) from the domain, including all references by existing sources.
classmethod RemoveFieldById(domainId As %Integer, fieldId As %Integer) as %Boolean [ SQLProc = MetadataQAPI_RemoveFieldById