Following is a short sample illustrating the elements in object.xml. The DOB field shows usage of the minimum-value element, the SSN field shows usage of the pattern element, and the AddressType field illustrates the code-module element. The AddressType field also has the key-type set to true, meaning that each record can only contain one address of each address type.
<name>Person</name>
<database>oracle</database>
<dateformat>MM/dd/yyyy</dateformat>
<nodes>
<tag>Person</tag>
<fields>
<field-name>LastName</field-name>
<field-type>string</field-type>
<size>40</size>
<updateable>true</updateable>
<required>true</required>
<key-type>false</key-type>
</fields>
<fields>
<field-name>FirstName</field-name>
<field-type>string</field-type>
<size>40</size>
<updateable>true</updateable>
<required>true</required>
<key-type>false</key-type>
</fields>
<fields>
<field-name>DOB</field-name>
<field-type>date</field-type>
<updateable>true</updateable>
<required>true</required>
<minimum-value>1900-01-01</minimum-value>
<key-type>false</key-type>
</fields>
<fields>
<field-name>SSN</field-name>
<field-type>string</field-type>
<size>16</size>
<updateable>true</updateable>
<required>false</required>
<pattern>[0-9]{9}</pattern>
<key-type>false</key-type>
</fields>
</nodes>
<nodes>
<tag>Address</tag>
<fields>
<field-name>AddressType</field-name>
<field-type>string</field-type>
<size>8</size>
<updateable>true</updateable>
<required>true</required>
<code-module>ADDRTYPE</code-module>
<key-type>true</key-type>
</fields>
...
</nodes>
<nodes>
<tag>Phone</tag>
...
</nodes>
<relationships>
<name>Person</name>
<children>Address</children>
<children>Phone</children>
</relationships>
|