エンティティーの注釈
エンティティーの XML 注釈には、エンティティーとして複合タイプを定義する注釈と、エンティティー ID を定義する別の注釈が含まれます。
エンティティーの注釈
エンティティーを定義する以下の注釈を複合タイプに追加する必要があります。
<annotation>
<appinfo source="http://www.ibm.com/ia/Annotation">
<entity/>
</appinfo>
</annotation>
この注釈により、com.ibm.ia.model.Entity インターフェースの継承が指定されます。エンティティー ID の注釈
エンティティーの ID を定義する以下の注釈をエレメントに追加する必要があります。
<annotation>
<appinfo source="http://www.ibm.com/ia/Annotation">
<entityId/>
</appinfo>
</annotation>
ID の注釈により、BOM プロパティー ia.entity.id に値 true が設定されて、該当の BOM 属性に追加されます。
注: XSD ファイルは、エンティティーの注釈を持つ各複合タイプのエレメント宣言を含まなければなりません。
例
次の例では、 エンティティー Flight を FlightNumber ID とともに定義します。
<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>