Before you can use Data Dictionaries in your application you must create a class for each Table in your application. The Studio’s Data Dictionary Modeler is used to do this. Although the Data Dictionary Modeler is a visual design tool, the end of result of this tool is source code. Data Dictionaries are simply source code based classes that are compiled into your application.
The purpose of this section is to describe the features of a Data Dictionary class and to expose the Data Dictionary interface (i.e., expose the source code). We expect that you will always use the Data Dictionary Modeler to maintain your Dictionaries. Some of the code within Data Dictionary classes will entirely created and maintained by Studio’s point and click interface. Other parts of the class, in particular the events, will require that you create custom code.
Some of the properties and events described in this class section can also be defined at the Data Dictionary object level. When working at the object level you will need to know how to use and code the interface.
A Data Dictionary class can be divided into two main parts:
The Data Dictionary Constructor: The constructor method is used to set all Data Dictionary attributes. This includes table attributes, Field attributes, Foreign Field attributes and Parent/Child table relationships. All of these attributes are maintained by setting properties. These are all maintained inside of a procedure named Construct Object.
The Data Dictionary Events: A number of events are called during the Data Dictionary find, save, delete, and clear operations. These events may be created to handle the custom requirements for a table. These requirements include setting defaults, performing validations, maintaining balances between tables, and controlling custom relationships between tables. In addition, the developer may create custom events and assign these to fields. These events are triggered by specific operations such as field validation and navigations. All of these events are created as functions and procedures, which the developer must create.