Page tree

Link Examples


When a project is analyzed and stored in the Knowledge Base, the various links between the project's constituent objects and components are also registered. Enlighten is capable of representing this link information in the Graphical View through a series of arrows and abbreviations.

This help section provides a reference guide to all the links that Enlighten is capable of rendering, and the code that causes their creation. The example are organized by language type:

ABAP

The following table describes references that are detected by the analyzer and the context in which corresponding links are traced and stored in the Knowledge Base:

Link type When is this type of link created? Example
ACCESS EXEC This link is created when a piece of code calls a method.
CALL METHOD oref->method1...
MEMBER This link is created when an object make an access to a member of another object.
METHOD mymethod.   WRITE ref->attrENDMETHOD.
READ This link is created when an object reads a value of another object.
METHOD mymethod.   X = ref->attrENDMETHOD.
WRITE This link is created when an object modifies a value of another object.
METHOD mymethod.   ref->attr = 10ENDMETHOD.
BELONGS TO This link is created when one object belongs to another object.
report abapReportFunction fEndfunction

(f belongs to abapReport).

CALL This link is used to describe a function that is called in a code block.
Function fPerform gEndfunction

(f calls g)

This link is created when a SAP transaction calls another SAP transaction. This information is extracted from the SAP system.
This link is created when a SAP transaction calls the processing screen or the selection screen of an ABAP program. This information is extracted from the SAP system.
This link is created when an ABAP program calls a SAP transaction.
CALL TRANSACTION SA10 AND SKIP FIRST SCREEN....LEAVE TO TRANSACTION SA10.
This link is created when an event block of a screen calls an ABAP module.
PROCESS BEFORE OUTPUT.MODULE STATUS_0100.*PROCESS AFTER INPUT.CHAIN.FIELD: SDYN_CONN-CITY, SDYN_CONN-COUNTRY,SDYN_CONN-CARID, SDYN_CONN-MARK.MODULE USER_COMMAND.ENDCHAIN.
This link is created when an ABAP component calls a screen. This information is extracted from the SAP system.
INCLUDE This link is used when a file includes another file.
Report abapReportInclude include_name
INHERIT EXTEND This link is created from a class A to a class B if A inherits B.
CLASS subclass DEFINITION   INHERITING FROM superclass.ENDCLASS.
OVERRIDE If a method of a class overrides a method belonging to a parent class, then this link is created between the two methods.
METHODS mymethod REDEFINITION.
IMPLEMENT This link is created from a class to an interface when the class implements this interface.
CLASS myclass DEFINITION.PUBLIC SECTION.INTERFACES: interf1, interf2 ... ENDCLASS.
If a class implements an interface, this link is also created between the method belonging to the class and the corresponding method belonging to the interface.
INTTERFACE status.METHODS write.ENDINTERFACE.CLASS counter DEFINITION.PUBLIC SECTION.INTERFACE status....ENDCLASS.CLASS counter IMPLEMENTATION.METHOD status~write....ENDMETHOD....ENDCLASS.
RAISE This link is created when a method activates an event.
RAISE EVENT evt EXPORTING ...
RELY ON This link is created when a method is a handler for an event.
METHODS handler FOR EVENT evt OF {class|interf}IMPORTING ... ei ...[sender].
USE - This link is created when a processing screen or a selection screen is used in conjuncton with an ABAP program. This information is extracted from the SAP system.
- This link is created when a SAP transaction calls an ABAP program. This information is extracted from the SAP system.
- This link is created when an ABAP component calls a screen. This information is extracted from the SAP system.
- This link is created when a processing screen or a selection screen is used in conjuncton with an ABAP program. This information is extracted from the SAP system.
SELECT This link is used when a code block contains an SQL request with a select statement (in the case of embedded SQL or native SQL).
Report abapReportSelect col from table
UPDATE This link is used when a code block contains an SQL request with an update statement (in the case of embedded SQL or native SQL).
Report abapReport.Update table set col='a'
DELETE This link is used when a code block contains an SQL request with a delete statement (in the case of embedded SQL or native SQL).
Report abapReportDelete from table
INSERT This link is used when a code block contains an SQL request with an insert (in the case of embedded SQL or native SQL).
Report abapReportInsert into table values vals

ASP

The following table describes references that are detected by the ASP Analyzer and the context in which corresponding links are traced and stored in the Knowledge Base:

