About LU Dictionary

Very old page, need a new revision to get all the new information

The communication model used within Foundation1, includes some construction tools used for the handling of client/server communication as well as some stand-alone client and server benefits. These benefits are used both in design-time and run-time. One of the construction tools is the LU-dictionary, where all important information about logical units is stored.

Contents

General

The information stored in the LU-dictionary is very important and is used in the development tools as well as in the run-time environment for Foundation1. There are several places where the information in the LU-dictionary is used, like for instance in almost all system service packages. The sections below describe the different subjects and how to get information through the system service.

It is important to state that to get good quality and consistency in the code, it is important to define the behavior of the logical unit, before the code is being produced. When the PL/SQL-code in the server correspond to the LU-dictionary, there will be much easier to change the logical units in the future.

Below is a description of the model of the LU-dictionary and the one-to-many relations between different concepts like LU, methods, modules/components and other objects within the LU-dictionary. Note that these relationships are defined in several places (see next section).

Description of the model of the LU-dictionary

Storage

The information in the LU-dictionary is stored in different places depending on the relation type. The four different storages are: package globals, Oracle Server dictionary, view comments and the actual package code. For more information, see the section about Model Properties. These different types of storages are briefly described in the table below:

Relation Information storage
Component - Logical Unit Package global "module_" or view comment
Logical Unit - Logical Unit Parent key column comment, reference tag REF=
Component - Package Package global "module_"
Logical Unit - Package Package global "lu_name_"
Component - View View comment, module tag MODULE=
Logical Unit - View View comment, module tag LU=
Package - Method System view USER_SOURCE (the actual code)

Some important information in the LU-dictionary is implemented as comment definitions on view- and column-level. The comment definitions are placed in the file containing the implementation (body) of the package for all logical units (*.apy). The information is used by the system service Dictionary_SYS, which supplies attribute information for tools at design-time and client facilities in run-time, such as LOV-forms and other referencing support in the server (e.g. cascade operations).

When the package files for a logical unit (or class) are deployed to the database (files *.api and *.apy), all model properties are stored in the column comments on the base view generated by IFS/Design. These comments together with the information stored in package globals are often referred to as the LU-dictionary.

See complete example for logical unit DevelopmentProject below.

File: DevelopmentProject.apy

define MODULE = MYMOD
define LU = DevelopmentProject
define VIEW = DEVELOPMENT_PROJECT
define PKG = DEVELOPMENT_PROJECT_API

define OBJID = rowid
define OBJVERSION = rowversion

COMMENT ON TABLE &VIEW IS 'LU=&LU^PROMPT=Dev Project^MODULE=MOD1^';

COMMENT ON COLUMN &VIEW..company IS
'FLAGS=PMI-L^DATATYPE=STRING(5)^PROMPT=Comp^REF=Company/CASCADE^';
COMMENT ON COLUMN &VIEW..project_no IS
'FLAGS=KMI-L^DATATYPE=STRING(10)^PROMPT=Project No^';
COMMENT ON COLUMN &VIEW..description IS
'FLAGS=AMIUL^DATATYPE=STRING(30)^PROMPT=Description^';
COMMENT ON COLUMN &VIEW..priority IS
'FLAGS=AMIUL^DATATYPE=STRING(20)^PROMPT=Priority^REF=Priority^';
COMMENT ON COLUMN &VIEW..max_price IS
'FLAGS=A-IU-^DATATYPE=NUMBER(15)^PROMPT=Max Price^';
COMMENT ON COLUMN &VIEW..start_date IS
'FLAGS=A-I--^DATATYPE=DATE^PROMPT=Start Date^';
COMMENT ON COLUMN &VIEW..status IS
'FLAGS=AMIU-^DATATYPE=STRING(10)^PROMPT=Status^REF=ProjStatus^';
COMMENT ON COLUMN &VIEW..comments IS
'FLAGS=A-IU-^DATATYPE=STRING(2000)^PROMPT=Comments^';

Uses in Foundation1

Below is a list of different occasions when the LU-dictionary is activated.

Design time usage

Runtime usage