Skip to main content

EnsLib.RecordMap.ComplexGenerator

abstract class EnsLib.RecordMap.ComplexGenerator extends EnsLib.RecordMap.GenUtils

Method Inventory

Methods

classmethod Generate(pComplexMap As %String = "", pGenerateRecordMaps As %Integer = 0, ByRef pCompile As %Integer = 2, pDisplay As %Integer = 2, pCompileFlags As %String = "ck", pOverwriteBehaviour As %Integer = 2, Output pGeneratedClasses As %String, pKeepStorage As %Boolean = 1) as %Status
Generate a parser and persistent objects for the Complex RecordMap specified in pComplexMap. The arguments are as follows:
  • pComplexMap: the Complex RecordMap to generate the class definitions from.
  • pGenerateRecordMaps controls updates to the RecordMaps specified in the map. The permitted values are:
    • 0: No updates to any generated RecordMap classes.
    • 1: The RecordMaps referenced by the Complex RecordMap should be completely regenerated.
  • pCompile: control compilation of the generated classes. Possible values are:
    • 0: Do not compile. A list of generated classes will be returned in the "Generated" subscript of the pCompile variable.
    • 1: Compile entire package using $system.OBJ.CompilePackage() (also compiles RecordMap class)
    • 2: Compile generated classes as a group and then recompile ComplexMap class [Default]
  • pDisplay: control display options for the current device. Possible values are:
    • 0: Do not display any output
    • 1: Display basic object structure and compiler output
    • 2: Display detailed object structure, including type information [Default]
  • pCompileFlags: compiler flags to use during the compilation. Note that "-d" is added to the compiler flags if pDisplay=0
  • pOverwriteBehaviour: control behaviour if a class already exists. Options are:
    • 0: Always overwrite existing classes
    • 1: Prompt for user input before overwriting. NOTE: this option requires a terminal interface.
    • 2: Never overwrite. This prevents generation of further classes [Default from terminal]
  • pGeneratedClasses: an array of classes that were generated in the call to the method. The list includes all classes that were generated, even if an error occurs.
  • pKeepStorage: flag to control whether we retain the existing storage definition. The flag is needed to ensure that we can add properties to an existing object without corrupting existing data. That said, it may be necessary during development to modify the structure, so this flag can be set to 0 to remove the existing storage definition.
classmethod buildExplicitMap(pBatchElement As EnsLib.RecordMap.Model.BatchElement, ByRef pMap, ByRef pCounter As %Integer = 1, ByRef pPrevIdents) as %Status
classmethod buildMap(pComplexModel As EnsLib.RecordMap.Model.ComplexBatch, pGroupPackage As %String = "", Output pMap) as %Status
classmethod buildVariableMap(pBatchElement As EnsLib.RecordMap.Model.BatchElement, ByRef pMap, ByRef pCounter As %Integer = 1, ByRef pPrevIdents) as %Status
classmethod generateBatchElementDelete(pMethod As %Dictionary.MethodDefinition, pBatchElement As EnsLib.RecordMap.Model.BatchElement, pIndent As %String = {$char(9, 9)}) as %Status
classmethod generateBatchElementPut(pMethod As %Dictionary.MethodDefinition, pBatchElement As EnsLib.RecordMap.Model.BatchElement, pPropRef As %String = "..", pIndent As %String = {$char(9, 9)}) as %Status
Helper method to generate valid put code for a BatchElement object in the model.
classmethod generatePutSequence(pSequenceDef As %Dictionary.ClassDefinition, pSequence As EnsLib.RecordMap.Model.RecordSequence, ByRef pSequenceNumber As %Integer = 1) as %Status
classmethod generateReference(pReference As EnsLib.RecordMap.Model.RecordReference, pParentDefinition As %Dictionary.ClassDefinition, ByRef pSequenceNumber As %Integer = 1, pGenerateRecordMaps As %Integer = 1, ByRef pCompile As %Integer = 2, pDisplay As %Integer = 2, pCompileFlags As %String = "ck", pOverwriteBehaviour As %Integer = 2, ByRef pGeneratedClasses As %String, pKeepStorage As %Boolean = 1) as %Status
classmethod generateSequence(pSequence As EnsLib.RecordMap.Model.RecordSequence, pParentDefinition As %Dictionary.ClassDefinition, ByRef pSequenceNumber As %Integer = 1, pGenerateRecordMaps As %Boolean = 0, ByRef pCompile As %Integer = 2, pDisplay As %Integer = 2, pCompileFlags As %String = "ck", pOverwriteBehaviour As %Integer = 2, Output pGeneratedClasses As %String, pKeepStorage As %Boolean = 1, pSeqNode As %String = "") as %Status
FeedbackOpens in a new tab