Datasheet

RAIS 3.0 Programmer’s Guide – Part I : Advanced Customization
4
2 RAIS Advanced Customizations
This section describes advanced customization of RAIS 3.0. The RAIS 3.0 Creator has been
designed to allow for customizations of the RAIS 3.0 back-end (i.e. adding tables and fields)
and appropriately adjusting the RAIS 3.0 Input Forms. Advanced customizations, for
example new queries or new consistency checks, require manual intervention on parts of the
RAIS 3.0 Creator Source Code as well as RAIS 3.0 System Tables.
2.1 Creating Custom Protectors
Protectors are data tables of a special type used in RAIS 3.0 to prevent deletion of records
required for the good and deterministic functioning of the RAIS 3.0 Interface. Examples of
such records are all [unknown] records; these exist in the tables [Generator Model],
[Generator Type], [Manufacturers] and many more. These records exist in the default values
database of RAIS 3.0, distributed by the IAEA.
Protectors allow for preventing deletion by simply creating a record in a protection table and
making this record point (by means of a foreign key) to the record to be protected in some
other table. As foreign keys have to be entered for protection, it is clear that a protection table
has to be set up for each table containing records to be protected.
Protectors are stored in tables as for instance [Protector Generator Type], which has the
following table definition:
PK Protector Generator Type ID Primary key, auto-number
FK Generator Type ID Primary key of the record in the table [Generator Type]
to be protected
Deleting Text Error text to be displayed when deletion is attempted
Renaming Text Warning text to be displayed when modification is
engaged
Operation Code Unused (insert 1 if you create new record)
RAIS_TIME_STAMP Time stamps automatically updated by RAIS, do not
touch
Protectors have a foreign key relating a record to be protected in a RAIS table, in this
example the table [Generator Type]. Protected records in this table may not be deleted, upon
an attempt, the corresponding deleting text is displayed as an error message, and deletion is
aborted. To prevent unattended renaming of protected records, the feature for displaying a
warning text upon modification has been provided. Modification of protected records is
however allowed.