class %iKnow.Domain
extends %RegisteredObject
This class represents a domain registered in this namespace.
property Id
as %Integer [ ReadOnly ];
The automatically generated ID for this domain, which is unique across namespaces
property Name
as %String [ ReadOnly ];
The name of this domain, which should be unique within the namespace (case-insensitive)
property SortField
as %Integer [ ReadOnly ];
property Version
as %String [ Calculated,ReadOnly ];
Stores the iKnow data structure version number for this domain.
classmethod Create(name As %String, sortField As %Integer = -1, Output sc As %Status = $$$OK)
as %iKnow.Domain
Creates a domain with the specified domain name in the given namespace. If no value is
supplied for sortField, it will assume the system-wide defaults.
classmethod Delete(domainName As %String)
as %Status
Utility method to delete a domain from the system, including its data, settings
and system global entries.
classmethod DeleteId(domainId As %Integer)
as %Status
Utility method to delete a domain from the system, including its data, settings
and system global entries.
method DropData(dropMetadataDefinitions As %Boolean = 0, dropDictionaries As %Boolean = 0, dropTempGlobals As %Boolean = 1)
as %Status
This method will drop all sources and subsequent indexes from this domain
classmethod Exists(name As %String)
as %Boolean
Checks whether a domain with the given name already exists within the namespace
classmethod GetCurrentSystemVersion()
as %String
Returns the current version of this Caché instance, which is the version of any
newly created domain in this instance. Domains already created in this instance
before it was last upgraded or which were imported from other instances through other
means, may have earlier versions. To check the version of a particular domain, use
the Version property of a %iKnow.Domain instance.
classmethod GetOrCreateId(name As %String, sortField As %Integer = $$$SORTBYFREQUENCY, Output sc As %Status = $$$OK)
as %Integer
Shorthand method to get the domain ID for a specific domain name, creating it if it does not
yet exist in this namespace.
method GetParameter(paramName As %String, Output definedAt As %String = "DOMAIN")
as %String
Returns a domain-specific parameter value. If no domain-specific value was registered, this
method returns the empty string.
method GetParameters(Output pParams)
as %Status
Returns an array pParams containing all the domain parameters registered
for this instance in the form: pParams(paramName) = paramValue.
NOTE: this might include parameters that cannot be modified by end users.
classmethod GetSystemParameter(paramName As %String)
as %String
Returns the current system-wide value for a domain parameter if there is one registered.
See GetParameter for more details on how to fetch the current
APPLICABLE parameter for a domain, as this method does not take any domain-specific
settings or hardcoded defaults into account.
method IsEmpty()
as %Boolean
Returns whether or not a domain is empty. If there are any entities or remnants of (virtual)
sources, this method will return false.
classmethod Open(name As %String, Output sc As %Status = $$$OK)
as %iKnow.Domain
Opens a domain object with the specified name
classmethod OpenId(id As %Integer, Output sc As %Status = $$$OK)
as %iKnow.Domain
Opens a domain object with the specified ID
classmethod RegisterImportedDomain(domainId As %Integer)
as %Status
Registers a domain loaded into this namespace through globals export/import or by cache.dat
transfers for use in this instance. The imported domains ID should be unique for this instance.
WARNING: if this method is not called prior to further load operations in this domain or any
other domains on this instance, data structures can get corrupted through domain ID conflicts!
WARNING: if you import a domain through globals export/import, the target namespace cannot have
any non-empty iKnow domains!
method SetParameter(paramName As %String, paramValue As %String)
as %Status
Sets a domain-specific parameter, overriding the system default
classmethod SetSystemParameter(paramName As %String, paramValue As %String)
as %Status
Registers a domain parameter at the system level, for all domains in all namespaces.
If there is already a value registered, call UnsetSystemParameter
first to explicitly clear the current value.
method UnsetParameter(paramName As %String)
as %Status
Unsets a domain-specific parameter, so it will use the system default again
classmethod UnsetSystemParameter(paramName As %String)
as %Status
Removes a system-defined parameter value for the given parameter name.
query GetAllDomains(currentNamespaceOnly As %Boolean = 0)
Selects
domainId As %Integer, domainName As %String, namespace As %String, version As %String
Utility query to retrieve a list of all Domains registered in all namespaces