.. ******************************************************************************* * MetaFactory.io R2 * Technical Documentation * * File name : ModRef_Object.rst * Created by : Marnix Bochove (original text) * * MetaFactory BV Amsterdam ******************************************************************************* .. include:: /inline-images.txt .. include:: /metadata_include.txt Object ====== The element defines a data entity in the data model and lives within the scope its parent package. The model can potentially contain a multitude of packages, each with their set of child objects. The objects can be equipped with attributes that refer to standard Java types such as String, Boolean, LocalDate etc., while references point to other objects that are defined in the same model package. Like its parent package and children attributes/references, an object can contain metadata that patterns can use in their logic. An example is shown below. .. code-block:: xml :caption: example :name: MR-Object :linenos: ... ... 0 or more 0 or more 0 or more ... ... ... .. rubric:: Object Attributes .. list-table:: **attributes of ** :widths: 15 70 15 :header-rows: 1 :class: tight-table * - Name - Details - Required * - name - Name of the object in the package “yourModelPackage” of the MetaFactory model (model.xml). This name “yourObjectName01” has to be unique. - Mandatory .. rubric:: Object Sub elements .. list-table:: sub elements :widths: 15 70 15 :header-rows: 1 :class: tight-table * - Name - Details - Number * - :ref:`metadata ` - With the metadata of an object the code instruction logic can make decisions or it can itself add metadata to the object. - 0 .. n * - :ref:`reference ` - The reference points to another object and specifies the type of relationship with that object (e.g. notnull and multiplicity) - 0 .. n * - :ref:`attribute ` - Attributes refer to standard object types, e.g. String, Boolean, LocalDate etc. - 0 .. n