Link Type When is this type of link created?
USE TypLib <!--METADATA TYPE = "TypeLib" FILE = "TypLibFileName" -->
Applet <APPLET CODE = "AppletCode" CODEBASE = "AppletCodeBase" >
ActiveX through a variable x = new ActiveXObject("A.B")
function f()
{
   x.Method()

Use link between f and A.B
Dynamic data source <OBJECT id = id_obj classid = "clsid:Sample"></OBJECT>
<A DATASRC=#id_obj datafld = "url" id=id_a>

Use link between id_a and id_obj
Database object <SCRIPT>
   ExecuteSQL("select * from authors")
</SCRIPT>
MAP <img src="images/cover.jpg" border=0 usemap="#covermap" ismap id=id_img>
<map name="covermap">
<area shape=rect href="whatis.htm" coords="0,0,315,198">
<area shape=rect href="signup.asp" coords="0,198,230,296">
<area shape=rect href="holdings.asp" coords="229,195,449,296">
<area shape=rect href="question.htm" coords="314,0,449,196">
</map>
MENTION Indicates the area in which the ActiveX is mentioned function f()
{
   return CreateObject("A.B")
}

Mention link between f and A.B
Indicates the area in which the class name is mentioned function f()
{
   return new g()
}

Mention link between f and g
INCLUDE Indicates the inclusion of a file <SCRIPT LANGUAGE = "JavaScript" SRC = "inc.js">
</SCRIPT>
CALL Indicates a call to a file <A HREF = "called_file.htm" ></A>
<SCRIPT LANGUAGE = JavaScript>
   window.open("called_file.htm")
</SCRIPT>
Indicates a function call <SCRIPT>
function f()
{
   return 1;
}
function g()
{
   return f()
}
</SCRIPT>

Call link between g and f

ACCESS Indicates a access type link enters a property of an HTC component together with the associated PUT or GET function. <PUBLIC:PROPERTY NAME="xmlData"
ID="xmlDataID" GET="getxmlData" PUT="putxmlData"/>

ACCESS link betwee xmlData and the getxmlData and putxmlData functions.

ACCESS and READ Read only access to a file <!--#FLASTMODE FILE = "accessed_file.htm">
Read only access to a variable <SCRIPT>
function f()
{
   y=x }
</SCRIPT>

Read only access between f and x

ACCESS and WRITE Read and write access to a variable <SCRIPT>
function f()
{
   y=x }
</SCRIPT>

Read and write access between f and y

ACCESS and PAGE_FORWARD Indicates a redirection. Only available for analyzed IIS applications. -
REFER Indicates that a variable refers to another variable <SCRIPT>
   x = new ActiveXObject("A.B")
   Application("y")=x </SCRIPT>

Refer link between Application("y") and x

RELY ON and INSTANCE OF Indicates that a variable is an instance of a class <SCRIPT>
   x=new ActiveXObject("A.B")
</SCRIPT>

INSTANCE_OF link between x and A.B

GO THROUGH Indicates the error file(s) used. Only available for analyzed IIS applications. -

Business Objects

The following table describes references that are detected by the analyzer and the context in which corresponding links are traced and stored in the Knowledge Base:
Client/Client link types
Link Type  When is this type of link created?
Reference - Between two linked Universes.
Use/Select - From a Data Provider to a used BO Object .
Client/Server link types
Link Type Where is this type of link created? When is this type of link created?
Use/Select BO Objects - When the BO Object uses table columns in its Select or Where clauses.

C++

The following table describes references that are detected by the analyzer and the context in which corresponding links are traced and stored in the Knowledge Base:

Link Type When is this type of link used?
ACCESS READ Specifies that an object reads a value of another object.

For example if a function reads a global variable:

int g_nVar1;void f(){int nVar1 = g_nVar1;}

C++ Analyzer will generate this Access (Read) link:

WRITE Specifies that an object modifies another one.

For example if a function modifies a global variable :

int g_nVar1;void f(){g_nVar1 = 1;}

C++ Analyzer will generate this Access (Write) link:

EXEC Specifies that an object executes another object (method or function).

For example if a function calls another function:

void g(){f();}

C++ Analyzer will generate this Access (Exec) link:

Notes

  • Please note that, as a convention, an EXEC link is also used when the definition or declaration of an object invokes a macro. The links is created from the object to the macro.
MEMBER Specifies that an object accesses a member of another object.

For example if a function "g()" accesses a global var "g_pVar" and to one of its members:

struct { int m_n1; }* g_Var;void g(){g_pVar->m_n1 = 1;}

C++ Analyzer will generate this Access (Member) link:

ARRAY Specifies that an object accesses another using square brackets ([ ]).

For example if a function "g()" accesses a character's array at its first position:

char g_lpBuffer[256];void g(){g_lpBuffer[0] = '\0';}

C++ Analyzer will generate this Access(Array) link (with the write property also):

BELONG Represents a parent link between two objects. If "Sample.h" contains the following statement:
class C1{public:int foo() {}};

C++ Analyzer will generate these Belong links:

Notes

  • An object always has a "logical" Belong link to its parent (function, class, global variable folder etc.). Furthermore, when the object is defined at the main file level (global variable or function, non-nested class, class method defined at file level), it has a second "physical" link to this implementation file.
  • An object never has more than two parents.
CONTAIN DECLARE This link type occurs between a file and a Global object when there is also a declaration (forward declaration or external declaration) in addition to the definition itself. For example, between a file and a:
  • Class
  • Structure
  • Enum
  • Union
  • Function
  • Variable

This link can be seen in the example below (Zc):

DEFINE This link type occurs when a method is defined outside the file containing the class definition. The link is created from the file containing the method definition to the class.

For example, using the code below:

glob.h

extern int theGlobalVariable;class theClass{void method();};

glob.cpp

/*header comment.*/#include "glob.h"int theGlobalVariable = 3;void theClass::method(){if(2+2==4);}

C++ Analyzer will generate the following link (Zf):

FRIEND Specifies that a class or a function is a friend of a class.

For example if the class "C2" is declared as friend of a new "C3" class:

{ //...friend class C2;};

C++ Analyzer will generate this Friend link:

INCLUDE Represents an inclusion link between two files. If the "Sample.cpp" file contains the following statement:
#include "Sample.h"

C++ Analyzer will generate this Include link:

INHERIT - Represents an inheritance between two classes or structures. If we define a new class "C2" inheriting from C1 as in following statement:
class C2 : public C1{int foo() {}};

C++ Analyzer will generate following Inherit link:

OVERRIDE Specifies that a method redefines another method from an inherited class.

For example using the previous sample, "C2::foo()" redefines "C1::foo()". So C++ Analyzer will generate this link:

PROTOTYPE See the C++ DSP section.
RELY ON Specifies that an object uses an existing type.

If we define a new variable of type "C1" in "Sample.cpp":

C1* g_pVar1;

C++ Analyzer will generate following Rely On link :

USE Represents a link between a C/C++ object and a database object.

For example, if we define a function "f_ExecSql" containing a ProC statement referencing the "Authors" table :

void f_ExecSql(){EXEC SQL EXECUTEselect * from authors where au_id = 0;}

C++ Analyzer will generate this Use link:

The following ESQL tags are also supported:

  • EXEC SQL ... INSERT
  • EXEC SQL ... UPDATE
  • EXEC SQL ... DELETE
  • EXEC SQL ... SELECT
  • EXEC SQL ... CALL
  • EXEC SQL ... DECLARE ... CURSOR FOR
  • EXEC SQL ... EXECUTE ... END-EXEC

In ESQL tags, links to the following objects will be found:

  • Tables
  • Views
  • Synonyms
  • Procedures
  • Functions
  • Package functions
  • Package procedures

DB2

The following table describes references that are detected by the analyzer and the context in which corresponding links are traced and stored in the Knowledge Base:

Link Type  When is this type of link created ?
CALL When:

- a trigger, view, function, or procedure calls a function.

- a procedure calls another procedure.

DDL
  • Create
  • Drop
DDL Create example:
CREATE PROCEDURE SP_CreateTable_Table0001()MODIFIES SQL DATANOT DETERMINISTICCALLED ON NULL INPUTLANGUAGE SQLP1: BEGIN Declare Error int default 0; CREATE Table Table0001 ( ID CHARACTER(4), Qty INTEGER);return Error; END P1

DDL Drop example:

CREATE PROCEDURE SP_DDL_DropTable_Table0001()MODIFIES SQL DATANOT DETERMINISTICCALLED ON NULL INPUTLANGUAGE SQLP1: BEGIN Declare Error int default 0; DROP Table Table0001;return Error; END P1

FIRE
  • Insert
  • Update
  • Delete
  • Select
  • Before
  • After
  • For Each Row
  • For All Row
When a table or view fires a trigger before or after the table or view is modified (for each row / for all rows).
INHERIT When:

- a structured type inherits fields and methods from another structured type.

- a table inherits columns from another table.

- a view inherits columns from another view.

LOCK When a procedure contains a LOCK type instruction on a table. The "lock" on the table is removed by a new LOCK, a COMMIT or a ROLLBACK.
PROTOTYPE When an alias is the prototype of a table or view.
REFER When a referential "delete" or "update" link exists between two tables. 
RELY ON When:

- an index organizes data in a table

- a table is based on a structured type

- a column in a table, view, alias or nickname is characterized by a distinct or structured UDT

- a column in a table, view, alias or nickname is a reference on a structured UDT.

- a parameter in a function or procedure is characterized by distinct or structured UDT.

- a trigger, procedure, view or function handles a distinct or structured UDT.

USE
  • Insert
  • Update
  • Delete
  • Select
When:

- a trigger or a procedure contains a DML INSERT, UPDATE, DELETE, or SELECT INTO instruction that handles a table, a view an alias or a nickname.

- a table is based on a structured type and is linked to a hierarchical table.

Delphi

The following table describes references that are detected by the analyzer and the context in which corresponding links are traced and stored in the Knowledge Base:

Client/Client
Link Type Linked Objects Code Example
Calling Called
rMENTION Caller(fct...) type This link occurs:

- during a cast

- during the creation of an instance :(Tclass.create)

RELY ON Caller (class, fct...) type This link occurs during:

- the declaration of a variable (in a unit, fct or class)

- the declaration of a parameter in a function

For example, between VarClass1 and Class1.

varVarClass1 : Class1;

Or, between Button_Delete_authorClick and Class1 in internal escalated {o}.

procedure TForm1.Button_Delete_authorClick(ParamClass1: Class1);var  i : Integer;  s : String;begin
ACCESS READ - if a <> ' ' then ...
WRITE - a:=3
EXEC - a.f())
MEMBER - a.b Member on a
ARRAY - a[5]
INHERIT EXTEND Heritage link:

For example:

TForm1 = class(TForm2) TForm1 extend TForm2
Class Super class (or form or datamodule)
Interface Super interface
IMPLEMENT Class Super interface For example:
TInterfacedObject = Class(TObject,IInterface)TInterfacedObject implement IInterface
Implemented function Interface function
FIRE Property Function (in read or write) For example:
property DataType: Stringread fDataTypewrite SetDataType;

See image below.

Example of a FIRE link:

Client/Server
Link Type Linked Objects Code Example
Calling Called
rUSE Calls to matched character strings identified in .DFM and .PAS files -

C++ DSP

References that are detected by the DSP Analyzer and the context in which corresponding links are traced and stored in the Knowledge Base are identical to those for the C++ Analyzer.

The exception to this rule is the PROTOTYPE link:

Link Type When is this type of link used?
PROTOTYPE This link is only created during a DSP Analyzer job when the the "Create Links With Registered COM References" option is selected.

If a COM object associated with the DSP file is found, the DSP Analyzer saves this COM object and creates a Prototype link between this object and each file listed in the DSP file.

For example if we create the DSP project "CAnaNG.dsp" generating the COM object "CAnaNG32.dll" and if this project contains the "DspReader.h" file,  the DSP ANalyzer creates this Prototype link:

EJB

The following lists describe references that are detected by the EJB Assistant and the context in which corresponding links are traced and stored in the Knowledge Base:

Links between bean and class/interfaces are flagged as "Prototype" and are oriented as follows:

  • From bean local and remote interfaces to the EJB itself,
  • From the EJB itself to its bean class and, for entity bean, primary key class.

In addition the following links are also traced:

Link Type When is this type of link created?
FIRE 1. Traced between bean class member methods that are implicitly called by the EJB Container:
Home interface   Bean class   Remote interface
create(...) --F--> ejbCreate(...) <--F-- create(...)
remove(...) --F--> ejbRemove(...) <--F-- remove(...)
    < implemented business methods > <--F-- < exported business methods >
find<method>(...) --F--> ejbFind<method>(...)    

2. Traced between bean class/home interface and server side objects. For example in this standard ejb-jar.xml file:

<entity>   <ejb-name>CustomerBean</ejb-name>   ...   <abstract-schema-name>Customer</abstract-schema-name>   ...   <query>      <query-method>         <method-name >findByFirstName</method-name>         <method-params>            <method-param>java.lang.String</method-param>         </method-params>      </query-method>      <ejb-ql>SELECT DISTINCT OBJECT(c) FROM Customer AS c WHERE c.firstName = ?1</ejb-ql>   </query></entity>

The signature of the method is created from the values of the tags <method-name> and <method-param>. The method is searched for using the home interfaces (for the findXXX) and the bean class (for the "select methods").

The abstract schema name identified by grep in the query "EJB-QL" is used to find the associated bean (the query can reference the abstract schema name of another bean). From the bean it is possible to retrieve the associated table names and then link resolution is possible.

3. Also traced between SEI.Mi (Service Endpoint Interface) and BC.Mi (Bean Class). Mi stands for methods that have the same signature in the SEI and the BC. The EJB must be a stateless session bean:

  • SEI.Mi -- Fire --> BC.Mi

4. In addition, this link type is used for implicit invocations. They are used to reflect:

  • either the life cycle events of a component (such as creation/destruction)
  • or the interaction of an external actor such as a container (for EJBs or servlets) or a web browser (for applets)

Caller always refers to a component or a class member method. Callee always refers to a class member method.

Notes

  • "Fire" links are never escalated.
USE SELECT Traced between bean and server objects (tables).
  • Bean --Usdui--> Table (U for Use,  s for Select, d for Delete, u for Update, i for Insert)
  • Finder and select Method --Us--> Table

The link Bean --Usdui--> Table is traced only with container managed persistence (cmp) beans. For Bean managed persistence (bmp) beans, this link is indirect and is represented by two links:

  • One from Bean component to its java class (traced by EJB Assistant ).
  • One from Methods of the bean class where access to database objects is coded (via jdbc) to server objects corresponding to these objects (tables in this case). This link is traced by Java Analyzer.

For example in this standard ejb-jar.xml file:

<entity id="ContainerManagedEntity_1">   <ejb-name>PlayerEJB</ejb-name>   ...   <abstract-schema-name>Player</abstract-schema-name>   ...

The bean in question is found in the ejb-jar.xml file using its name. Persistence information is identified using descriptors specific to each server type:

DELETE
UPDATE
INSERT
PROTOTYPE This link type is reserved for J2EE components' support and is used as follows:
  • EJB: between the bean component and its implementation classes (bean class, local/remote interfaces and possibly primary key class).
  • Servlet: between the servlet component and its servlet class.
  • EJB: between the bean and the SEI (Service Endpoint Interface). For example:

    Webservices.xml (must be placed in the module directory)

    <webservices ...>   <webservice-description>      ...      <webservice-description-name>MyHelloService</webservice-description-name>      <jaxrpc-mapping-file>mapping.xml</jaxrpc-mapping-file> // relatif ou absolu      <port-component>      ...         <port-component-name>HelloIF</port-component-name>         <service-endpoint-interface>helloservice.HelloIF</service-endpoint-interface>         <service-impl-bean>            <ejb-link>HelloServiceEJB</ejb-link>         </service-impl-bean>      </port-component>   </webservice-description></webservices>

    This file indicates that the mapping information between the web service operation and the java methods can be found in mapping.xml.

    JAX-RPC mapping file (mapping.xml in the example)

    <java-wsdl-mapping ...>...      <port-mapping>         <port-name>HelloIFPort</port-name>      </port-mapping>   </service-interface-mapping>   <service-endpoint-interface-mapping>      <service-endpoint-interface>helloservice.HelloIF</service-endpoint-interface>      <service-endpoint-method-mapping>         <java-method-name>sayHello</java-method-name>         <wsdl-operation>sayHello</wsdl-operation>            <method-param-parts-mapping>               <param-position>0</param-position>               <param-type>java.lang.String</param-type>               ...               </method-param-parts-mapping>   </service-endpoint-method-mapping>   </service-endpoint-interface-mapping></java-wsdl-mapping>

    Link example:

Notes

  • "Prototype" links are never escalated.
ACCESS These links correspond to inter-bean references. These references are made via a logical name (declared in the ejb-jar.xml file and that specifies the target ejb) used in the bean client code. The tags containing this logical name are <ejb-ref> or <ejb-local-ref>.
  • EJB client -- Access --> EJB target

For example in this standard ejb-jar.xml file:

<entity> //ou session ou message-driven   <ejb-name> AddressBean</ejb-name>   <ejb-ref> //ou ejb-local-ref      <ejb-ref-name>ejb/CustomerRef</ejb-ref-name>      ...      <ejb-link>CustomerBean</ejb-link>   </ejb-ref></entity>

Each bean specifies the list of other beans it accesses as well as the references used to do so.

JOIN Traced between entity beans based on the abstract schema defined in deployment descriptor (beneath the <relationships>...</relationships> tag).

An entity bean (source EJB) is linked to another entity bean (destination EJB) only if navigation is possible from source EJB to destination EJB, i.e the relation-role in which source EJB is involved contains at least one cmr (container managed relationship) field allowing access to the destination EJB.

<ejb-relation>  <description>Team To Player</description>  <ejb-relation-name>PlayerEJB.teams-TeamEJB.players</ejb-relation-name>   <ejb-relationship-role>     <ejb-relationship-role-name>TeamEJB</ejb-relationship-role-name>      <multiplicity>many</multiplicity>      <relationship-role-source>         <ejb-name>TeamEJB</ejb-name>      </relationship-role-source>     <cmr-field>        <cmr-field-name>players</cmr-field-name>         <cmr-field-type>java.util.Collection</cmr-field-type>      </cmr-field>  </ejb-relationship-role>  <ejb-relationship-role>     <ejb-relationship-role-name>PlayerEJB</ejb-relationship-role-name>      <multiplicity>many</multiplicity>      <relationship-role-source>        <ejb-name>PlayerEJB</ejb-name>      </relationship-role-source>     <cmr-field>        <cmr-field-name>teams</cmr-field-name>         <cmr-field-type>java.util.Collection</cmr-field-type>      </cmr-field>  </ejb-relationship-role></ejb-relation>

Considering the example above, the source EJB TeamEJB will be linked to the destination EJB PlayerEJB because the cmr field players makes navigation possible from source to destination  EJB.

For the same reasons, PlayerEJB (now source EJB) will have Refer link to TeamEJB (destination EJB for this link).

For each Join link, the information below is retrieved from the deployment descriptor and accessible in HTML Report:

  • Relation Name

    The name of the EJB relation as found in the <ejb-relation-name> tag of the deployment descriptor (PlayerEJB.teams-TeamEJB.players in the example). If no name is provided, EJB Assistant computes a name for the relation, based on the names of the two beans involved. For instance, the computed name would be TeamEJB-PlayerEJB if PlayerEJB.teams-TeamEJB.players was missing in the example.

  • Relation Description

    The relation description as specified in the descriptor. No default value for this attribute.

  • Multiplicity

    One of the string Many, One or N/S if relation role multiplicity is not specified in the descriptor.

Oracle Forms

The Oracle Forms Analyzer uses different types of links to represent interactions between Oracle Forms/Report Objects and between Oracle Forms/Report Objects and Oracle Server Objects ( below)

Links between Oracle Forms Objects use the following types:

Link Type When is this type of link created?
Use (U) This type is generically used to describe an interaction between two objects.

For example:

  • between a Form Module and its menu module (new when there is a main menu)
Call (C)

A link of this type is created from a (popup) menu item invoking a menu to the cascading (popup) menu.

For example:

  • Between a data block item and the sequence specified in its Initial Value property.
  • Between a Form Module and the Report Modules reached through Report Objects. Please note that Report Objects in a Form Module are not saved in the Knowledge Base.
Inherit (I) A link of this type is drawn from an object created by subclassing to the source object. It is also drawn between an object and its property class and between a subclassed Module and its reference modules.
Match (X) This type of link indicates a link you have created using the Reference Pattern for Oracle Forms.
Rely On This type of link is created between a data block and the server objects used to construct it.
Access This type of link is created when there is a reference in the code to a data block item through host variable syntax (:block.item or :item).
Monitor This type of link is created between a data block relation and the data block.

Links between Oracle Report Objects use the following types:

Link Type When is this type of link created?
Call (C) This type of link is created between an object (Triggers, Formula Columns, Ref. Cursor Query, etc.) and its PL/SQL function.
Match (X) This type of link indicates a link you have created using the Reference Pattern for Oracle Forms.
Rely On This type of link is created:
  • Between a Group and the Query used to construct it.
  • Between a main/title Frame and the Group displayed.
  • Between a data link/group/column and the reference data.
Access Read This type of link is created:
  • Between a Summary Column and its Data Column.
  • Between a field/chart and the data that is displayed.
  • Between a Repeating Frame and the Group displayed.
  • Between a Frame displaying values and the Group storing these values.
  • In Oracle Reports, between the owner of the PL/SQL code having a lexical reference and the parameter/column that is referenced.
  • Between the owner of the PL/SQL code to the parameter/column that is found.

Notes

  • Links between Oracle Forms/Report Objects and Oracle Server Objects

    In objects containing PL/SQL (trigger, program unit, etc.) or SQL (data block for example) code, the links produced are the same as links between PL/SQL Server Objects.

  • In CAST Enlighten, a Library Tab in an object library is represented as a parent of an object only to help you to find it easily in Oracle Forms Builder. Links to objects in an object library are directly escalated to the object library.

JDO

The following table describes references that are detected by the analyzer and the context in which corresponding links are traced and stored in the Knowledge Base:

Link Type When is this type of link created?
PROTOTYPE For each JDO a Prototype link to the Java class that it represents.

For example - JDO file that defines the calling JDO:

<jdo>   <package name="test.empdept">      <class name="PCEmployee"            identity-type="datastore"            objectid-class="test.empdept.PCEmployee.Oid"            persistence-capable-superclass="PCPerson">         <field name="empid" persistence-modifier="persistent"/>         <field name="hiredate"/>...

Link traced between PCEmployee --P--> test.empdept.PCEmployee

INHERITS EXTENDS For each JDO an Inherits Extends link to the JDO that corresponds to the Java class (in the .jdo file if the case arises) specified as being the persistence-capable-superclass of the JDO in question.

Located in the persistence-capable-superclass attribute.

For example - JDO file that defines the calling JDO:

<jdo>   <package name="test.empdept">      <class name="PCEmployee"            identity-type="datastore"            objectid-class="test.empdept.PCEmployee.Oid"            persistence-capable-superclass="PCPerson">         <field name="empid" persistence-modifier="persistent"/>         <field name="hiredate"/>...

Link traced between PCEmployee --He--> PCPerson

MENTION For each JDO a Mention link to the JDO that corresponds to the Java class (in the .jdo file if the case arises) specified as being the instance-identification-generation class of the JDO in question.

Located in the objectid-class attribute.

For example - JDO file containing the calling definer:

<jdo>   <package name="test.empdept">      <class name="PCEmployee"            identity-type="datastore"            objectid-class="test.empdept.PCEmployee.Oid"            persistence-capable-superclass="PCPerson">

A link is traced between PCEmployee --N--> test.empdept.PCEmployee.Oid

For each field of a Java class mentioned in a .jdo file, a Mention link between the JDO and the item in the Knowledge Base that corresponds to this field. This thus allows you to carry out an Impact Analysis on the Java class fields.

Located in the <field></field> tag.

For example - JDO file containing the calling definer:

<jdo>   <package name="test.empdept">      <class name="PCEmployee"            identity-type="datastore"            objectid-class="test.empdept.PCEmployee.Oid"            persistence-capable-superclass="PCPerson">            ...         <field name="hiredate"/>         <field name="manager" persistence-modifier="persistent"/>            ...      </class>

A field with the name "manager" is searched for in the JDO implementation class. A link is traced between PCEmployee --N--> manager.

USE For each JDO - to the table or view whose "simple" name is listed among the tables selected in the Object Manager page and that corresponds to those mentioned in the .jdo file as persistence support for the JDO in question.

Located in an extension tag specific to each implementation of the JDOs.

For example - JDO file that defines the calling component:

<jdo>   <package name="test.empdept">      <class name="PCPerson"                identity-type="datastore">         <field name="firstname"/>         <field name="lastname"/>         <field name="birthdate"/>         <extension vendor-name="Triactive" key="table" value="Person"/>      </class>   </package></jdo>

Link traced between PCPerson --U--> Person (where Person is a table). The <extension> tag is used to find the table. Please note that in order for the links to be traced correctly, the following entries must be placed in the GloballySharedSettings.ini File:

[JDO Vendors]Vendor1=Triactive

and:

[JDO Keys]Triactive-TblKey=table
FIRE A Fire link will be traced between the JDO component and the methods of the class that implements this JDO component and whose names are in the following format:
  • getXXX
  • setXXX

Where XXX is the name of a field in the implementation class that is flagged in the JDO file as being "persistent".

For example - JDO file containing the calling definer:

<jdo>   <package name="test.empdept">      <class name="PCEmployee"            identity-type="datastore"            objectid-class="test.empdept.PCEmployee.Oid"            persistence-capable-superclass="PCPerson">            ...         <field name="hiredate"/>         <field name="manager" persistence-modifier="persistent"/>      ...      </class>

The links PCEmployee --F--> getManager and PCEmployee --F--> setManager are traced because the field "manager" has been flagged as "persistent".

The following image displays all links identified by the JDO Assistant:

J2EE

References that are detected by the analyzer while parsing the JSP Pages are static references (third and third phases):

Link Type

When is this type of link created? Example
MENTION This link is created for the taglib directive

The caller is the JSP File where the directive is defined.

The callee is the Tag Library identified by the "uri" attribute.

<%@ taglib uri="/examples-taglib" prefix="eg"%>
INCLUDE This link is created for the include directive.

The caller is the JSP File where the directive is defined.

The callee is a JSP File, Static File or a JSP Mapping as specified by the "file" attribute.

<%@ include file="URL"%>
INHERIT This link is used to describe object hierarchy. It is created for the page directive.

It is always enriched by the sub-type Extend (class to super-class).

The caller is the JSP File where the directive is defined.

The callee is a Java Class as specified by the "extends" attribute.

<%@ page extends="com.cast.SuperClass"%>
THROW This link is used to describe exception handling. It is created for the page directive.

The caller is the JSP File where the directive is defined.

The callee is a File (JSP or static) or a JSP Mapping as specified by the "errorPage" attribute.

<%@ page errorPage="URL"%>
ACCESS This link is used to describe run-time interactions. It may be enriched by the following sub-types:

- Read

- Write

- Forward

- Include

In the "Samples" column you will find a list of all cases when these links are created. If omitted, the caller is the JSP File where the standard or custom action is defined.

Read <jsp:getProperty name="clock" property="dayOfMonth"/>
The callee is the Bean Property as specified by the "property" attribute.
Write <jsp:setProperty name="clock" property="dayOfMonth" value="13"/>
The callee is the Bean Property as specified by the "property" attribute.>

<eg:foo attr1="value"/>
The callee is the Tag Attribute as specified by the name of an attribute of the  custom action.

Forward <jsp:forward page="URL"/>
The callee is a File (JSP or static) or a JSP Mapping.

Definition of a servlet mapping: the caller is the Servlet Mapping and the callee is the associated Servlet.

Definition of a property mapping: the caller is the Property Mapping and the callee is a File (JSP or static), a JSP Mapping or a Java Type.

Include <jsp:include page="file"/>
The callee is a File (JSP or static) or a JSP Mapping.
RELY ON This link is used to describe typing.

Caller uses callee to define its Java type. Callee always refers to a class or interface.

In our case the caller is a Bean and the callee is its class as specified by either "class" or "beanName" attribute.

Note that for all beans created from a XML Configuration file, a link of this type is automatically created.

<jsp:useBean id="clock" class="beans.clockBean" ... />
USE This link is created for the jsp:useBean standard action. 

The caller is the JSP File where the action is defined.

The callee is a Bean as specified by the "id" attribute.

This type is also used for dynamic link resolution. It covers server side objects referencing.

<jsp:useBean id="clock" class="beans.clockBean" ... />
PROTOTYPE This link is used as follows:

Servlet: between the servlet component and its servlet class or JSP File as specified in the application descriptor via "servlet-class" or "jsp-file" XML element.

Custom Tag: between the tag object and its class or tei-class as specified in the tag library descriptor via "tag-class" and "tei-class" xml elements.

<servlet>
<servlet-class>servlets.FooServlet</servlet-class>
</servlet>
or
<servlet>
<jsp-file>/jsp/servlets/file.jsp</jsp-file>
</servlet>
 
<tag>
     <name>foo</name>
     <tag-class>tags.FooTag</tag-class>
     <tei-class>tags.FooTagExtraInfo</tei-class>
</tag>
USER DEFINED These links are entirely specified by the user in the application's additional XML configuration files. 

Users can use the following string values to specifiy the link type:

access (Access), call (Call), catch (Catch), fire (Fire), include (Include), inherit (Inherit), issonof (Is Son Of), lock (Lock ), mention (Mention), prototype (Prototype), raise (Raise), refer (Refer), relyon (Rely On), throw (Throw) or use (Use).

The following table shows a non exhaustive list of these types of links:

Caller Callee
XML Configuration File - Java Type (class or interface)
- Java Method

- JSP Mapping

- File (JSP or static)

- Bean

Action Mapping - Java Type (class or interface)

- JSP Mapping

- File (JSP or static)

- Bean

-
ESCALATED When two objects are linked via a third object. Denoted by the square brackets around the link type in CAST Enlighten: [U]
INTERNAL ESCALATED Created when the calling object is not saved in the CAST Knowledge Base (i.e. a variable that is local to a function). As a result the analyzer will save the link and associate it with the parent of the calling object. Denoted by the curly brackets (or braces) around the link type in CAST Enlighten: {U}

References that are detected by the analyzer while parsing the JSP page implementation class and/or Tag Handlers are dynamic references (fifth phase):

For the dynamic references which are issued from a grep or have the caller located in a JSP script element as a declaration, expression or scriplet, a static link will be created. This new link has almost the same properties as the dynamic link, however the caller can be different. For example, when an object is located in an included file we will have a dynamic reference from the _jspService function of the JSP Page (resp. doTag method of a Tag File) and the object and a static reference from the included JSP File (resp. Tag File) and the object.

Note that the main function of the generated servlet/handler class is a pure dynamic object. So, it cannot have static references and we will create them at the function's parent (JSP Page/Tag File) level. 

The following table summarizes the process of creation of the static links using the dynamic links while parsing generated servlet classes ('Dynamic Caller' are replace by 'Static caller'):

Caller: Dynamic Object Link code located in Caller: Static Object
_jspService JSP page JSP page
_jspService JSP page JSP page
servlet class JSP page JSP page
servlet class JSP File (included file) JSP File (included file)
caller JSP Page or JSP File (included file) JSP Page or JSP File (included file)

Code sample

file a.jsp 

<%! String redirectA; %>
<% redirectA = "/jsp/fileA.jsp"; %>

file a.jsp 

<%@ include file="included.jsp"%>

 

file included.jsp

<%! String includedA; %>
<% includedA = "/jsp/fileA.jsp"; %>

References detected by the analyzer when carrying out a pure Java analysis (second phase):

Link type When is this type of link created? Example
MENTION This link is traced on following expressions:

- "instance of" operator

- cast expression

- class literal

- this literal

- class creation

- array creation

Callee always refers to a class or interface.

- if (b instanceof A . class) ...

- A . this = 1;

- B b = (B) new A(1);

- B b [] = new A[5];

THROW, RAISE, CATCH These links are used to describe exception handling.
  • Throw link is traced on "throws" clause of method declaration towards exceptions possibly raised by the method. 
  • Raise link is traced on "throw" statement towards type of the exception actually thrown by the method.
  • Catch link is traced on "try" statement towards type of the exception parameter declared in catch clause(s).

Callee always refers to a class.

- void f () throws C1 {...}

- throw new Exception()

- try {...}
catch (Throwable e) {...)

RELY ON This link is used to describe typing. 

Caller uses callee to define its Java type.

Callee always refers to a class or interface.

- void f (A a) {...}

- A a [] = null;

ACCESS This link is used to describe run-time interactions.

It may be enriched by the following sub-types:

- Read

- Write

- Exec

- Member

- Array

- return x

- x = 1

- x++

- x[1] = 2

- x[] = {1,2}

- f(1)

- x.toString()

- x.f()

- x.y = 1

- read

- write

- read and write

- array not read

- read

- exec

- member

- member on x ; exec on f

- member on x ;write on y

INHERIT This link is used to describe object hierarchy. It may be enriched by the following sub-types:

- Extend:

  • class to super-class
  • interface to super-interface

- Implement:

  • class to super-interface(s)

Caller and callee always refer to classes or interfaces.

By extension the Inherit link is also used to describe method overriding as directly related to inheritance. In this case exclusive sub-types are available:

- Hide: for static methods;

- Override: for instance methods; in addition link can be enriched by the Implement sub-type if overriding is from a non abstract overriding method to an abstract overridden one.

Caller and callee always refer to methods.

- class C1 extends C2 implements I {...}

- interface I1 extends implements I2
{...}

USE This type is reserved for dynamic link resolution. It covers server side objects referencing:

- Select

- Insert

- Update

- Delete

-
PROTOTYPE This link is reserved for J2EE components' support and is used as follows:
  • Applet: between the applet component and its applet class.

Caller and callee always refer to a component and to a class or interface.

-

Notes

  • "Exec access" links can be thought of as invocation calls.
  • To avoid redundancy with a corresponding escalated link, a "member access" link is not traced on a qualifier if this one matches the member parent. 
  • "Prototype" links are never escalated.

Mainframe

Cobol
Link Type Linked Objects Code Example
Calling Called
CALL PROG* Program, section or copybook Program or entrypoint CALL "CC2DISPLAY"
TRANSAC* EXEC CICS XCTL PROGRAM(TEST)
END EXEC
PERFORM Program,  section or sub-object Section or paragraph MODULE-ENTREE SECTION.
*
* LA LIGNE CI DESSOUS DOIT ETRE DELETEE APRES LES TESTS *
MOVE '*** EXECUTION STARTEE NORMALEMENT ***' TO MESS.
DISPLAY MESS.
MOVE SPACE TO MESS.
*
PERFORM LECTURE-PARAM.
*
FIN-MODULE-ENTREE. EXIT.
EJECT *
COPY SYBPINIT.
GOTO Program First  executed section or paragraph ****************
LECTURE-PARAM SECTION.
****************
*
 READ MEF001.
     IF FILE-STATUS NOT = '00'
       DISPLAY 'CODE RETOUR' FILE-STATUS        DISPLAY 'CARTE PARAMETRE INEXISTANTE : ' CODE-ABEND        GO TO SORTIE-ERREUR
     END-IF.
*
Section First executed paragraph in section
Paragraph Next executed paragraph  in same section
INCLUDE Program or Copybook Copybook * -ACDA * MNPW * * * * * * * * * * * * * * * * * * * * * * * * *
* FD DU FICHIER INF103 PAR LE CHEMIN INF103
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
     BLOCK CONTAINS 0.
*
     COPY INF103 REPLACING INF103 BY ING103.
USE Calls to matched character strings Display "a string"
  • Cobol Program
  • Cobol Section
  • Cobol Paragraph
Program Specification Block EXEC DLI SCH PSB (MYPSB) END-EXEC
ACCESS

For more information about Access type links, see JCL links below.

OPEN
  • Cobol Program or sub-object
  • Cobol File Link
  • Cobol Data Link
*========================================================  * OUVERTURE DU FICHIER IAHCDECE  *========================================================    OPEN-IAHCDECE. 
          OPEN INPUT IAHCDECE.  *========================================================  * LECTURES DU FICHIER IAHCDECE  *========================================================    LECT-IAHCDECE.  
     READ IAHCDECE
.  *========================================================  * FERMETURE DU FICHIER IAHCDECE  *========================================================    CLOSE-IAHCDECE.
      CLOSE IAHCDECE.

*========================================================  * LECTURE-SEGMENT-CISRAPMP *========================================================
             EXEC DLI                         
          GU                          
          USING                       
          PCB     (3)                 
          SEGMENT (CISRAPMP)          
          WHERE   (CIOEAX = IN-PREM-H)
          INTO    (WS-DUMMY-AREA)     
     END-EXEC.

*========================================================
 COMMANDE-CALL-LEVEL *========================================================
             CALL 'CBLTDLI' USING GU                                                       CICSDLI-PCB
                                                      CICSDLI-SEGM                                                       CICSDLI-QSSA

CLOSE
READ
  • Cobol Program or sub-object
  • Cobol Section
  • Cobol Paragraph
  • Cobol File Link
  • Cobol Data Link
  • Constant Data
  • Structured Data
  • Data
  • Conditional Test
  • Program Communication Block (IMS PCB)
  • IMS Segment
WRITE

For Embedded SQL links, the following are valid for all servers.

USE SELECT This type is reserved for server side object referencing EXEC SQL... SELECT
UPDATE EXEC SQL... UPDATE
INSERT EXEC SQL... INSERT
DELETE EXEC SQL... DELETE
CALL EXEC SQL... CAL

* For link types CALL PROG and CALL TRANSAC, two limitations exist when the call is in "string" form:

  • If the string is constant and declared in the "data-division" section, the entry point will be resolved in the normal way.
  • If the string is dynamic, the program may be found by the Dynamic Link Manager.

In addition, the following Embedded SQL links are valid for DB2 only:

DEPEND ON This type is reserved for server side object referencing on structured or distinct UDTs. -
DDL CREATE This type is reserved for server side object referencing on Tables -
DDL DROP

Notes

  • Please note that SQL code reading on DB2 servers is not valid for SQL Mainframe. Instead it is analyzed in the same way as SQL DB2-UDB.
JCL
Type Linked Objects
Calling Called
ACCESS WRITE JCL Step JCL Data Set
READ
EXECUTE
PROTOTYPE Cobol File Link JCL Data Set
Cobol Data Link JCL Data Set
JCL Data Set Cobol JCL Program
CALL JCL Step Cobol JCL Program
USE JCL Step IMS DBD
IMS
Type Linked Objects
Calling Called
ACCESS WRITE IMS PC Block IMS Segment
USE IMS PC Block IMS DBD or IMS GSAM File
CICS
Type Linked Objects
Calling Called
CALL TRANSAC CICS Transid Client/Cobol Program

For Transactional Code, the following are valid:

Type Linked Objects When does this link occur?
Calling Called
CALL TRANSAC Client/Cobol Program or its Sub object Client/Cobol Program

EXEC CICS XCTL  PROGRAM(TEST)
END EXEC

or

EXEC CICS LINK  PROGRAM(TEST)
END EXEC

CALL TRANSAC Client/Cobol Program or its Sub object CICS Transaction

EXEC CICS START 
 TRANSID(TRANSID)
END EXEC

or

EXEC CICS RETURN    TRANSID (W-XFR-CTRS)
   COMMAREA (W-CIC-CMA-LDON)
   LENGTH (W-CIC-CMA-QLENDON)
END-EXEC

MONITOR Client/Cobol Program or its Sub object CICS Map EXEC CICS 
   SEND MAP (W-CIC-CMAPCUR)
 MAPSET (W-CIC-CMPSCUR)
 FROM (MGAB10O)
 ERASE  FREEKB  FRSET  CURSOR END-EXEC

or

EXEC CICS 
   RECEIVE MAP (W-CIC-CMAPCUR)
  MAPSET (W-CIC-CMPSCUR)
 FROM (MGAB10O)
END-EXEC

ACCESS OPEN

CLOSE

READ

WRITE

Client/Cobol Program or its Sub object CICS Dataset ENDBR, DELETE, LINK, READ, READNEXT, READPREV, REWRITE, STARTBR, XCTL, WRITE

ex:

EXEC CICS 
   READ DATASET ('C1MASTR') 
   INTO (BLKBLK(BLKBLK-OCUR)) 
   RIDFLD (CICS-RRN) RRN 
RESP (WS-RESP) END-EXEC.

READ

WRITE

Client/Cobol Program or its Sub object CICS Transient Data DELETEQ, READQ, WRITEQ

ex: 

EXEC CICS DELETEQ TD QUEUE (W-CIC-TSQ-LNOM)

.NET (Legacy)

The following table describes references that are detected by the .NET Analyzer specifically for ASP.NET and the context in which corresponding links are traced and stored in the Knowledge Base:

Link Type When is this type of link created?
ACCESS
EXEC
public class Class1{   public Class1() {}   public void SayHello()   {      Console.WriteLine("Hello world !");   }   public void Speak()   {      SayHello();   }}

READ
public class Class1{   public Class1()   {   }   private string _member;   public string Member   {      get { return _member; }   }}

WRITE
public class Class1{   public Class1() {}   private string _member;   public string Member   {      set { _member = value; }   }}

INHERIT EXTEND
public class Class2{   virtual public void DoNothing() {}}public class Class1 : Class2{   public Class1() {}}

HIDE
public class Class2{   virtual public void DoNothing() {}}public class Class1 : Class2{   public Class1() {}   new public void DoNothing() {}}

IMPLEMENTS
public interface Interface1{   int GetZero();}public class Class1 : Interface1{   public Class1() {}   public int GetZero()   {      return 0;   }}

OVERRIDE
public class Class2{   virtual public string GetClassName()   {      return "Class2";   }}public class Class1 : Class2{   public Class1() {}   override public string GetClassName()   {      return "Class1";   }}

RELY ON
public class Class1{   public Class1()   {   }   private LazyClass _lazy_member;}

RELY ON INSTANCE OF This link type is created between an anonymous function (.NET Method) and its delegate type.
CATCH For exception management the Catch link is created for links issued from a catch type exception.
RAISE For exception management the Raise link is created for links issued from a throw type exception.
CALL -

.NET (New)

Analyzer

The following table is a matrix of link types created between object types by the analyzer:

Caller → Called↓ Class Constant Delegate Enumeration Enumeration Item Event Event Addon Event Removeon Field Finalizer Generic class Generic method Generic property Indexer Interface Method Namespace Operator Property Property Set Property Get Static Constructor Structure
Class Inherit - - - - - - - - - Inherit - - - Inherit - - - - - - - -
Constant Rely On - - Rely On - - - - - - - - - - - - - - - - - - -
Delegate Rely On Access Read Access Exec Rely On Access Read - Access Exec Access Exec Access Read Write - Rely On Access Exec Access Read Write Access Rely On Access Exec - Access Access Read Write Access Exec Access Exec Access Exec Rely On
Enumeration - - - - - - - - - - - - - - - - - - - - - - -
Enumeration Item - - - - - - - - - - - - - - - - - - - - - - -
Event Rely On Access Read Access Exec Rely On Access Read - Access Exec Access Exec Access Read Write - Rely On Access Exec Access Read Write Access Rely On Access Exec - Access Access Read Write Access Exec Access Exec Access Exec Rely On
Event Addon - - - - - ?? - - - - - - - - - - - - - - - - -
Event Removeon - - - - - ?? - - - - - - - - - - - - - - - - -
Field Rely On - - Rely On - - - - - - Rely On - - - - - - - - - - - Rely On
File - - - - - - - - - - - - - - - - Using Namespace - - - - - -
Finalizer Rely On Access Read Access Exec Rely On Access Read - Access Exec Access Exec Access Read Write - Rely On Access Exec Access Read Write Access Rely On Access Exec - Access Access Read Write Access Exec Access Exec Access Exec Rely On
Generic class Inherit - - - - - - - - - Inherit - - - Inherit - - - - - - - -
Generic method Rely On or Throw or Catch
 
Access Read Access Exec Rely On Access Read - Access Exec Access Exec Access Read Write - Rely On Access Exec Access Read Write Access Rely On Access Exec - Access Access Read Write Access Exec Access Exec Access Exec Rely On
Generic property - - - - - - - - - - - - - - - - - - - - - - -
Indexer Rely On Access Read Access Exec Rely On Access Read - Access Exec Access Exec Access Read Write - Rely On Access Exec Access Read Write Access Rely On Access Exec - Access Access Read Write Access Exec Access Exec Access Exec Rely On
Interface - - - - - - - - - - - - - - Inherit - - - - - - - -
Method Rely On or Throw or Catch Access Read Access Exec Rely On Access Read - Access Exec Access Exec Access Read Write - Rely On Access Exec or Override Access Read Write Access Rely On Access Exec or Override - Access Access Read Write Access Exec Access Exec Access Exec Rely On
Namespace - - - - - - - - - - - - - - - - Using Namespace
Set at the file level
 
- - - - - -
Operator Rely On Access Read Access Exec Rely On Access Read - Access Exec Access Exec Access Read Write - Rely On Access Exec Access Read Write Access Rely On Access Exec - Access Access Read Write Access Exec Access Exec Access Exec Rely On
Property Rely On - - - - - - - - - - - - - - - - - - - - - -
Property Get Rely On Access Read Access Exec Rely On Access Read - Access Exec Access Exec Access Read Write - Rely On Access Exec Access Read Write Access Rely On Access Exec - Access Access Read Write Access Exec Access Exec Access Exec Rely On
Property Set Rely On Access Read Access Exec Rely On Access Read - Access Exec Access Exec Access Read Write - Rely On Access Exec Access Read Write Access Rely On Access Exec - Access Access Read Write Access Exec Access Exec Access Exec Rely On
Static Constructor Rely On Access Read Access Exec Rely On Access Read - Access Exec Access Exec Access Read Write - Rely On Access Exec Access Read Write Access Rely On Access Exec - Access Access Read Write Access Exec Access Exec Access Exec Rely On
Structure - - - - - - - - - - - - - - - - - - - - - - -

Link Resolution

Function Overloading

In the case of overloading, resolution is limited to the number of arguments and obvious types (int compare to string for example). However in some cases evaluation of the call does not permit the creation of the correct link. In this case, all possible links will be created:

Sample: A class with two methods (of the same name) that both take a parameter: of type int for the first method, and of type float for the second method.

Overloaded Operators

Not supported

Polymorphism

Because the Inference Engine is not implemented in this Beta, links toward class methods are created to the apparent type of the object, not the true type. For example (code that generates the link is in bold):

Type Of Link Code
Access Exec public class Class1 {
public void SayHello() { Console.WriteLine("Hello world"); }
public void Speak() { SayHello(); }
}
Access Read public class Class1 {
private string _member;
public string Member 
{ get { return _member; } }
}
Inherit and Override public class Class2
{
   virtual public string GetClassName()
   {
      return "Class2";
   }
}

public class Class1 : Class2
{
   public Class1() {}
   override public string GetClassName()
   {
      return "Class1";
   }
}
Rely On public class LazyClass
{
}

 public class Class1
{
   private LazyClass _lazy_member;
}

Link Creation

Links are identified whatever the construction. For example, if there is a call like Method1().Method2() (where Method1() returns a class that contains a public method Method2(), both links toward Method1() and Method2() are resolved.

Implicit Links

Implicit links are not created, as such the following will be used:

  • lock(object) => Mention link toward "object"
  • using (Type var = new Type() ) => Rely On link toward "Type"
  • foreach( ElementType element in collection) => Mention link toward "collection"

Link Bookmarks

Bookmarks on links are created on the object name  - arguments are not taken into account. So for a call like myfunction(param1, param2), the bookmark is set on myfunction. The same is true for function calls from a class. So in a case like a.b.myfunction(param1), the bookmark is set on myfunction. For Generics the same applies but as parameters are parts on the object name (generic instantiation) they are part of the bookmark. So for a call like A<int> the bookmark is set on A<int>.

Caller → Called↓ Applet COM Object File HTC Class HTC Event HTML Event HTC Method HTC Property JS Server method JS Server variable JS Client method JS Client variable VBS Server class VBS Server function/sub VBS Server variable VBS Server const VBS Client class VBS Client function/sub VBS Client variable VBS Client const
Applet - - - - - - - - - - - - - - - - - - - -
COM Object - - - - - - - - - - - - - - - - - - - -
File Use Use Include - - - - - - - - - - - - - - - - -
HTC Class - - - - - - - - - - - - - - - - - - - -
HTC Event - - - - - - Call - - - - - - - - - - - - -
HTC Method - - - - - - Call Access - - - - - - - - - - - -
HTC Property - - - - - - Access - - - - - - - - - - - - -
HTML Event - - - - - - - - - - Call - - - - - - Call - -
JS Server method - Mention - - - - - - Access Exec Access Read Write - - - - - - - - - -
JS Server variable - Instance Of - - - - - - - - - - - - - - - - - -
JS Client method Use Mention - - - - - - - - Call Use - - - - - - - -
JS Client variable - Instance Of - - - - - - - - - - - - - - - - - -
VBS Server class - - - - - - - - - - - - - - - - - - - -
VBS Server function/sub - Mention - - - - - - - - - - Rely On Access Exec Access Read Write Access Read - - - -
VBS Server variable - Instance Of - - - - - - - - - - Mention - - - - - - -
VBS Server const - Instance Of - - - - - - - - - - - - - - - - - -
VBS Client class - - - - - - - - - - - - - - - - - - - -
VBS Client function/sub Use Mention - - - - - - - - - - - - - - Mention Call Use Use
VBS Client variable - Instance Of - - - - - - - - - - - - - - Mention - - -
VBS Client const - Instance Of - - - - - - - - - - - - - - - - - -

The following tables list some examples of how links have been created:

USE

TypLib <!-- METADATA TYPE = "TypeLib" FILE = "TypLibFileName" -->
Applet <APPLET CODE = "AppletCode" CODEBASE = "AppletCodeBase" >
ActiveX through a variable x = new ActiveXObject("A.B")
function f()
{
   x.Method()

Use link between f and A.B
Dynamic data source <OBJECT id = id_obj classid = "clsid:Sample"></OBJECT>
<A DATASRC=#id_obj datafld = "url" id=id_a>

Use link between id_a and id_obj
Database object <SCRIPT>
   ExecuteSQL("select * from authors")
</SCRIPT>
MAP <img src="images/cover.jpg" border=0 usemap="#covermap" ismap id=id_img>
<map name="covermap">
<area shape=rect href="whatis.htm" coords="0,0,315,198">
<area shape=rect href="signup.asp" coords="0,198,230,296">
<area shape=rect href="holdings.asp" coords="229,195,449,296">
<area shape=rect href="question.htm" coords="314,0,449,196">
</map>

MENTION

Indicates the area in which the ActiveX is mentioned function f()
{
   return CreateObject("A.B")
}

Mention link between f and A.B
Indicates the area in which the class name is mentioned function f()
{
   return new g()
}

Mention link between f and g

INCLUDE

Indicates the inclusion of a file <SCRIPT LANGUAGE = "JavaScript" src="inc.js" >
</SCRIPT>

CALL

Indicates a call to a file <A href="called_file.htm" ></A>
<SCRIPT LANGUAGE = JavaScript>
   window.open("called_file.htm")
</SCRIPT>
Indicates a function call <SCRIPT>
function f()
{
   return 1;
}
function g()
{
   return f()
}
</SCRIPT> Call link between g and f

ACCESS

Indicates a access type link enters a property of an HTC component together with the associated PUT or GET function. <PUBLIC:PROPERTY NAME="xmlData"
ID="xmlDataID" GET="getxmlData" PUT="putxmlData"/> ACCESS link betwee xmlData and the getxmlData and putxmlData functions.

ACCESS and READ

Read only access to a file <!--#FLASTMODE FILE = "accessed_file.htm">
Read only access to a variable <SCRIPT>
function f()
{
   y=x
}
</SCRIPT> Read only access between f and x

ACCESS and WRITE

Read and write access to a variable <SCRIPT>
function f()
{
   y=x
}
</SCRIPT> Read and write access between f and y

REFER

Indicates that a variable refers to another variable <SCRIPT>
   x = new ActiveXObject("A.B")
   Application("y")=x
</SCRIPT> Refer link between Application("y") and x

RELY ON and INSTANCE OF

Indicates that a variable is an instance of a class <SCRIPT>
   x=new ActiveXObject("A.B")
</SCRIPT> INSTANCE_OF link between x and A.B

PB

Client/Client
Link Type  When is this type of link created?
Access - Read Caller: Code object - fct, Event...

Callee: Variable (instance, shared or global)

Eg.:

if a = 2 then...endif
- Write Caller: Code object - fct, Event...

Callee: Variable (instance, shared or global)

Eg.:

a = 2
- Exec Caller: Code objetc - fct, Event...

Callee: Fct, Evt, Global Fct

Eg.:

a.f()

Please note that when a window is opened (open(w1) for example), there will be an Access Read on w1

- Member Caller: Code object - fct, Event...

Callee: Variable (instance, shared or global)

Eg.:

a.b = 2

(member on a and write on b)

- Array Caller: Code object - fct, Event...

Callee: Variable (instance, shared or global)

Eg.:

A[5].b = 2 

(array on a and write on b)

Prototype - When declaring an external function in an object and the function in a DLL that implements it.
Use

- Select

- Insert

- Delete

- Update

- When the property of an object references a datawindow.

Inherit - When there is inheritance between controls, user objects, menus, and windows.

In the following example, the window "w_gui_authors2" inherits from "w_gui_authors":

Mention - During the creation of a class.

The callee is always a class: (W,App,UO,M,Struct) 

Eg.:

a = Create UO
Rely On

- This link is displayed when there is a link between a variable and a type. When the link is on a local type variable, the link will then be escalated internally.

Eg.:

w1 var
Client/Server
Type of Link Where is this type of link created? When is this type of link created?
Use():

- Select

- Insert

- Delete

- Update

Embedded SQL -
Datawindow - Link between Datawindow and table (or view) with PB SELECT
- Link between Datawindow and table (or view) with SQL Select
Dynamic SQL - Link found by the inference engine
Prototype RPC

Declare Procedure

Declare Cursor

- Link between the logical object corresponding to the logical name in PB and the server object.
Call Datawindow - Link between Datawindow and Procedure (or sub object in Oracle)
Dynamic SQL - Link found by the inference engine for server functions or procedures
Use Dynamic SQL - in dynamic SQL character strings.

Note about Dynamic SQL links found by the inference engine

When the inference engine perceives that a string is an SQL string, then this string will not be passed through the Grep search.

Note about C/S links found by the inference engine

When the inference engine finds a C/S link, the analyzer will place the link at the level of the object that contains the string and not at the level of the exec. There is various information about these links:

  • STRING: Concatenated SQL string
  • CONCATENATION: Compete, partial or not at all. This will enable you to find out whether the inference engine has managed to  concatenate the SQL string.
  • EXECUTED IN: This is the qualified name of the object that contains the SQL exe.
  • STRING BUILD IN OBJECTS: a list of qualified names of objects that have participated in the construction of the SQL string. The number of objects is limited to 10.

    For example:

    * STRING = DELETE FROM authors WHERE authors.au_lname = (SELECT discounts.stor_id  FROM discounts  WHERE discounts.stor_id = '2')

    *CONCATENATION = COMPLETE

    *EXECUTED IN = w1.fct3(Line1,Col51)

    *STRING BUILT IN OBJECTS = typelnk.open ; w1.fct1

Note about links found by the inference engine for virtual functions

For virtual functions, the link is found on the function call. For the link, information will be added about the location of the "create".

E.g.:

STATEMENT "CREATE" IN OBJECT(S) : w_dessin.wof_aire(Line=4,Col=2)

Information about other C/C links found by the inference engine (TiggerEVent, Open etc...)

There is one link at the string level. The inference engine will gather and store the following information:

  • EXECUTED IN OBJECT - the location of the TriggerEVent
    E.g.: EXECUTED IN OBJECT : w_macro.of_f

PL/SQL

The following table describes references that are detected by the analyzer and the context in which corresponding links are traced and stored in the Knowledge Base:

Link type When is this link created?
USE

This link is traced on a table or a view for Insert, Update, Delete or Select.

Here is a sample:

Create Function MYFUNCTION (Param1 IN Varchar2) Return Integer IsLocal_Id    Integer;Begin   select ID into Local_Id    from MyTable   where COL1 = Param1;   return Local_Id;End;

FIRE

This link is traced from a table to a trigger for Before, After, Instead of, For each row, For all row, Insert, Update, Delete or Select.

Here is a sample:

Create Trigger MYTRIGGER Before Delete On MYTABLE Begin   null;End;

ACCESS

This link is traced on a sequence, a cursor or a variable for Exec, Read or Write.

Here is a sample:

Create Procedure MYPROC (Param1 IN Varchar2,Param2 IN Varchar2)IsBegin   insert into MYTABLE (id,col1,col2)    values (MYSEQUENCE.NEXTVAL, Param1, Param2);End;

DDL

This link is traced from a PL/SQL script object to every child object of a schema for Create, Alter, Replace, Drop, Select, Update, Delete or Insert.

Here is a sample:

Create Table MYTABLE (ID VARCHAR2(11) NOT NULL ,COL1 VARCHAR2(40) NOT NULL ,COL2 VARCHAR2(20) NOT NULL ,)/

(Only for PL/SQL Script Analyzer)

REFER

For: No action, Cascade, Insert, Update, Delete.

Here is a sample:

Create Table TABLE1(   NAME VARCHAR2(30) NOT NULL ,   IDSRV NUMBER NOT NULL ,   FORNAME CHAR(30) NOT NULL ,   Primary Key ( NAME ) )Create Table TABLE2(   ID VARCHAR2(30) NULL ,   CLI VARCHAR2(30) NULL ,   References TABLE1 ( NAME ) )

RELY ON

This link is traced from a synonym on the target object, from a table to an index or traced from an object to a referenced type or a column type of a table (with %TYPE) (in this case "IsInstance of" is set) for Is instance of.

Here is a sample:

Create Procedure MYPROC IsMyVal     MyType;Begin    null;End;

CALL

Procedure or function call

Here is a sample:

Create Procedure MYPROC2 IsBegin   MYPROC('string1','string2');End;

JOIN

Join between two tables or views Join links are detected by analysing objects having source code (functions, procedures, package bodies, triggers, views)

Here is a sample:

Create Procedure MYPROC_JOIN Is  lid int;Begin  select t1.id into lid    from table_1 t1, table_2 t2    where t1.id = t2.id;End;

GO_THROUGH

Go_Through link is used to show calls using a DB-link

Here is a sample:

Create Procedure MYPROC_DBLINK IsBegin  MYREMOTESCHEMA.MYREMOTEPROC@DBLINK.DOMAIN(0, 'string1'); End;

SSIS & SSRS

  • Escalated
  • Use
    • Insert
    • Update
    • Delete
    • Select
  • Belong To
  • Call (for links to server-side Stored Procedures and web service objects)

TIBCO

  • Call (C) to activities and processes
  • Inherit (H) to classes
  • Belong To (B) for parent/child relationships

T-SQL

The following table describes references that are detected by the analyzer and the context in which corresponding links are traced and stored in the Knowledge Base:

Link Type(s) Relational Statements Description / Remark Ex. #
C or Call EXECUTE [@var=] <procedure> ...

EXECUTE [@var=] <scalar-function> ...

INSERT ... EXECUTE [@var=] <procedure>

Scalar-function calls in expressions

Occurs when an object calls a procedure, or a user-defined scalar function.

Occurs when an expression involves a scalar function call.

Notes:
ODBC CALL and FN escape sequences are recognized.
No links are drawn towards built-in scalar functions (as cos, left, etc.).

Ex. 1
C or Call DECLARE @obj_name varchar(...)

...statements defining the value(s) of @obj_name

EXECUTE [@var=] @obj_name ...

If the option Use inference engine is set, the analyzer will try to compute names of the callable procedures (or user-defined scalar functions), according to the values that @obj_name can take, taking parts of the control and data flows into account.

Links of type "call" will go from objects setting names of called objects towards these latter called objects.

Ex. 2
Fiuda or Fire(insert,update,delete, after)

Fiudn or Fire(insert,update,delete, insead of)

CREATE TRIGGER <trigger> ON <table>/<view> ... FOR/AFTER, INSTEAD OF INSERT,UPDATE,DELETE ... The type of link going from a monitored table (or view) towards one of its monitoring triggers depends on whether it fires "after" (or "for"), or "instead of" the triggering SQL statement(s), and on the triggering SQL statement(s) themselves. -
Us or Use(select) SELECT/DELETE/UPDATE ... FROM <table> ...

SELECT/DELETE/UPDATE ... FROM <view> ...

SELECT/DELETE/UPDATE ... FROM <table-function> ...

Occurs when an object performs a SELECT on a table, a view or a user-defined table-valued function.

Occurs when the FROM clause of a DELETE statement, an UPDATE statement, or of a subquery, selects data from a table, a view or a user-defined table-valued function.

No links are drawn towards built-in table-valued functions (prefixed by "::").

Ex. 3
Uu or Use(update) UPDATE <table> ...

UPDATE <view> ...

UPDATE <table-function> ...

  Ex. 4
Ui or Use(insert) INSERT [INTO] <table> ...

INSERT [INTO] <view> ...

INSERT [INTO] <table-function> ...

BULK INSERT <table> FROM ...

Both INSERT and BULK INSERT issue the same link type. Ex. 5
UiDc or Use(insert)+DDL(create) SELECT ... INTO <table> ... The link towards the table will be recorded in the Knowledge Base only if the table exists at the moment the analysis is performed. Ex. 6
Ud or Use(delete) DELETE [FROM] <table> ...

DELETE [FROM] <view> ...

DELETE [FROM] <table-function>

TRUNCATE TABLE <table> ...

Occurs when an object performs a DELETE on a table, a view, a table-valued function, or when an object performs a TRUNCATE TABLE on a table.

Both commands issue the same link type.

Ex. 7
C or Call

Usuid or Use(select,update,etc.)
N or Mention

EXECUTE( 'T-SQL statement' )

or

DECLARE @tsql_statement varchar(...)
...statements defining the value(s) of @tsql_statement EXECUTE( @tsql_statement )

If the option Use inference engine is set, the analyzer will try to compute what the dynamically executed query will be according to the values that @tsql_statement can take, taking part of the control and data flows into account. 

Links of type "call", "use" or "mention" will refer each object involved in the set of queries, where origins of these links will be the objects into which parts of the set of queries have been set.

Links of type "call", "use", or "mention" will go from objects setting names of called/used objects in the built query towards these latter called/used objects.

Ex. 8
O or Rely on (none)    
N or Mention OPENXML ... WITH <table>

CREATE STATISTICS ... ON <table>/<view> ...

UPDATE STATISTICS <table>/<view>(<stats>) ...

DROP STATISTICS <table>/<view>.<stats>

SET IDENTITY_INSERT <table> ON/OFF

OPENXML ... WITH is taken into account as a relational statement involving the table whose name appears after "WITH"; whereas OPENXML with a schema declaration does not produce any link. Ex. 9
N or Mention Call of one of the following procedures:
-sp_help 
-sp_bindefault 
-sp_unbindefault 
-sp_bindrule 
-sp_unbindrule 
-sp_primarykey 
-sp_foreignkey 
-sp_commonkey 
-sp_fulltext_column -sp_fulltext_table 
-sp_rename 
According to what sp_xxx is called, the analyzer tries to find whether one or several arguments correspond to names of procedures, tables, views, triggers or functions. Each time a match is found, a link towards the corresponding object is produced.

Example:
EXEC sp_rename @objname='<obj_name1>' , @newname='<obj_name2>', @objtype = 'OBJECT'
=> will produce 1 or 2 links, according to whether the named objects exist as procedures, tables, views, triggers or functions, at the moment the analysis is performed. If @objtype would have been 'DATABASE', no link would have been created.

-
N or Mention GRANT ..., DENY ..., REVOKE ... Wherever the name of a procedure, table, view, trigger or function appears in such orders, a link towards that object is produced. Ex. 10
N or Mention

O or Rely on

Rndcuc or Refer(no action, on delete cascade, on update cascade)

CREATE ... INDEX <index> ON <table>/<view> ...

DROP INDEX <table>.<index>

REORG ... <table> [ <index> ] ...

... FOREIGN KEY ... REFERENCES ...

During the parsing steps, analysis of CREATE/DROP INDEX, or of REORG, only produces a link towards the table/view and does not produce any link towards the index.

During the importation of tables and views into the Knowledge Base, the examination of the SQL Server system catalog produces:
-links of type "Rely On", going from a table (or from a view) towards its indexes -links of type "Refer", going from a FK-object to a PK-object, corresponding to referential integrity constraints (this type is enriched with "no action", "on delete cascade", "on update cascade" according to the cascading option(s) set at the constraint level).

Ex. 11
N or Mention ALTER TABLE <table> ENABLE/DISABLE TRIGGER ALL

ALTER TABLE <table> ENABLE/DISABLE TRIGGER <trigger> ...

If "ALL" is specified, a link will be produced towards each trigger monitoring the table; if trigger names are specified instead, a link will be produced towards each of these triggers. Ex. 12
N or Mention DBCC BUFFER, CHECKCONSTRAINTS, CHECKIDENT, CHECKTABLE, CLEANTABLE, DBREINDEX, DES, IND, INDEXDEFRAG, PINTABLE, PROCBUF, SHOW_STATISTICS, SHOWCONTIG, TEXTALLOC, UPDATEUSAGE, CHECKTABLE, FIX_TEXT, INDEXALLOC, OBJECT_ATTS, REBUILD_TEXT, REINDEX, TABLEALLOC, TUNE( <object> ) According to what DBCC commands are invoked, the analyzer tries to find whether the commands' arguments correspond to names of existing procedures, tables, views, triggers or functions. Each time a match is found, a link towards the corresponding object is produced.

Example:
DBCC checktable( Customers ) 
=> will produce a link towards the Customers table.

-
A[rt] or Access(readtext) READTEXT <table>.<column> ... The referenced table is accessed in "read" mode Ex. 13
A[wt] or Access(writetext) WRITETEXT <table>.<column> ... The referenced table is accessed in "write" mode Ex. 13
A[uw] or Access(updatetext write) UPDATETEXT <table1>.<column1> ... The referenced table is accessed in "write" mode when it is the first table in the statement. Ex. 13
A[ur] or Access(updatetext read) UPDATETEXT <table1>.<column1> ... <table2>.<column2> ... The referenced table is accessed in "read" mode when it is the second table in the statement. Ex. 13
Aw or Access (write)

Ar or Access (read)

LOAD/RESTORE TABLE <table>...

DUMP/BACKUP TABLE <table>...

A loaded table receives its data, so it is accessed in "write" mode at that moment.

A dumped table exports its data, so it is accessed in "read" mode at that moment.

-
Dc or DLL(create)

 

Da or DLL(alter)

 

Dd or DLL(drop)

CREATE [PROXY] TABLE <table> ...

SELECT ... INTO <table> ...

ALTER <table> ...

DROP <object>

For CREATE TABLE or SELECT ... INTO, the link towards the table will be recorded in the Knowledge Base only if the table exists in the system catalog at the moment the analysis is performed.

All kinds of ALTER statements are handled, including those involving many object names (example: ALTER TABLE <table1> ADD <FK-column> ... CONSTRAINT ... REFERENCES <table2>(<PK-column>)), and links will be produced towards each referenced object.

A DROP statement produces a reference towards the following kinds of dropped objects: procedures, tables, views, triggers, functions. 

Ex. 14
L or Lock LOCK TABLE <table> ...   Ex. 15
Examples

Example 1

EXECUTE @status = sp_who 'Mary' -- procedure callEXECUTE @cos = dbo.my_fn_cosine @pi_div_8 -- scalar function callINSERT INTO SalesDB.dbo.Sales(price,ratio) EXECUTE dbo.GetSales 'Frebruary', $100 -- procedure callSELECT dbo.ConvertUsrIdToAccount(uid) FROM master..sysusers WHERE name != 'public' -- scalar function call{ CALL sp_who } -- ODBC CALL-escape-sequence of a procedureSELECT { FN LEFT( @@version, 20 ) } -- ODBC FN-escape-sequence for calling LEFT built-in function

Example 2

DECLARE @CalledProcName varchar(64)DECLARE @choice         int...IF ( @choice = 1 )  SELECT @CalledProcName = 'dbo.compute_sales'ELSE IF ( @choice = 2 )  SELECT @CalledProcName = 'dbo.compute_prices'ELSE  SELECT @CalledProcName = 'dbo.compute_everything'EXECUTE @result = @CalledProcName -- 3 links of type "Call" will be issued: towards 'dbo.compute_sales', 'dbo.compute_prices', and 'dbo.compute_everything'

Example 3

SELECT * FROM dbo.Sales WHERE ( Price > $100 )SELECT * FROM dbo.GetLogins('floor#1') AS L JOIN master..sysusers AS SU ON (SU.name=L.login_name) WHERE login_name != 'public'SELECT description FROM ::fn_helpcollations() WHERE name LIKE 'Cyrillic[_]General%' -- no link issued from this instructionbecause ::fn_helpcollations() is a built-in table-valued function

Example 4

UPDATE CustomersView SET City = 'NY' WHERE Phone LIKE @NyPhonePatternUPDATE dbo.GetCustomers('NY') SET City = 'NY' WHERE Phone LIKE @NyPhonePattern -- same update as above,performed through a table-valued function call

Example 5

INSERT SalesAggr SELECT * FROM OldSales WHERE ( Month < @curr_month )BULK INSERT SalesDB.dbo.Sales   FROM 'c:\sales_db\backup\sales.tbl'   WITH ( FIELDTERMINATOR = ';', FIRE_TRIGGERS )

Example 6

SELECT * INTO dbo.TmpSales FROM dbo.Sales ORDER BY value

Example 7

DELETE FROM TmpSales WHERE value < $50DELETE FROM dbo.FilterTmpSales('<',$50) -- same cleanup as above, performed through a table-valued function callTRUNCATE TABLE TmpSales

Example 8

DECLARE @TableName   varchar(64)DECLARE @ColumnsList varchar(255)DECLARE @table_no    int...IF ( @table_no = 1 )  SELECT @TableName = 'Sales', @ColumnsList = 'Store#,Date'ELSE IF ( @table_no = 2 )  SELECT @TableName = 'Titles', @ColumnsList = 'Title,Type,Price'EXECUTE( 'SELECT ' + @ColumnsList + ' FROM dbo.' + @TableName ) -- 2 links of kind "Use(select)" will be issued:one towards 'dbo.Sales' (tagged with 2 columns: Store#,Date), and anotherone towards 'dbo.Titles'(tagged with 3 columns: Title,Type,Price)

Example 9

SELECT * FROM OPENXML( @IdXmlDoc, '/ROOT/Customer/Order/OrderDetail', 2 ) WITH TblSchemaDeclCREATE STATISTICS CustStatsOnNames ON dbo.Customers(CompanyName, ContactName) WITH SAMPLE 5 PERCENTUPDATE STATISTICS dbo.Customers( CustStatsOnNames )DROP STATISTICS dbo.Customers.CustStatsOnNamesSET IDENTITY_INSERT dbo.SalesTimestamps ONBULK INSERT dbo.SalesTimestamps FROM 'c:\sales_db\events\sales_ts.tbl'SET IDENTITY_INSERT dbo.SalesTimestamps OFF

Example 10

GRANT SELECT ON dbo.Sales TO publicREVOKE SELECT ON dbo.Sales FROM publicDENY INSERT, UPDATE, DELETE ON dbo.Sales TO Sandra, Enzo

Example 11

CREATE UNIQUE CLUSTERED INDEX IdxCust_On_City ON dbo.Customers.City -- Link "Rely On" from Customers.City to IdxCust_On_CityREORG reclaim_space dbo.Customers.City IdxCust_On_City WITH resume, time = 120DROP INDEX dbo.Customers.IdxCust_On_CityCREATE TABLE T_Pk( ..., C int not null primary key, ... )CREATE TABLE T_Fk( ..., C int not null foreign key references T_Pk(C)                     ) -- Link "Rn" from "T_Fk" to "T_Pk"CREATE TABLE T_Fk( ..., C int not null foreign key references T_Pk(C) ON DELETE NO ACTION ) -- Link "Rn" from "T_Fk" to "T_Pk"CREATE TABLE T_Fk( ..., C int not null foreign key references T_Pk(C) ON UPDATE NO ACTION ) -- Link "Rn" from "T_Fk" to "T_Pk"CREATE TABLE T_Fk( ..., C int not null foreign key references T_Pk(C) ON DELETE CASCADE   ) -- Link "Rdc" from "T_Fk" to "T_Pk"CREATE TABLE T_Fk( ..., C int not null foreign key references T_Pk(C) ON UPDATE CASCADE   ) -- Link "Ruc" from "T_Fk" to "T_Pk"

Example 12

ALTER TABLE dbo.Sales ENABLE TRIGGER ALLALTER TABLE dbo.Sales DISABLE TRIGGER TR_Sales_ForU, TR_Sales_InsteadOfD

Example 13

DECLARE @ptrval binary(16)...READTEXT pub_info.pr_info @ptrval 4 15 /* Access(readtext) */WRITETEXT pub_info.pr_info @ptrval 'New Moon' /* Access(writetext) */UPDATETEXT pub_info.pr_info @ptrval 15 5 '[NMB]' /* Access(updatetext write) */UPDATETEXT pub_info2_bkp.pr_info /* Access(updatetext write) */ @ptrval 10 20 WITH LOG pub_info.pr_info /* Access(updatetext read) */ @ptrval

Example 14

CREATE TABLE T( C1 int NOT NULL )ALTER TABLE T ADD C2 int NOT NULLSELECT * INTO T2 FROM TALTER TABLE T ADD ComputedCol AS ( C1 + C2 )ALTER TABLE T ALTER COLUMN C1 int NULL ALTER TABLE T WITH NOCHECK ADD CONSTRAINT MyConstraint CHECK (C1 != 0)ALTER TABLE T ADD C3 INT IDENTITY CONSTRAINT C_Pk PRIMARY KEYALTER TABLE T ADD C4 INT NULL CONSTRAINT C_Fk REFERENCES dbo.T2(C2)ALTER TABLE T DROP COLUMN ComputedCol, C1, C2 DROP TABLE T, T2

Example 15

LOCK TABLE dbo.Sales IN EXCLUSIVE MODE

VB

The following table describes references that are detected by the analyzer and the context in which corresponding links are traced and stored in the Knowledge Base:

Link Type When is this type of link created?
Call

- When calling a VB or a COM function (sub, function, property get, let set, com method, com prop put, prop putref, prop get) except system functions (functions from VB, VBA or VBRUN DLLs)

- When calling a VB or a COM event

- When the return type of a function is not a standard one

Here is a sample that shows one of these links.

Private Sub MySub(i As Integer)  'Do Whatever  End Sub Private Sub Command1_Click()   Dim j As Integer  MySub (j)End Sub

This will result in the following view:

Raise

- When raising an event

In the following sample, we have a class (Class1) that defines an event (Gong) and a method (MyMethod). When MyMethod is called, we raise an event.

Event Gong()Public Sub MyMethod()RaiseEvent GongEnd Sub

This will result in the following view (includes only event relevant links):

Use

There is also a Form (Form1) that has the button (Command1). Here's the code of this Form:

Private WithEvents mHandler As Class1Private Sub Command1_Click()   Set mHandler = New Class1   mHandler.MyMethodEnd SubPrivate Sub mHandler_Gong()MsgBox "Gong !"End Sub

- When declaring a user data-type, link with the non standard members of this user data-type

- When referencing a non standard type member of a user data-type variable

- When accessing a variable 

Rely On

- When declaring a variable of a non standard type

- When declaring a function return value of a non standard type

Inherit

- When a user control inherits from a non standard type

In this sample, the user control "UserControl1" is used in the form "Form1"

- When implementing an event using WithEvents statement

Web Services

The following table describes references that are detected by the analyzer and the context in which corresponding links are traced and stored in the Knowledge Base:
Link Type When is this type of link created? Example
Inherit +  Implement This link is created when a port xml element is found within a service element and the corresponding binding and Port Type found in a WSDL file.

Caller is the Port

Callee is the Port Type

<portType name="ServerSoapPort">

...

</portType>

<binding name="ServerSoapBinding" type="wsdlns:ServerSoapPort">

...

</binding>

<service name="CodaServices">

<port name="ServerSoapPort" binding="wsdlns:ServerSoapBinding">

<soap:address location="http://demeter:80/TestDCom/CodaServices.WSDL"/>

</port>

</service>

Use This link is created for each Operation xml element within a Port Type when this one is linked to a Port.

The caller is a Port

The callee is an Operation

<portType name="ServerSoapPort">

<operation name="ProcessAccount" parameterOrder="objAccount">

</operation>

</portType>

<binding name="ServerSoapBinding" type="wsdlns:ServerSoapPort">

...

</binding>

<service name="CodaServices">

<port name="ServerSoapPort" binding="wsdlns:ServerSoapBinding">

<soap:address location="http://demeter:80/TestDCom/CodaServices.WSDL"/>

</port>

</service>

Prototype This link is traced toward service implementation objects and for each portTypeImpl and operationImpl elements as specified in the generated file resulting from language specific mapping files.

The Caller is a Port Type or an Operation

The Callee is searched for among objects selected in the objects browser and is of the type specified in the generated file (cwClassId xml element). See KeyClass in the Keys Table in the Knowledge Base.

WSDD deployment descriptor

<deployment >

<service name="AdminService" provider="java:MSG">

<parameter name="allowedMethods" value="AdminService"/>

<parameter name="enableRemoteAdmin" value="false"/>

<parameter name="className" value="org.apache.axis.utils.Admin"/>

</service>

</deployment >

Transformed into

Generated file (if keepGeneratedFiles=yes is added under the [WBSAssistant] section in the CrossApplicationSetiings.ini file, generated files are kept in the %temp%\Cast Temporary Files folder)

<webservices-impl >

<serviceImpl name="" wsdlFile="">

<portTypeImpl name="AdminService" implClassFQName="org.apache.axis.utils.Admin">

<cwClassId>5040</cwClassId> // 5040 corresponds to a Java Class

</portTypeImpl>

</serviceImpl>

</webservices-impl>

See Also

Belongs To Links | Link Colors | Expanding Links | Understanding default Layers


CAST Website

  • No labels