Entity annotations
The entity XML annotations include an annotation to define a complex type as an entity and another annotation to define the entity identifier.
Entity annotation
You must add the following annotation to the complex type that defines the entity.
<annotation>
<appinfo source="http://www.ibm.com/ia/Annotation">
<entity/>
</appinfo>
</annotation>
This annotation specifies the inheritance to the com.ibm.ia.model.Entity interface.Entity identifier annotation
You must add the following annotation to the element that defines the identifier of an entity.
<annotation>
<appinfo source="http://www.ibm.com/ia/Annotation">
<entityId/>
</appinfo>
</annotation>
The identifier annotation adds the BOM property ia.entity.id with
the value true to the corresponding BOM attribute.Note: The XSD file must contain an element declaration for each
complex type that has an entity annotation.
Example
The following example defines an entity named Flight with a FlightNumber identifier.
<element name="Flight_entity" type="tns:Flight"/>
<complexType name="Flight">
<annotation>
<appinfo source="http://www.ibm.com/ia/Annotation">
<entity/>
</appinfo>
</annotation>
<sequence>
<element name="FlightNumber" type="integer">
<annotation>
<appinfo source="http://www.ibm.com/ia/Annotation">
<entityId/>
</appinfo>
</annotation>
</element>
</sequence>
</complexType>