Class Reference
%Projection.AbstractProjection
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
Private  Storage

abstract class %Projection.AbstractProjection extends %Library.Base

This abstract class defines the Projection interface which is implemented by one of the various subclasses of this class.
A class definition may include one or more Projection definitions; each one of which refers to a specific Projection class (a subclass of this class). The Projection interface defines methods that are invoked by the Class Compiler at certain points within a class compilation. Specifically, there is a method, CreateProjection that is called when a class has been compiled, and another, RemoveProjection that is called when a class is about to be recompiled or deleted.
The expected use of a Projection class is to provide a way to automatically generate associated files (such as those used by the Caché Java Binding) whenever a class is compiled.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
7


Summary

Methods
%ClassIsLatestVersion %ClassName %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%DispatchSetProperty %Extends %GetParameter %IsA
%OriginalNamespace %PackageName CreateProjection EndCompile
QueueClass RemoveProjection SetQueueFlag getDefaultParam
getROOTDIR

Subclasses
%DeepSee.CubeProjection %DeepSee.KPIProjection %DeepSee.QualityMeasure.QualityMeasureProjection
%DeepSee.Report.ReportProjection %DeepSee.SubjectAreaProjection %Projection.Java
%Projection.MV %Projection.Monitor %Projection.SOAPConfiguration
%Projection.StudioDocument %Projection.XML %Studio.Extension.Projection
%XGEN.Projection %ZEN.ObjectProjection %ZEN.PageProjection
%ZEN.Template.TemplateProjection

Methods

• classmethod CreateProjection(classname As %String, ByRef parameters As %String, modified As %String) as %Status
This method is called by the Class Compiler whenever an associated class has finished compiling. classname contains the name of the associated class while parameters contains an array of the projection parameters subscripted by parameter name. Also the special parameter value parameters("%qstruct") contains a merge of the qstruct array this projection is being compiled with. The modified for an incremental compile will contain a comma separated list of the methods that were modified and it will be blank for a full compile
Any errors reported by this method are reported by the Class Compiler but do not effect class compilation in any way.
• classmethod EndCompile() as %Status
This is called as close to the end of the compile as possible so it can do cleanup work or more usefully it can avoid doing work multiple times. For example if class User.A would modify MyFile.txt normally in the CreateProjection method and class User.B would normally modify the same file when it is compiled and you compile both these classes together then you may end up generating MyFile.txt twice and so doing duplicate work. By changing this so CreateProjection just adds 'MyFile.txt' to the queue of things to be done and then processing this list in this method, making sure to only do each piece of work once, you can process the fully up to date state of User.A and User.B to create the correct MyFile.txt just once.

Note that this method will be called just once per projection subclass, so CreateProjection may be called multiple times for each class with this projection type, but this method will only be called once at the end of the compile.

• classmethod QueueClass(classname)
This is a helper method for implementors of projection classes. This method provides a mechanism for to make sure additional classes are compiled. Typically these would be new classes created by the projection itself.
You should not directly invoke the Class Compiler from a projection method, instead, invoke this method to request that the class classname be placed in a queue of classes that will be compiled at the end of the current compilation operation.
• classmethod RemoveProjection(classname As %String, ByRef parameters As %String, recompile As %Boolean, modified As %String) as %Status
This method is called by the Class Compiler whenever an associated class is either a) about to be recompiled, or b) about to be deleted. classname contains the name of the associated class while parameters contains an array of the projection parameters subscripted by parameter name. Also the special parameter value parameters("%qstruct") contains a merge of the qstruct array this projection is being compiled with. recompile is true (1) if the associated class is about to be recompiled. The modified for an incremental compile will contain the comma separated list of methods that were modified and will be blank for a full compiler.
Any errors reported by this method are reported by the Class Compiler but do not effect class compilation in any way.
• classmethod SetQueueFlag(flag)
• classmethod getDefaultParam(parameters, type, paramname, default) as %String
• classmethod getROOTDIR(parameters, type) as %String