IBM WebSphere Adapters User Manual page 123

Version 6 release 2
Table of Contents

Advertisement

The notion of whether or not a property is set is critical to processing null values
or values that have not been set in the adapter. If a property has been explicitly set
to null, the adapter must be able to detect this and set the associated property to
null in the EIS.
If the property has not been set, it might still have a null value, but the adapter
will ignore the value and not set it in the EIS system.
A list of bean properties for which the setter is called is returned when
getSetAttributes() is called. This will enable the DESPI implementation to
determine if a particular attribute has been set.
Property order:
The notion of property order is critical, because the adapter may need to iterate
over the properties in the same order that they appear in the EIS system.
Since JavaBean APIs cannot detect the order present in the class file, there must be
a string array called "propertyOrder" in the bean, containing the names of all
properties in the desired order.
public static final String[] propertyOrder = {"property1","property2"};
SDO to JavaBeanRecord ASI Mappings: Annotations from the SDO/XML schema are
read and stored in a Map structure in the bean. Here is a description of how the
RecordGenerator would populate annotation maps. For each element in the
metadata annotation, the generator would create an entry in the Map with the
name of the element as the key.
v If the element is a simple type with single cardinality then the value of this
v If the element is a simple type with n-cardinality, then a List is generated
v If the element is a complex type with single cardinality then a Map is created
v If the element is a complex type of multiple cardinality then a List is created.
Here is an example of how the object level metadata annotation would look like in
an SDO schema:
<annotation>
<appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/sap/metadata">
<sapasi:sapBAPIBusinessObjectTypeMetadata xmlns:sapasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/sap/metadata">
<sapasi:Type>BAPI</sapasi:Type>
<sapasi:Operation>
<sapasi:MethodName>BAPI_CUSTOMER_CREATEFROMDATA1</sapasi:MethodName>
<sapasi:Name>Create</sapasi:Name>
</sapasi:Operation>
<sapasi:Operation>
<sapasi:MethodName>BAPI_CUSTOMER_CHANGEFROMDATA1</sapasi:MethodName>
<sapasi:Name>Updatewithdelete</sapasi:Name>
</sapasi:Operation>
</sapasi:sapBAPIBusinessObjectTypeMetadata>
</appinfo>
</annotation>
element is added to the Map.
containing one or more values of this element.
The List is then added to the annotation Map.
containing the mappings for elements of this child complex type.
The Map is then added to the annotation Map.
The List would contain one or more Map entries where each Map contains the
mapping for the elements of the child complex type.
WebSphere Adapter development overview
117

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Websphere adapter toolkit

Table of Contents