Runtime tools : Core components : Typed data : Tasks : Creating a compound data type
  
Creating a compound data type
This section describes how to create a compound data type.
A compound type represents a business object that consists of two or more business objects. For example, a contact information object might consist of several business objects, including address, e-mail address, and a phone number; therefore, the contact information object is a compound type. In UDTT, there are two compound types: KColl and IColl.
1 In the Enterprise Explorer pane, right-click the type.xml file, and then click Open with > UDTT Transaction Editor.
2 Right-click in the Type panel of the Transaction editor, and then do one of the following tasks:
To create a KColl/record, click New Child > record.
To create a iColl/list, click New Child > list.
3 In the Id field of the Detailed Information panel, enter a name for the compound type that you are creating. Press Enter.
4 Specify a descriptor for the compound type.
In the Type panel, right-click the compound type that you are creating, and then click New Child > descriptor.
The Type Descriptor Creation Dialog window opens.
In the Type Descriptor Creation Dialog window, select Choose Type Descriptor from local classpath, and then click Browse.
The Select Class window opens.
If you are creating a KColl type, select com.ibm.btt.base.types.KCollPropertyDescriptor in the Select Class window. If you are creating an IColl type, select com.ibm.btt.base.types.ICollPropertyDescriptor in the Select Class window. Click OK.
In the Id field of the Detailed Information panel, enter typeDefault. Do not change or enter values for all the other fields in the Detailed Information Panel.
5 Specify a converter for the compound type.
In the Type panel, right-click the descriptor of the data type you are creating, and then click New Child > converter.
The Type Convertor Creation Dialog window opens.
In the Type Convertor Creation Dialog window, select Choose Type Convertor from local classpath, and then click Browse.
The Select Class window opens.
If you are creating a KColl type, select com.ibm.btt.base.types.KCollConverte in the Select Class window. If you are creating an IColl type, select com.ibm.btt.base.types.ICollConverter in the Select Class window. Click OK.
6 Specify a validator for the compound type.
In the Type panel, right-click the descriptor of the data type you are creating, and then click New Child > Validator.
The Type Validator Creation Dialog window opens.
In the Type Validator Creation Dialog window, select Choose Type Convertor from local classpath, and then click Browse.
The Select Class window opens.
If you are creating a KColl type, select com.ibm.btt.base.types.KCollValidator in the Select Class window. If you are creating an IColl type, select com.ibm.btt.base.types.ICollValidator in the Select Class window. Click OK.
7 Create a dataDescriptor for every simply type that is contained in the compound type.
In the Type panel, right-click the compound type that you are creating, and then click New Child > dataDescriptor.
In the Id field of the Detailed Information panel, enter the name of the simple type.
In the RefType field, select the type of the simple type.
Go up to
Tasks