|Dataports
|Parent-Child Relationship |Editing UDMs
 
3
Data ports
Each non-leaf node of the UDM tree, except the root, is required to be marked with the name of the data port from which its data elements are drawn, and into which they will be stored back. Currently, we only support one kind of data port, the DbObjectStore, which represents the database. Subsequently we will include support for session data ports (for storing session-specific data) and several other types as well.
If a node has DbObjectStore as its designated data port, then its data type must be one of the automatically-generated Java class types. These classes bear a direct relationship with the database tables: the class name and method names are obtained by converting the corresponding table name and column names (respectively) into title case. For example, the table sales_order with a column named customer_id will have an associated Java class named SalesOrder and corresponding column named customerId.
 
  
Read-only nodes:
A node of the UDM can be marked display only (or read-only). A read-only node, as you would expect, represents a data value that can be retrieved from its data port, but cannot be written back. There are numerous cases where we will want read-only nodes. For example, the user interface might have a drop-down list of all the names of the US states, as part of an address specification. This list is read-only: we do not modify the name of a state via the user interface. We might, however, modify the state associated with the particular address being typed in.
Several constraints exist in this context:

 

If a non-leaf node is marked read-only, then all its attribute children must also be read-only
If a non-leaf node uses the database data port, then its id child - the one representing its table's primary key - is always marked read-only.
It is possible to mark a non-leaf node as read-write, but have all of its attribute children be read-only. This signifies that inserts and deletes are permitted for that node, but updates are not.
    
 
 
3