Defining a subtype
A subtype is an entity that you base on another entity (its supertype). The subtype has all of the fields and elements of its supertype, and it can also have additional ones. You can also create subtypes of subtypes, with no limit to the depth of the hierarchy.
PolicyCenter does not associate a
unique database table with a subtype. Instead, the application stores
all subtypes in the table of its supertype. The supertype table includes
a subtype column. The
subtype column stores
the type values for each
subtype. PolicyCenter uses this
column to resolve a subtype.
You define a subtype using the <subtype> element. You must
specify certain attributes of the subtype, such as its name and its supertype
(the entity on which PolicyCenter
bases the subtype entity). For a description of required and optional
attributes, see <subtype> elements and related data object types.
Within the <subtype> definition, you
must define its fields and other elements. For a description of the elements
you can include, see Data entity subelements.
Example
Person. The Inspector_Ext entity includes a
field for the inspector’s business license. To create the
Inspector_Ext.eti file- In Studio, navigate to .
- Right-click Entity, and then click
- In the Entity text box, type Inspector_Ext.
- In the Entity Type drop-down list, click subtype.
- In the Supertype box, type Person.
- Click OK.
- In the Field drop-down list, click column.
- Set the following properties for the new column:
- name: InspectorLicense_Ext
- type: varchar
- desc: Inspector's business license number
- In the Field drop-down list, click columnParam.
- Set the following properties for the new column parameter:
- name: size
- value: 30
Note that while Inspector_Ext is subtype of Person,
Person, itself, is a subtype of Contact.
PolicyCenter automatically adds the new
Inspector_Ext type to the Contact typelist.
This is true, even though PolicyCenter marks the
Contact typelist as final.
To see this change:
- To see this change in the PolicyCenter Data Dictionary, you must restart the application server.
- To see this change in
the
Contacttypelist in Studio, you must restart Studio.
