Skip to main content

%iKnow.Utils.GeneratorUtils

This class has some code for automatically generating APIs and objects based on the core elements of the iKnow COS layer.

Method Inventory

Methods

classmethod GenerateAllAPIs(pVerbose As %Boolean = 1, pFlags As %String = "crfk", pJobs As %Boolean = 0) as %Status
Wrapper method running GenerateSecondaryAPIs() for every known primary API class
classmethod GenerateObjectForDomain(domainId As %Integer, objectName As %String = "Source", className As %String = "User.Source", overwriteExisting As %Boolean = 0, Output compileErrors="", generatedBy As %String = "") as %Status

This utility method generates a copy of a class from the %iKnow.Objects package, hardcoding a particular domain ID. This will ensure any queries/operation directed at this object/table, will only access entries from that particular domain.

Note: This method has moved to %iKnow.Objects.Utils and should be considered deprecated.

classmethod GenerateQueryResultClass(resultClassName As %String, queryClassName As %String, queryName As %String, globalName As %String, overwriteExisting As %Boolean = 1, queryParams...) as %Status

This utility method generates a class named 'resultClassName' representing the query results of the iKnow query identified by 'queryClassName' and 'queryName', stored in the global 'globalName'.

If query parameters are supplied at the end of this method, the query is run with these parameters, populating the global mentioned.

classmethod GenerateSecondaryAPIJob(apiClass As %String, pCompile As %Boolean, pFlags As %String = "crkf", pJobNb As %Integer) as %Status
Wrapper method launching a GenerateSecondaryAPIs() call asynchroneously
classmethod GenerateSecondaryAPIs(apiClass As %String = "%iKnow.Queries.EntityAPI", pVerbose As %Boolean = 1, pCompile As %Boolean = 1, pFlags As %String = "crkf") as %Status

This method will generate API and WSAPI classes corresponding to a primary API class automatically, based on the methods in apiClass and any corresponding [methodName]RT and [methodName]EXP parameters defined.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab