Using Caché Objects - InterSystems Documentation
Using Caché Objects - InterSystems Documentation
Using Caché Objects - InterSystems Documentation
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
RemoveProjection<br />
The RemoveProjection method is a class method that is invoked when either 1) a<br />
class definition is deleted or 2) at the start of a recompilation of the class. This method<br />
is passed the name of the class being removed, an array containing the parameter<br />
values (subscripted by parameter name) defined for the projection, and a flag indicating<br />
whether the method is being called as part of a recompilation or because the class<br />
definition is being deleted.<br />
When a class definition containing a projection is compiled the following events occur:<br />
1. If the class has been compiled previously, it will be “uncompiled” before the new<br />
compile begins (that is, all the results of the previous compilation are removed). At this<br />
time, the compiler invokes the RemoveProjection method for every projection with a<br />
flag indicating that a recompilation is about to occur.<br />
Note that you cannot call methods of the associated class from within the<br />
RemoveProjection method as the class will not exist at this point.<br />
Also note that if you add a new projection definition to a class that had been previously<br />
compiled (without the projection) then the compiler will call the RemoveProjection<br />
method on the next compilation even though the CreateProjection method has never<br />
been called. Implementors of the RemoveProjection method have to plan for this possibility.<br />
2. After the class is completely compiled (i.e., it is ready for use), the compiler will invoke<br />
the CreateProjection method for every projection.<br />
When a class definition is deleted, the RemoveProjection method is invoked for every projection<br />
with a flag indicating that a deletion has occurred.<br />
16.2.2 The Standard Projection Classes<br />
Projection Classes<br />
In order to easily provide additional services (such as Java support) <strong>Caché</strong> provides the following<br />
projection classes as part of its standard class library:<br />
<strong>Using</strong> <strong>Caché</strong> <strong>Objects</strong> 143