5.11.1.1.2.1. model.xml

Listing 5.92 /model.xml
  1<?xml version="1.0" encoding="UTF-8"?>
  2<model xmlns="https://metafactory.io/xsd/v1/model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://metafactory.io/xsd/v1/model https://metafactory.io/xsd/v1/model.xsd">
  3  <package name="domain_model">
  4    <object name="YourFirstObject">
  5      <metadata>
  6        <name.plural>YourFirstObjects</name.plural>
  7        <serialVersionUID>0</serialVersionUID>
  8      </metadata>
  9      <attribute name="firstAttribute" type="String"></attribute>
 10    </object>
 11    <object name="ExampleObject1">
 12      <metadata>
 13        <createSimpleService></createSimpleService>
 14        <createSpecialService></createSpecialService>
 15        <name.plural>ExampleObjects1</name.plural>
 16        <serialVersionUID>1</serialVersionUID>
 17      </metadata>
 18      <attribute name="exampleAttribute1" type="String"></attribute>
 19      <attribute name="exampleAttribute2" type="Long">
 20        <metadata>
 21          <bar></bar>
 22          <transient></transient>
 23        </metadata>
 24      </attribute>
 25      <attribute name="exampleAttribute3" type="String">
 26        <metadata>
 27          <bar>baz</bar>
 28        </metadata>
 29      </attribute>
 30      <attribute name="exampleAttribute4" type="Long">
 31        <metadata>
 32          <bar>zab</bar>
 33        </metadata>
 34      </attribute>
 35    </object>
 36    <object name="ExampleObject2">
 37      <metadata>
 38        <createSimpleService>false</createSimpleService>
 39        <createSpecialService>false</createSpecialService>
 40        <name.plural>ExampleObjects2</name.plural>
 41        <serialVersionUID>2</serialVersionUID>
 42      </metadata>
 43      <attribute name="exampleCounter1" type="Long">
 44        <metadata>
 45          <initialValue>1</initialValue>
 46          <setInitialValue></setInitialValue>
 47        </metadata>
 48      </attribute>
 49      <attribute name="exampleCounter2" type="Long">
 50        <metadata>
 51          <initialValue>0</initialValue>
 52          <setInitialValue></setInitialValue>
 53        </metadata>
 54      </attribute>
 55      <attribute name="exampleCounter3" type="Long"></attribute>
 56    </object>
 57    <object name="ExampleObject3">
 58      <metadata>
 59        <createSimpleService>true</createSimpleService>
 60        <createSpecialService>true</createSpecialService>
 61        <name.plural>ExampleObjects3</name.plural>
 62        <serialVersionUID>0</serialVersionUID>
 63      </metadata>
 64    </object>
 65    <object name="ExampleObject4">
 66      <metadata>
 67        <name.plural>ExampleObjects4</name.plural>
 68        <serialVersionUID>0</serialVersionUID>
 69      </metadata>
 70      <reference name="exampleObject1" type="ExampleObject1" multiplicity="1..1" notnull="true"></reference>
 71      <reference name="exampleObject2" type="ExampleObject2" multiplicity="1..1" notnull="true">
 72        <metadata>
 73          <bar></bar>
 74        </metadata>
 75      </reference>
 76      <reference name="exampleObject3" type="ExampleObject3" multiplicity="1..1" notnull="true">
 77        <metadata>
 78          <bar>baz</bar>
 79        </metadata>
 80      </reference>
 81    </object>
 82    <object name="ExampleObject5">
 83      <metadata>
 84        <name.plural>ExampleObjects5</name.plural>
 85        <serialVersionUID>0</serialVersionUID>
 86      </metadata>
 87      <attribute name="exampleObject5Attribute" type="String"></attribute>
 88    </object>
 89    <object name="ExampleObject6" extends="ExampleObject5">
 90      <metadata>
 91        <name.plural>ExampleObjects6</name.plural>
 92        <serialVersionUID>0</serialVersionUID>
 93      </metadata>
 94      <attribute name="exampleObject6Attribute" type="String"></attribute>
 95    </object>
 96    <object name="ExampleObject7" extends="ExampleObject6">
 97      <metadata>
 98        <name.plural>ExampleObjects7</name.plural>
 99        <serialVersionUID>0</serialVersionUID>
100      </metadata>
101      <attribute name="exampleObject7Attribute" type="String"></attribute>
102    </object>
103    <object name="ExampleEmployee">
104      <metadata>
105        <name.plural>ExampleEmployees</name.plural>
106        <serialVersionUID>0</serialVersionUID>
107      </metadata>
108      <attribute name="name" type="String" length="255" notnull="false"></attribute>
109      <reference name="manager" type="ExampleEmployee" multiplicity="0..1" notnull="false"></reference>
110      <reference name="colleagues" type="ExampleEmployee" multiplicity="0..n" notnull="false"></reference>
111    </object>
112  </package>
113</model>