The Objects in a Business Object Model

Objects are added to a business object model in the Business Object Model Editor much as panes and controls are added to forms, either by clicking the desired object in the palette and then clicking in the desired location on the canvas of the editor, or by dragging and dropping the object onto the canvas.

Objects that can be placed into a business object model include the Elements (Package, Class, Primitive Type, and Enumeration), Children (Attribute and Enum Literal), and Relationships (Generalization and Composition).

The objects in the palette are of several kinds, each distinguished by an icon and color, which appears (as an aid to the identifying the object) in various places throughout the Business Studio interface, including in the title bars of the objects on the canvas. The objects most important for creating complex types to be used in forms modeling are described in this section.

Elements

Class
 A container for a complex data object. Classes contain children, such as attributes and enum literals. A class from the BOM can later be specified as the type for a data field in the Forms Editor.
Primitive Type
 An object of one of the BOM Primitive Types (Integer, Boolean, Date, Time, Integer, and so on), or of the type of a previously-defined primitive type object.

In the latter case, the previously-defined primitive type might be, for instance, a zip code object that was defined as an integer with a pattern (specified in the Advanced tab of the object’s Properties view) as a regular expression) that limits its value to 5 single-digit integers. The Pattern value restricts valid entries to five integers. This restriction is enforced at runtime.

Warning: A pattern that has been specified as a restriction for a data type in the BOM does not appear in the Forms modeling environment. For instance, if a ZIP Code primitive type is defined in the BOM as requiring a value of five single-digit integers, and that primitive type is included in an Address class in the BOM which, in turn, is used as a data type for a form parameter, the default generated form will not display the restriction in the Validations tab of the zip code text control’s Properties view. Nonetheless, the restriction will be enforced at runtime, and cannot be modified or overwritten by different restrictions defined in the Forms Editor on the text control’s Properties view.
Enumeration
 A data type that can contain a list of values. Selecting this type enables you to specify a set of enumerated values. For example, an enumeration called Color might have the values Red, Blue, and Green.

An enumeration from the BOM can be included as an attribute for a class in the BOM or be specified later as the type for a data field in the Forms Editor. On the default generated form, this type will be rendered by default as an optionlist. (The control type could later be changed in the form control’s Properties view to a radiogroup, or other control type.)

Children

Attribute
 Attributes are data members that make up a class. By default, new attributes are created with the primitive BOM type text. A different data type can be chosen in the attribute’s Properties view, either another primitive type, or an existing class or enumeration. Each attribute type ends up corresponding to a different control type in a generated form.

The attributes in a class can be re-ordered in the Attributes tab of the class’s Properties view using the up and down arrows. Their order in the BOM determines the order in which they appear in the default form.

Enum Literal
  These are the values within an enumeration. For example, an enumeration called Color might have the enum literals with the names Red, Blue, and Green.

The enum literals in an enumeration can be re-ordered in the Enum Literals tab of the enumeration’s Properties view using the up and down arrows. Their order in the BOM determines the order in which they appear in the default form.

Relationships

Generalization
 This is a relationship of inheritance: a class that is related to an existing class by generalization will inherit the qualities of the existing class, and hence will contain members of the same type as the existing class.
Composition
 This relationship indicates that the child class is wholly contained within the parent class.